Jump to content

tawxic

Member
  • Posts

    35
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by tawxic

  1. tawxic

    IP Sig

    now it wont show anything but a red x again (when viewed as a php file) and nothing at all as a jpg (but you can view source my code).. this is frustrating... it should work fine... my about-bg.gif: my siggy.php code: <?php Header ('Content-type: image/png'); 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 = imagecreatefromgif("/var/www/html/signature/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 $viewss = file("/var/www/html/signature/views.txt"); $views = $viewss[0]; $views++; $fp = fopen("/var/www/html/signature/views.txt", "w"); fwrite($fp, $views); fclose($fp); $counter = "Phazm Graphics - $views people served since 11/5/03!"; // define geek code $nerd = "-----BEGIN NERD CODE BLOCK----- Version: 1.2a 010011010111100100100000011100110110100101100111 011001110111100100100000011101110110100101101100 011011000010000001110011011011110110111101101110 001000000111001001101111011000110110101100100001 00100000 ------END NERD CODE BLOCK------"; // line style line $line = "________________________________________________________"; // set the font and print text $font = '/var/www/html/verdana.ttf'; ImageTTFText ($image, 8, 0, 12, 45, $black, $font, $nerd); ImageTTFText ($image, 8, 0, 12, 148, $black, $font, $line); ImageTTFText ($image, 8, 0, 12, 180, $black, $font, $counter); // output and destroy imagepng($image); imagedestroy($image); ?> (note that I tried using relative links again, no difference that I could see) and that's really all I need to have... htaccess would be if I viewed it a a jpg, so it opened it as a php document instead of a jpg file.. but It already has a php extension... (I added it anyway)
  2. tawxic

    IP Sig

    Can you do me a fav? d/l http://www.phazm.net/siggy.rar and u/l it to your own webspace? (just the 3 files) so I can see if it's a compatibility issue with my hoster?
  3. tawxic

    IP Sig

    I added what tou said to htaccess... still isn't parsing http://www.phazm.net/signature/siggy.jpg
  4. tawxic

    IP Sig

    siggy.php :: <? Header ('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'); $COUNT_FILE = "hitcounter.dat"; if (file_exists($COUNT_FILE)) { $fp = fopen("$COUNT_FILE", "r+"); flock($fp, 1); $count = fgets($fp, 4096); $count += 1; fseek($fp,0); fputs($fp, $count); flock($fp, 3); fclose($fp); } else { echo "Can't find file, check '\$file'<BR>"; } // set the dimensions $img_width = 240; $img_height = 25; // create the image $image = imagecreate($img_width, $img_height); // 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 background colour and border imagefilledrectangle($image, 0, 0, $img_width, $img_height, $blue); // set the font and print text $font = '/var/www/html/verdana.ttf'; // ImageTTFText ($image, 8, 0, 10, 17, $black, $font, "Your IP Address is... ".$visitors); ImageTTFText ($image, 8, 0, 10, 17, $black, $font, "Views: ".$count); // output and destroy imagepng($image); imagedestroy($image); ?> END This will just put a blue bar with a nice counter on there (if you have the hitcounter.dat file in the same dir) example: http://www.phazm.net/signature/siggy.php
  5. tawxic

    IP Sig

    hey, a bit off topic maybe, but related... I want to add the CLIENT time in my sig, but I can't think of a way to get the client time in PHP, and I don't think I can use javascript in the image, can I? if no, what are my possible solutions, if any?
  6. tawxic

    IP Sig

    woot! okay, adding the full path worked... I now have it working, but only under a .php file.. when I rename it to .jpg or .png and add the neccisary .htaccess file, it's just a blank page, with the php source in the source of the document.. without the .htaccess file telling it to act as if it were php, it displays the php source in the window, so it seems as if the file just isn't loading as if it was php.... suggestions? (this board doesn't allow the .php extension for img tags :-/
  7. tawxic

    IP Sig

    well, I got http://www.phazm.net/siggy.php to draw a bg color... (I just went in and changed some php.ini settings) but it doesn't write any text.
  8. tawxic

    IP Sig

    I just hate .htaccess only ave what you said to (with my own filename): <Files siggy.jpg> ForceType application/x-httpd-php </Files> and I made siggy.jpg: <?php Header ('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'); // set the dimensions $img_width = 240; $img_height = 25; // create the image $image = imagecreate($img_width, $img_height); // 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 background colour and border imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool); // 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 destroy imagepng($image); imagedestroy($image); ?> and it just comes up with a blank page: http://www.phazm.net/siggy.jpg gah! :-P
  9. tawxic

    IP Sig

    http://www.phazm.net/phpinfo.php GD is enabled :-/ and .htaccess is fine, I renamed the file to a .php (http://www.phazm.net/siggy.php) and it's just the red x :-/
  10. tawxic

    IP Sig

    When I do this, it just shows me a blank page (both versions of scripts) - I think my hoster might be incompatible, but I don't know with what.. it can use PHP just fine... any suggestions? Here is what I have: .htaccess : Options None <Limit GET POST> order deny,allow deny from all allow from all require group authors administrators </Limit> <Limit PUT DELETE> order deny,allow deny from all </Limit> AuthType Basic AuthName www.phazm.net AuthUserFile xxxx/service.pwd AuthGroupFile xxxx/service.grp <Files siggy.jpg> ForceType application/x-httpd-php </Files> then in siggy.jpg I have: <?php Header ('Content-type: image/png'); 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 destroy imagepng($image); imagedestroy($image); ?> then in bg.png I have a pure black BG, and I have Arial.ttf in the same dir as everything else...
×
×
  • Create New...