I changed it as you suggested, and received another error on another line.
I am going to post the raw script so you can see actually what I am working with.
<?php
// Ip recorder, use in the format yoursite.com/picture.jpg/index.php
//this picture variable defines which image to show the victim
$picture = "http://mysite.com/w/w060529_2.jpg";
//this line just gets the visitor's ip address and stores it in the variable '$ip'
$ip = $_SERVER['REMOTE_ADDR'];
//this line tells the logger the name you want to use for the log file.
// if the logfile doesn't already exist, it will be created automagically
$logs = "logs.txt";
//here, we open the logfile for writing to. The 'a' means when we write
// data to the text file, it will be appended to the end of the file
$fh = fopen($logs, 'a') or die(" ");
//here we put the ip address into a variable called 'string data'
// the backslash-n starts a new line in the text file, to make it easier to read
$stringData = "$ip \n";
//here we write to the text file what is in the stringdata variable
fwrite($fh, $stringData);
//now we close the file
fclose($fh);
//and finally we echo some html back to the user's browser so they see an image
echo "<img src='$picture'>";
?>
thanks again!