GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   php question (https://gfy.com/showthread.php?t=249054)

Chris 03-08-2004 04:20 AM

php question
 
here is the source for the thing in my sig

PHP Code:

$current="";
$started="";

$l=@fopen("sig.php",r);
$self=@fread($l,filesize("sig.php"));
@
fclose($l);
if(
$self){
$l=time()-2629743;
    if(!
$current>|| !$started || $started<$l){
    
$self=str_replace("started=\"$started\"","started=\"".time()."\"",$self);
    
$self=str_replace("current=\"$current\"","current=\"1\"",$self);
    
$current=1;
    
$started=time();
    }else{
    
$self=str_replace("current=\"$current\"","current=\"".($current+1)."\"",$self);
    
$current=$current+1;
    }
$l=@fopen("sig.php",w);
@
fputs($l,$self);
@
fclose($l);
}
Header("Content-type: image/jpeg");
$image=imagecreate(250,22);
$white=ImageColorAllocate($image,255,255,255);
$black=ImageColorAllocate($image,0,0,0);
$red=ImageColorAllocate($image,255,0,0);
ImageFilledRectangle($image,0,0,250,22,$white);
ImageRectangle($image,0,0,249,21,$black); 
$string="Sig viewed $current times since ".date("M d. H:i",($started-24*3600))."";
ImageString($image,1,2,1,$string,$red);
ImageString($image,1,65,11,'Icq - 71462500. I want an Xbox!',$black);
ImageJPEG($image);
ImageDestroy($image); 


now i was wonderin if i could spruse it up a bit and make it say how many clicks i have had or could i make another button to say how many clicks i have gotten

jasonir 03-08-2004 04:22 AM

Yes, you certainly could.

Chris 03-08-2004 04:22 AM

Quote:

Originally posted by jasonir
Yes, you certainly could.
well how about you tell me how or tell me how much you will charge

jasonir 03-08-2004 04:24 AM

Quote:

Originally posted by JupZChris
well how about you tell me how or tell me how much you will charge
That's an interesting idea... I think I will have my guy make a free hosted service for that.

Chris 03-08-2004 04:26 AM

Quote:

Originally posted by jasonir


That's an interesting idea... I think I will have my guy make a free hosted service for that.

this script was already posted for free by repetive monkey

Repetitive Monkey 03-08-2004 05:53 AM

Hey, it's cool to see the script gets some use.

As far as counting sig clicks go, I could change the script to do that also. I'll do it for $10 PayPal or 4k clickys. Hehe.

By the way, change the "65" in
ImageString($image,1,65,11,'Icq - 71462500. I want an Xbox!',$black);
to a lower number to make the second line center more properly.

Repetitive Monkey 03-08-2004 07:26 AM

Done. Now it also counts clicks.


All times are GMT -7. The time now is 04:14 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123