Changing an array
Posted: Fri Aug 15, 2003 5:24 pm
I have an image rotation script here :
and I am wondering it could be modified to rotate off a text file, where all the urls are kepted, also I thing the script needs editing to be able to read from remote servers. Can anyone help me ?
Thanks in advanced
Code: Select all
<?PHP
$DocRoot='./';
$aPics = array(
"url_to_file_on_server.jpg",
"url_to_file_on_server.jpg",
);
$i = time(30) % sizeof($aPics);
$Filename = $aPicsї$i];
Header ('Content-type: image/jpeg');
Header ('Content-Disposition: attachment; filename="pic.jpg"');
readfile ($Filename);
?>and I am wondering it could be modified to rotate off a text file, where all the urls are kepted, also I thing the script needs editing to be able to read from remote servers. Can anyone help me ?
Thanks in advanced