|
Post by CrAzY_J on Apr 16, 2005 12:41:51 GMT -8
I made a php counter and echo'd the total views. Now i want to be able to put this in my sig, how?
|
|
|
Post by Eric on Apr 16, 2005 13:10:32 GMT -8
What siggeh?
|
|
|
Post by CrAzY_J on Apr 16, 2005 13:43:02 GMT -8
uh...my signature here? o.O
|
|
|
Post by Eric on Apr 16, 2005 13:54:56 GMT -8
Just any image, or a certain one I mean?
|
|
|
Post by CrAzY_J on Apr 16, 2005 14:26:13 GMT -8
Just any image, or a certain one I mean? its not a image, its just text on how many people viewed the page. i want that text to appear in my signature (text box in edit profile area:P) or do i have to do it with a image?
|
|
|
Post by Eric on Apr 16, 2005 15:44:49 GMT -8
|
|
|
Post by CrAzY_J on Apr 18, 2005 15:19:53 GMT -8
wont work
<? $tefile="counter.txt";
if(!file_exists($tefile)){ $status=fopen($tefile,'w'); fwrite($status,0); fclose($status); }
$hits=file_get_contents($tefile); $hits++;
if(is_writable($tefile)){ $status=fopen($tefile,'w+'); fwrite($status,$hits); fclose($status); } $hit=number_format($hits); $hhit=$hit." Sig Views";
header ("Content-type: image/gif"); $img = ImageCreate (250, 30) or die ("Failed Bitch"); $bg = ImageColorAllocate ($img, 0, 10, 10); $txt = ImageColorAllocate ($img, 0, 0, 0); ImageString ($img, 31, 5, 5, $hhit, $txt); ImageGif ($img);
?>
|
|
|
Post by Eric on Apr 18, 2005 17:38:04 GMT -8
I'm guessing your getting the error headers already declared:
<? $tefile="counter.txt";
if(!file_exists($tefile)){ $status=fopen($tefile,'w'); fwrite($status,0); fclose($status); }
$hits=file_get_contents($tefile); $hits++;
if(is_writable($tefile)){ $status=fopen($tefile,'w+'); fwrite($status,$hits); fclose($status); } $hit=number_format($hits); $hhit=$hit." Sig Views";
header ("Content-type: image/gif"); $img = ImageCreate (250, 30) or die ("Failed Bitch"); $bg = ImageColorAllocate ($img, 0, 10, 10); $txt = ImageColorAllocate ($img, 0, 0, 0); ImageString ($img, 31, 5, 5, $hhit, $txt); ImageGif ($img);
?>
Can be no spaces before the PHP starts
|
|