Content Type
Profiles
Forums
Events
Everything posted by gamehead200
-
You can't really put someone's resolution in a signature without having them go to another site to store it in a cookie.
-
He has his own little *nix laptop hidden under his bed that he uses at night!
-
The code is working fine on my machine... I will even start my Mac's webserver to see if its a Mac problem... BRB...
-
<{POST_SNAPBACK}> Just move the following up to before it says "set background colour": // 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);
-
OK, I want you to try two more things... First, put this in: // get IP $ip = $_SERVER['REMOTE_ADDR']; $text = "Your IP address is $ip!"; // replace this part ImageTTFText ($image, 8, 0, 10, 17, $white, $font, $text); If that doesn't work, change your font to just the font name. Example: $font = 'verdana.ttf'; If that doesn't work, well, I really don't know what will...
-
No wonder its not working! You should have your font file set as: $font = '/Volumes/Server/htdocs/Signature/Caleu.ttf'; And not: /Volumes/Server/htdocs/Signature/Caleu.ttf
-
I don't see anything wrong with your configuration... Try getting rid of those weird characters in your code...
-
OK... Do the following: Create a PHP file called phpinfo.php and put the following code in it: <?php phpinfo(); ?> Then post the link to this PHP file so I can take a look at what it outputs.
-
A while back, one of my PSUs blew with lots of smoke but it still kept working (weirdly enough)... After it blew up a second time, it got fried... Luckily, none of the components got friend...
-
OK, when I opened up the link in IE, I realized that all of your code was showing. The server is not parsing the file as a PHP file either because there's a configuration problem or because you did not put the .htaccess file. If you go into your terminal and ls the Signature folder, what files show up? Most of the time, it doesn't matter how you tell the server where your font file is... But, its usually better to include the whole path... BTW, open up your mysig.jpg file and make sure you save it as just Text. You have random letters with accents everywhere... Example: $blue Ê= imagecolorallocate($image, 0, 0, 255); Try using the sample files I just uploaded.
-
Believe it or not, Bob and his friends were made with pretty much everything on this page. Even Jeremy, the guy in my sig. Right, Chris?
-
All questions, comments, and suggestions should now be directed to this topic: http://www.msfn.org/board/index.php?showtopic=47730 [ Topic closed. ]
-
EDIT: For everyone's benefit, I have released my original "Jeremy" signature (i.e., the source code, graphics, etc.) under a GPL license. Use it as you wish. Grab it here! ----- For this tutorial, the server you will be using MUST have Apache and the GD plugin for PHP installed. You must have some experience using PHP. We will start by opening Notepad (or your favourite text editor) and creating a new file called .htaccess. The name of the signature we will be using will be mysig.jpg. In the .htaccess file, put the following: <Files mysig.jpg> ForceType application/x-httpd-php </Files> This will tell the server to parse the mysig.jpg file as a PHP file. Save this file in a folder where you will also place the other files. Now, open your text editor and create your signature file, mysig.jpg. Put the following in it: <?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 // number or is top left pixel x, top left pixel y, bottom right pixel x, bottom right pixel y imagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool); // set the font and print text $font = '/path/to/your/ttf/font/verdana.ttf'; // now i will create a line with font size 8, with no angle, 10 pixels to the right, and 17 pixels down ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR); // the above will display your IP address // output and destroy imagepng($image); imagedestroy($image); ?> If you don't want the server to create the image for you, you can always create an image in Photoshop and use it as your background. <?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'); // create the image using your own background $image = imagecreatefromjpeg("background.jpg"); // dimensions of the image used $img_width = 240; $img_height = 25; // 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 = '/path/to/your/ttf/font/verdana.ttf'; // now i will create a line with font size 8, with no angle, 10 pixels to the right, and 17 pixels down ImageTTFText ($image, 8, 0, 10, 17, $white, $font, "Your IP Address is... ".$REMOTE_ADDR); // the above will display your IP address // output and destroy imagepng($image); imagedestroy($image); ?> Those are the basics. You can do so much with PHP! Want to use a hit counter for your sig? Use this piecee of code in your signature: // counter - CHMOD your counter file to 777 $viewss = file("/path/to/your/counter/file/views.txt"); $views = $viewss[0]; $views++; $fp = fopen("/path/to/your/counter/file/views.txt", "w"); fwrite($fp, $views); fclose($fp); $counter = "$views people viewed this since 11/5/03!"; Want a different message to appear everytime your sig is loaded? Use this in your code: // set quote file $quotes = file('quotes.txt'); $quote = array_rand($quotes); $joke = wordwrap($quotes[$quote], 60, "\n", 1); $joke = explode("\n", $joke); // this part goes where the rest of the output is done for($i=0; $i<count($joke); $i++) { ImageTTFText ($image, 8, 0, 14, (23+($i*15)), $white, $font, $joke[$i]); } Want to output someone's browser, IP, and resolved IP? Use this in your code: // get IP and resolve IP $ip = $REMOTE_ADDR; $resolved = gethostbyaddr ($REMOTE_ADDR); // check for non resolve of IP and rip domain if resolved if ($resolved == $ip) { $isp = ".. Can't Resolve IP"; } else { $str = preg_split("/\./", $resolved); $i = count($str); $x = $i - 1; $n = $i - 2; $isp = $str[$n] . "." . $str[$x]; } // Simple OS Detection $os = $HTTP_USER_AGENT; $oslist = Array ( // Windows "Win|Windows", "Win16|Windows", "Win95|Windows 95", "Win98|Windows 98", "WinME|Windows ME", "Win32|Windows", "WinNT|Windows NT", "Windows 3.1|Windows 3.1", "Windows 95|Windows 95", "Windows CE|Windows CE", "Windows 98|Windows 98", "Windows ME|Windows ME", "Windows NT|Windows NT", "Windows NT 5.0|Windows 2000", "Windows NT 5.1|Windows XP", // Macintosh "Mac_68000|MacOS m68K", "Mac_68K|MacOS m68K", "Mac_PowerPC|MacOS PPC", "Mac_PPC|MacOS PPC", "Macintosh|MacOS", // Unices "X11|UNIX", "BSD|BSD", "SunOS|SunOS", "IRIX|IRIX", "HP-UX|HP-UX", "AIX|AIX", "QNX|QNX", "SCO_SV|SCO UNIX", "FreeBSD|FreeBSD", "NetBSD|NetBSD", // Linux "Linux|Linux", "Debian|Debian GNU/Linux", // Other "BeOS|BeOS", "OS/2|OS/2", "AmigaOS|AmigaOS", ); foreach ($oslist as $osnow) { $osnow = explode ("|", $osnow); if (eregi ($osnow[0], $os)) { $endos = $osnow[1]; $check = "No"; } elseif ($check != "No") { $endos = "Unknown"; } } /* to output the OS, use $endos to output the IP, use $ip to output the resolved IP, use $resolved */ Want to output someone's browser? Use this code: //browser type $agent = $HTTP_USER_AGENT; if ( strstr($agent, "MSIE 5") ) $browser = "using IE 5"; elseif ( strstr($agent, "MSIE 6") ) $browser = "using IE 6"; elseif ( strstr($agent, "MSIE 4") ) $browser = "using IE 4"; elseif ( strstr($agent, "Firebird") ) $browser = "using Firebird"; elseif ( strstr($agent, "Safari") ) $browser = "using Safari"; elseif ( strstr($agent, "Mozilla/5") ) $browser = "using Mozilla/Netscape 5"; elseif ( strstr($agent, "Mozilla/6") ) $browser = "using Netscape 6"; elseif ( strstr($agent, "Mozilla/4") ) $browser = "using Netscape 4"; elseif ( strstr($agent, "Opera") ) $browser = "using Opera"; else $browser = ""; // to output the browser, use $browser Want to use a different background everytime? Use this code: // random background $random_image = array("", "bg1.jpg", "bg2.jpg", "bg3.jpg", "bg4.jpg"); srand ((double) microtime() * 1000000); $rnd = rand(1,4); // create the image $image = imagecreatefromjpeg($random_image[$rnd]); Good luck to all coders! Any comments, suggestions, and questions are appreciated! NOTE: I have attached a sample mysig.jpg and .htaccess file. sample.zip
-
I will create a new thread very soon with full instructions on how to make a dynamic signature. The .htaccecss file should go in the same folder as your dynamic signature.
-
Oh, the memories... I hadn't registered at that point...
-
Please direct all your questions to this topic: http://www.msfn.org/board/index.php?showtopic=47480 Thank you. [ Topic closed. ]
-
Its just this laptop that it happens with. I can boot Knoppix. I just booted a Windows 98 CD (I made the CD bootable) and I was able to install it fine. I'm using an nLited CD. As I mentioned before, I tried my nLited Windows 2000 CD and it gave me the same message. Both CDs WORK on other computers. I also tried other XP CDs, and none of them work. I guess its just the laptop. After all, it is about 10 years old. (Pssst... I've installed XP on an 8 year laptop and a 233 without a problem. ) nospek, please do not talk about pirated software at MSFN. It is against the rules.
-
Dude, I'd run this! Make us a list of the files left!
-
Whenever I try booting from my Windows XP CD on one of my laptops, I get a CD ERROR: Could not find NTLDR. I've tried this with a few CDs as well as my Windows 2000 CD. Any ideas?
-
OMG!! BUY IT!!! That's a great deal!!
-
There's a whole bunch of Froogle... Don't know if you've checked it out... http://froogle.google.com/froogle?q=the+ea...=Search&as_qdr= Also, check eBay!
-
That is completely untrue. I just used TextEdit on my iBook to create a hidden .htaccess file.
-
Anything with a . in front of it on a Mac will automatically be hidden. You can still create the .htaccess file. It will still work!
-
Tips For Google?
gamehead200 replied to MonkH's topic in Programming (C++, Delphi, VB/VBS, CMD/batch, etc.)
No need for the + signs in Google... -
Nice one!