Page 1 of 1

I need a little nudge in the right direction.

Posted: Sun Oct 29, 2006 5:25 am
by bissquitt
Xposted from the volenteer work section cuz I dont really need it dont for me, i just need a good start and the commands ill need and i can take it from there even though I know 0 PHP.

Im looking for a fairly simple script, It would take me like 5min to do in C++ but that wont really help.

Basicly I need a page that will display all pictures in a perticular directory on a diffrent one of my sites so it will need to have the full url not just a relative link.

psudo code of what i need:

Code:
Function1:
for x = 0 to 64 (10 numbers, 26 lowercase letters, 26 upper case letters, space, return nothing (this is for the early part of the loop when there are only like 1 character so the 5th etc character will return nothing))

Code:
<img src="http://www.mysite.com/mypicturefolder/[b]Function1[/b].jpg>

This will produce every possiable combination of pictures in that folder with 1 character
I need to expand this so that after it tries every combo of one character it goes on to do every possiable combo of X number of characters.

Posted: Sun Oct 29, 2006 5:38 am
by aaronhall
Please use descriptive thread titles, and don't cross-post.

You may try opendir() -- also has an FTP wrapper. If the URL you are opening supports directory listing, this will work without having to use FTP.

Posted: Sun Oct 29, 2006 5:44 am
by bissquitt
this is simply to list all the items to other people that dont have ftp access. I just want something quick and dirty

Posted: Sun Oct 29, 2006 7:29 am
by aaronhall
Consider a local php script that returns links to all files in its directory in XML or CSV, and call it remotely using another script that parses that original file. Try scandir() for the local script, and file_get_contents() in the remote script.

Posted: Mon Oct 30, 2006 1:59 am
by bissquitt
ok well I tried learning a little but all i was able to get was a giant case statement thats not really working.

a simple loop would be the best.