xan Posted April 7, 2004 Share Posted April 7, 2004 The above code you gave goes in a .jpg file... so make a file called .htaccess and put this in it.<Files filename.jpg>ForceType application/x-httpd-php</Files>Change Filename to what you have called your .jpg file with your code in. Link to comment Share on other sites More sharing options...
xan Posted April 8, 2004 Share Posted April 8, 2004 Yes, it works... I have a new host and a new code! Link to comment Share on other sites More sharing options...
psyko Posted April 8, 2004 Share Posted April 8, 2004 What would I have to do in order for one of these dynamic signatures to have my CPU's uptime (local machine, not server)? Link to comment Share on other sites More sharing options...
xan Posted April 8, 2004 Share Posted April 8, 2004 I have not worked that one out yet but I presume you need to have first a script that will show when your pc is on... ask gamehead200 and he might give you a little hint. Link to comment Share on other sites More sharing options...
bwsk8 Posted June 12, 2004 Share Posted June 12, 2004 I recently found the danasoft script and wanted to make my own so after a couple searches I found this page. I have a secure apache server set up and I get the error"The image “https://mypage/sig.jpg” cannot be displayed, because it contains errors." or "Parse error: parse error, unexpected T_STRING in C:\OpenSA\Apache2\htdocs\sig.php on line 22" when I load it from php Can anyone help me?<Files sig.jpg>ForceType application/x-httpd-php</Files><?phpHeader ('Content-type: image/jpg');Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');Header('Pragma: no-cache');// create the image$image = imagecreatefrompng("bg.png");// set the colours$cool = imagecolorallocate($image, 81, 86, 96);$black = imagecolorallocate($image, 0, 0, 0);$white = imagecolorallocate($image, 255, 255, 255);$red = imagecolorallocate($image, 255, 0, 0);$grey = imagecolorallocate($image, 204, 204, 204);$green = imagecolorallocate($image, 206, 129, 18);$blue = imagecolorallocate($image, 0, 0, 255);// set the font and print text$font = 'Arial.ttf'ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);// output and destroyimagejpg($image);imagedestroy($image);?> Link to comment Share on other sites More sharing options...
bwsk8 Posted June 12, 2004 Share Posted June 12, 2004 And I should mention I get an error when I start apache that php_oci8.ddl is missing, Link to comment Share on other sites More sharing options...
gamehead200 Posted June 12, 2004 Share Posted June 12, 2004 ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR);That looks like line 22... Why don't you just make a variable?$ip = "Your IP address is: $REMOTE_ADDR";ImageTTFText ($image, 8, 0, 10, 17, $white, $font, $ip);That should work... BTW, if you're using Windows to host it, the path to the font should be /WINDOWS/Fonts/Arial.ttf or whatever font you're using! Link to comment Share on other sites More sharing options...
gopher Posted November 21, 2004 Share Posted November 21, 2004 hi,i am new here, i tried to make ip sig. by reading this many hrs but i still could not make it. Could anyone tell me how and what thing that i made wrong. Thankshere is my .htaccess# -FrontPage-IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*<Limit GET POST>order deny,allowdeny from allallow from all</Limit><Limit PUT DELETE>order deny,allowdeny from all</Limit>AuthName www.vangtrangkhuya.netAuthUserFile /home/vtrang01/public_html/_vti_pvt/service.pwdAuthGroupFile /home/vtrang01/public_html/_vti_pvt/service.grp<Files ipaddress.jpg>ForceType application/x-httpd-php</Files>my image for backgroud is: bg.jpgI copy a code in here to make a ipaddress.php file than after that I rename it to ipaddress .jpg , here is my .jpg file.<?phpHeader ('Content-type: image/jpg');Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');Header('Pragma: no-cache');// create the image$image = imagecreatefromjpg("/sig/bg.jpg");// set the colours$cool = imagecolorallocate($image, 87, 87, 87);$black = imagecolorallocate($image, 0, 0, 0);$white = imagecolorallocate($image, 255, 255, 255);$red = imagecolorallocate($image, 255, 0, 0);$grey = imagecolorallocate($image, 204, 204, 204);$green = imagecolorallocate($image, 206, 129, 18);$blue = imagecolorallocate($image, 0, 0, 255);// define geek code$geek = "-----BEGIN GEEK CODE BLOCK-----Version: 3.1GCS d+ s+:+ a---- C++ !U !P L+ E-- W+++$ N+ !o K- w++$O--- M$ V? PS PE++ Y+ !PGP !t !5 !X !R tv+++ b++ DI !DG e- h! r-- !y------END GEEK CODE BLOCK------";// line style line$line = "________________________________________________________";ImageTTFText ($image, 8, 0, 12, 45, $black, $font, $geek);ImageTTFText ($image, 8, 0, 12, 148, $black, $font, $line);ImageTTFText ($image, 8, 0, 12, 180, $black, $font, $counter);// output and destroyimagejpg($image);imagedestroy($image);?>I did post my ip sig. in here, but it shows only X Could anyone please tell me what giong wrong? thanks Link to comment Share on other sites More sharing options...
T1Cybernetic Posted December 31, 2004 Share Posted December 31, 2004 This is exellent, i've been looking in all the wrong places for al lthis time and just out of pure luck someoneasked me where to get the dansoft sig from and when i did a quick google i found all this info right here, thank you!Now to get working on my new signature, "EDIT"Well it seems like my brain has given up on me so what i would like is for someone to help me out if you can.Will someone show me the exact code and files they are using or i need to use to get a signature working?I would be very grateful for the help as i've been at this since my original post time and still it's not working. Link to comment Share on other sites More sharing options...
Jeffi80 Posted March 5, 2005 Share Posted March 5, 2005 Hello guys Can someone please tell me how can I get browser ditails and operating system ditails in my signature the same way I can see them from danasoft signature ?Finally I got this code work , but I need to get those ditails into my signature ....siggy.png<?phpHeader ('Content-type: image/jpeg');Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');Header('Pragma: no-cache');$expire= 60;$logfile= "flount.log"; $ip= getenv('REMOTE_ADDR');$visits=0;$badhit= false;$now= time();$ips = array(array());if (file_exists($logfile)){ if ($loggedips=file($logfile)){ $visits=trim($loggedips[0]); for ($i=1; $i< count($loggedips); $i++){ $loggedips[$i]=trim($loggedips[$i]); $ips[$i] = explode('||', $loggedips[$i]); if (($ips[$i][0]==$ip) && ($now-$ips[$i][1]< $expire)) $badhit= true; } if ($badhit) $rid= true; else{ $visits++; $fp= fopen($logfile, 'w'); fputs($fp,"$visits\n"); for ($i=1; $i< count($loggedips); $i++){ if ($now-$ips[$i][1] < $expire) fputs($fp, $ips[$i][0]."||".$ips[$i][1]."\n"); } fputs($fp, "$ip||$now\n"); fclose($fp); $rid= true; } }}// $textfile ="quotes.txt"; // change to the filename/path of your file with quotes.// $quotes = file("$textfile");// $quote = rand(0, sizeof($quotes)-1);// $getquote = wordwrap($quotes[$quote], 65, "\n", 1);$ipad = getenv("REMOTE_ADDR");$dns = strtolower(@gethostbyaddr(getenv("REMOTE_ADDR")));$today = date("m-d-Y");// create the image$image = imagecreatefromgif("about-bg.gif");// set the colours$cool = imagecolorallocate($image, 87, 87, 87);$black = imagecolorallocate($image, 0, 0, 0);$white = imagecolorallocate($image, 255, 255, 255);$red = imagecolorallocate($image, 255, 0, 0);$grey = imagecolorallocate($image, 204, 204, 204);$green = imagecolorallocate($image, 206, 129, 18);$blue = imagecolorallocate($image, 0, 0, 255);// counter$info = "$today - You are $dns ($ipad)";$counter = "$visits test";// define quote$quote = $getquote;// line style line$line = "__________________________________________________________________";// set the font and print text$font = 'verdana.ttf';ImageTTFText ($image, 10, 0, 45, 35, $white, $font, $quote);ImageTTFText ($image, 8, 0, 27, 101, $white, $font, $info);ImageTTFText ($image, 8, 0, 27, 105, $white, $font, $line);ImageTTFText ($image, 8, 0, 27, 118, $white, $font, $counter);// output and destroyimagepng($image);imagedestroy($image);?>Thanks ... this is a greate place Regards Jeffi80 Link to comment Share on other sites More sharing options...
gamehead200 Posted March 5, 2005 Share Posted March 5, 2005 Its all in the thread... Go back to some of the previous posts and you'll find it! Also, why are you logging IPs?? Link to comment Share on other sites More sharing options...
Jeffi80 Posted March 5, 2005 Share Posted March 5, 2005 Its all in the thread... Go back to some of the previous posts and you'll find it! Also, why are you logging IPs?? <{POST_SNAPBACK}>This is only for testing , thats all ... I will remove IP logging when I get all work.RegardsJeffi80 Link to comment Share on other sites More sharing options...
tj007s13 Posted March 6, 2005 Share Posted March 6, 2005 i tried that htaccess thing to make it read my jpg as a php file but its not working...i can get it to work as a .php....plz help Link to comment Share on other sites More sharing options...
Flynn Posted March 8, 2005 Share Posted March 8, 2005 i tried that htaccess thing to make it read my jpg as a php file but its not working...i can get it to work as a .php....plz helpI suggest contacting your hosting company and asking if the htaccess files is parsing correctly or if they have it block...My signature went down a few weeks ago for no reason, and after some less then pleasent emails back and forth with the hosting company when they explained that they disabled many of the htaccess features on the settings they decided were security risk without any notification... After some emails asking them to list exactly and all inclusive of the features that were blocked as I felt the claims of "full featured" hosting that I was paying for was a stretch when they are blocking basic htaccess stuff... Magically my signature started to work again without explantion...I suspect that people that are having issues with the parsing of a jpg as a php contact the hosting company and ask what's up...And to touch on the people that have expressed concern over the use of signatures like this... I will let you know that this image is no different then any other attached image in a post or website... I can simply attach a dedicated 1x1 pixel dot to a post and harvest server logs all day long, with the same info, if that is what you want to, using php to echo the information back is no more spyware or security breach then anything else on the Internet... Link to comment Share on other sites More sharing options...
tj007s13 Posted April 2, 2005 Share Posted April 2, 2005 i got it to work but i used another command in htaccess...AddHandler php-script .jpg Link to comment Share on other sites More sharing options...
Recommended Posts