GetDotted Domains

Viewing Thread:
"One for Turbo (PHP)"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 09/01/02 at 15:05
Regular
Posts: 787
I tried making a script that would randomly pick a Background and put it on the page as normal, from the Scripts background.php

e.g.



but it didn't seem to work. My question is is they way I'm trying possible and all it is is that I've got the code wrong??? Or is that way of putting an Image on a page not possible??
Wed 09/01/02 at 20:49
Regular
"Eff, you see, kay?"
Posts: 14,156
No probs.
Wed 09/01/02 at 19:11
Regular
"It goes so quickly"
Posts: 4,083
Thanx you two, I figured that's the only way to do it, I just wanted to check, as I saw somthing like it in a Random Advert Script for GCI where the script was called from the Tag.

Cheers though :o)
Wed 09/01/02 at 18:52
Regular
"Eff, you see, kay?"
Posts: 14,156
Hrm.

Not sure what you are doing. The only way I could think of is if you were using the GIF modules in PHP to randomly pick a picture, fomrat the headers and send "background.php" as a *.gif file. No offence but somehow I doubt it (because it's stupid). Here's how I'd do it:

">

And in background.php:

--------------------------------------
$images[] = "foo.gif";
$images[] = "bar.gif";
$images[] = "sit.gif";

srand ((double) microtime() * 1000000);
$num = rand(0, sizeof($images);
echo($images[$num]);
?>
--------------------------------------

However, a better way to do it would be to embed the above into the file and dump the images name into a variable instead of outputting it and call instead of . Less messy that way.
Wed 09/01/02 at 18:11
Posts: 0
That probably wouldn't work unless that PHP script returned the MIME type image/jpeg or something.. certainly not the most elegant solution.

You'd (probably) be looking at something more like this

$list = `cat backgrounds.txt`; // where backgrounds.txt contains is list of possible background images..
$background = do_random_turbonutter_magic($list);
print $background;
?>
>

Comments, Rob?
Wed 09/01/02 at 15:05
Regular
"It goes so quickly"
Posts: 4,083
I tried making a script that would randomly pick a Background and put it on the page as normal, from the Scripts background.php

e.g.



but it didn't seem to work. My question is is they way I'm trying possible and all it is is that I've got the code wrong??? Or is that way of putting an Image on a page not possible??

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Just a quick note to say thanks for a very good service ... in fact excellent service..
I am very happy with your customer service and speed and quality of my broadband connection .. keep up the good work . and a good new year to all of you at freeola.
Matthew Bradley
Best Provider
The best provider I know of, never a problem, recommend highly
Paul

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.