hey. i figured it's not actually a problem with my escaping..
this is the line of the code i wanna change:
list($img, $url, $alt) = explode("|", $line[$rIndex]);
i wanna add anotehr category.. so i figured.. it'd be as simple as changing it to this:
list($img, $url, $alt, $status_url) = explode("|", $line[$rIndex]);
and then changing:
blah.gif|
http://blah.com|Teens 4 Free
To
blah.gif|
http://blah.com|Teens 4 Free|
http://www.statusurl.com
What am i forgetting to do?
This is the entire code by the way:
-------------
PHP Code:
<?php
function PrintBanner() {
$fp = fopen("banners.txt", "r");
$index = 0;
while (!feof($fp)) {
$line[$index] = fgets($fp, 256);
$index++;
}
$rIndex = mt_rand(0, $index -1);
list($img, $url, $alt) = explode("|", $line[$rIndex]);
$banner = "<a href=\"$url\" target=_blank> <img src=\"$img\" width=\"468\" height=\"60\" border=\"0\" alt=\"[$alt]\"></a>\n";
return $banner;
}
?>
----------
and the text file with the data
----------
image1.gif|
http://somewhere.com/?wm=47887|Sexy Teens
image2.gif|
http://somewhere.com/?wm=47888|Sexy Lesbians
image3.gif|
http://somewhere.com/?wm=47889|Sexy Asians
-----------
Once again, i'm fucking cluseless here!
PS. After 23047 edits, i think i got this whore of a thing to display corrently