Do you guys know any script to rotate pictures AND the links of those pictures (each picture should have it own unique link)?
Anybody can help me out?
Anybody can help me out?
image1.jpg|http://somelink.com/ imaagagads3.jpg|http://notherlinkg.com/ akadsfd.jpg|http://asdfasdf/
$file = file("pictures.txt");
list($img,$link) = each(explode("|",$filerand (0, (count($file)-1)));
echo "<a href=\"".$link."\"><img src=\"".$img."\"></a>";
$num = date("s");
$ads = "/path/to/text/file/$num.txt";
if (file_exists($ads)) {
$ads_in = file ("$ads");
for($i = 0; $i < sizeof($ads_in); $i++)
{ print("$ads_in[$i]\n"); }
} else {
print("Try Again - $num.txt - $ads");
}
<script language="Javascript">
<!--
var currentdate = 0;
var core = 0;
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = initArray.arguments[i];
}
}
link = new initArray(
"http://www.yourlink1",
"http://www.yourlink2",
"http://www.yourlink3",
"http://www.yourlink4"
);
image = new initArray(
"http://imagelink.gif",
"http://imagelink.gif",
"http://imagelink.gif",
"http://imagelink.gif"
);
text = new initArray(
"textforlink!",
"text!",
"texxt!",
"rollovertext!"
);
var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink = link[core];
var ranimage = image[core];
var rantext = text[core];
document.write('<a href=\"' +ranlink+ '\" target=\"_blank\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');
//-->
</SCRIPT>

Comment