View Single Post
Old 04-11-2002, 05:37 AM  
chodadog
Confirmed User
 
Join Date: Apr 2002
Posts: 9,736
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($fp256);
  
$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

Last edited by chodadog; 04-11-2002 at 05:49 AM..
chodadog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote