The Duke of Juke
Retired Forum Staff
✔️ HL Verified
💻 Oldtimer
- Joined
- Dec 24, 2002
- Messages
- 2,852
- Best answers
- 0
So basically, I want a rotating sig. I have hosting and what not, and while the php apparently works, it won't work as a sig here. typically
should work, but it doesn't.
click here to see it works properly in a browser but...
http://criticalstrikepress.com/deman/random_image.php
if I put it into my sig field, I get this:
there should be an image there, but it's not working.
Thats whats in the php file.
My only guess is that maybe the hosting won't allow off-site access to php maybe? I'm a total newbie to this stuff.
Code:
[img]http://criticalstrikepress.com/deman/random_image.php[/img]
click here to see it works properly in a browser but...
http://criticalstrikepress.com/deman/random_image.php
if I put it into my sig field, I get this:
there should be an image there, but it's not working.
PHP:
<?php
/*
* Name your images 1.jpg, 2.jpg etc.
*
* Add this line to your page where you want the images to
* appear: <?php include "randomimage.php"; ?>
*/
// Change this to the total number of images in the folder
$total = "2";
// Change to the type of files to use eg. .jpg or .gif
$file_type = ".png";
// Change to the location of the folder containing the images
$image_folder = "http://www.criticalstrikepress.com/deman/sigs";
// You do not need to edit below this line
$start = "1";
$random = mt_rand($start, $total);
$image_name = $random . $file_type;
echo "<img src=\"$image_folder/$image_name\" alt=\"$image_name\" />";
?>
My only guess is that maybe the hosting won't allow off-site access to php maybe? I'm a total newbie to this stuff.