Page 1 of 1

I need Specific Guideline

Posted: Sat Feb 14, 2009 8:27 am
by soul|fly
Hi there. How are you all?

I'm a good web designer but I'm not good at PHP. I have very very basic knowledge about it. Recently I'm doing a very little project which I have to complete by this month and severely stucked in a point. No completed project, No income :( . Please Help.

Details:
suppose, there will be a file called items.txt in server public_html. That items.txt will contain data as follows:

item name item URL
handbag5801 http://xxsx./handbag5801.html
hangbag2513 http://xxsx./handbag2513.html
.
.
total 100 items and links

The task i have to do is that on the right sidebar of wordpress, i have to show 10 items name with their links randomly selected from those 100 items. like this: hangbag5801, handbag2513, up to 10 links in sidebar in a box. So, whenever i refresh my browser its needed to get changed to new 10 list randomly.

If you could refer to any exiting php codes or similar tutorials or wordpress plugin, it would have been a great relief. Is it possible by php? Please guide me.

THanks

Re: PLEASE HELP... MY MINI PROJECT.. SPECIFIC GUIDELINE REQUIRED

Posted: Sat Feb 14, 2009 9:40 am
by John Cartwright
Please change your title to something appropriate. Firstly, we are here to help you so do not include, ever, stuff like "PLEASE HELP" or "URGENT". Typically, users will skip threads like this because you are suggesting your thread is more important than others. Secondly, it is important to use a descriptive title so users can decide if they would like to participate on a particular subject. Thirdly, all caps are the equivilent to shouting on forums. What I'm trying to say is please change your title, and use better titles in the future.

As for your problem

1. file() to load the file into into an array
2. shuffle() the array
3. for() loop grabbing first 10 items

Re: I need Specific Guideline

Posted: Sat Feb 14, 2009 10:21 am
by soul|fly
Im sorry sir. I should have read before post.

Re: I need Specific Guideline

Posted: Sat Feb 14, 2009 10:37 am
by John Cartwright
Thanks, let us know if you need any more help.

Re: I need Specific Guideline

Posted: Sat Feb 14, 2009 10:54 am
by soul|fly
Im afraid if I ask anything stupid again! :)

A little more deep code help would have been appreciated more if you dont mind.

Thank you again

Re: I need Specific Guideline

Posted: Sun Feb 15, 2009 9:00 pm
by John Cartwright
What have you tried so far? Can't expect to learn (the point of this place) if you don't try ;)