Right I kind of understand how rotation scripts work.
However what im after it to be able to put some code into a website that pics a random image from a folder on another domain.
I want to be able to add images to this folder afterwards which will then be included in the webpage. BUT without me having to alter any code in the webpage.
What should i be looking up
Edit: is it also posible to make the image a link. But again the links will be to different places depending on the image
Code:
<?php
// random number 1 - 100
$result_random=rand(1, 100);
// if result less than or equal 70, display ad 1 (70%)
if($result_random<=70){
echo "Display ad1";
}
// if result less than or equal 90, display ad 2 (20%)
elseif($result_random<=90){
echo "Display ad2";
}
// if result less than or equal 100, display ad 3 (10%)
elseif($result_random<=100){
echo "Display ad3";
}
?>
However what im after it to be able to put some code into a website that pics a random image from a folder on another domain.
I want to be able to add images to this folder afterwards which will then be included in the webpage. BUT without me having to alter any code in the webpage.
What should i be looking up
Edit: is it also posible to make the image a link. But again the links will be to different places depending on the image
Last edited: