211655 Posted January 4, 2005 Posted January 4, 2005 hi, i have a banner add on my site that link to an external website link. i just want to check how many times someone has clicked that banner and went to the link. i have no way to check ot from that outside link so i need to find it on my own. so i have this php code that actually writes the count to a file and then redirects . this doesnt work. any other ideasd... <html> <head> <?php // path to counter.txt $counter_file = "counter.txt"; // Open the file for reading if (!($fp = fopen($counter_file, "r"))) die ("Cannot Open $counter_file."); // Read 20 characters from the file $counter = (int) fread($fp, 20); // Close the file fclose($fp); // Increment the counter $counter++; header('http://www.ggg.com/j.asp'); // Open the file, in write mode $fp = fopen($counter_file, "w"); // Write the new value of counter to the file. fwrite($fp, $counter); // Close the text file. fclose($fp); ?> </head> </html> 211655 SEO Optimization Export Orders into CSV file
Guest Posted January 4, 2005 Posted January 4, 2005 what error are you getting? do u have 777 on the file?
Guest Posted January 4, 2005 Posted January 4, 2005 Try to ulink the file before writing to it... Bobby
211655 Posted January 4, 2005 Author Posted January 4, 2005 no luck.... doesnt work.. any idea if anyone can rewrite 211655 SEO Optimization Export Orders into CSV file
boxtel Posted January 4, 2005 Posted January 4, 2005 no luck.... doesnt work.. any idea if anyone can rewrite <{POST_SNAPBACK}> why don't you use the default banner manager, that has all the functionality in it. Treasurer MFC
Recommended Posts
Archived
This topic is now archived and is closed to further replies.