PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
OK...I'm still building the same thing I've been banging on about on here for weeks now, and I have another problem.
(It is on an IIS server using Integrated Windows Authentication so I can't show anyone unfortunately).
Anyway, I have previously been using that random image script - you know the one, where there is a folder of images for it to select from - but now I want to randomise the image using a variable from a flat file.
But it ain't working.
The script I am using is -
without seeing the input we couldn't possibly tell you the exact cause.
However, if you are looking to include a random image link from a flat file, consider the following:
Do you really need to use bbcode in the file? Why not just use html anchor tags? (<a href= ... )
Are these directories stored on your server? If so, there is no need to store links in a flat file, you can random pic the image straight from the directory.
the files aren't stored on my server, but rather the variable $pieces[5] is a url to a google thumbnail - or similar
(this project has grown organically into an unplanned big mess, I know).
the bbcode has to be there, because it helps at a later stage for re-using the variable in other displays and xml feeds.
this is an entry from the flat file
28.11.05¬name¬name@name.com¬this is a subject title¬¬[img]http://images.google.co.uk/images?q=tbn:dkmEd38mwuwJ:upload.wikimedia.org/wikipedia/lt/thumb/3/3f/Mandrill.jpg/230px-Mandrill.jpg[/img]¬text and information goes here.blah, blah, blah, etc.<BR></BR>