Zxian Posted May 28, 2007 Posted May 28, 2007 You'll need both the htaccess file and the filename of the image that you want. The only catch is that the "image" will actually be a PHP script.
Emissary77 Posted June 14, 2007 Posted June 14, 2007 How do you make a dynamic sig that reads information from a website highscores? For online gaming clans etc...so the sig shows their kill xp combat lvl etc...
NutsAndyy Posted September 13, 2007 Posted September 13, 2007 (edited) I've just tried following this tutorial and it hasn't completely worked.At the moment I have the basic code with a few alterations for the font and what not, but all the page will display is the location of its self on my domain instead of an actual image.Ive found one weird thing though, if i comment out / delete the "ImageTTFText($image, 8, 0, 10, 17, $white, $font, $text);" line, it will crete an image as its supposed to, but without the text. Also, when i view the page in IE (with the code there) it shows an error about the "ImageTTFText". I have tried a few things including altering the case of some things and a few file paths for the font, but it doesn't seem to be working.Here is the current code:<?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');$ip = $_SERVER['REMOTE_ADDR'];$text = "Your IP address is $ip!";// set the dimensions$img_width = 240;$img_height = 100;// 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 yimagefilledrectangle($image, 0, 0, $img_width, $img_height, $cool);// set the font and print text$font = '/usr/local/psa/home/vhosts/mydomain.co.uk/httpdocs/sig/ozhandin.ttf';// now i will create a line with font size 8, with no angle, 10 pixels to the right, and 17 pixels downImageTTFText($image, 8, 0, 10, 17, $white, $font, $text);// the above will display your IP address// output and destroyimagepng($image);imagedestroy($image);?>EDIT:Okay problem solved!. It turns out that making the file path for the font to just ozhandin.ttf cured it. I realy thoguht i'd tried every possibility. Guess not, and sorry for reviving, maybe this could serve as a reminder to check through everything more than 10 times Edited September 13, 2007 by NutsAndyy
Futurist Posted April 25, 2008 Posted April 25, 2008 hey, i make something but all info is in one row! how to fix that?and one more question.. any way for random font?sry for English and thanks
gamehead200 Posted April 26, 2008 Author Posted April 26, 2008 hey, i make something but all info is in one row! how to fix that?and one more question.. any way for random font?sry for English and thanksHi Futurist,First off, welcome to MSFN! To not make everything in one row, add \n where you want the row to end and everything will then appear on the row below it.For a random font, remove this line:$font = '/path/to/your/ttf/font/verdana.ttf';And replace it with this piece of code:$random_font = array('', '/path/to/your/first/font.ttf', '/path/to/your/second/font.ttf', '/path/to/your/third/font.ttf', '/path/to/your/fourth/font.ttf');srand ((double) microtime() * 1000000);$rnd = rand(1,count($random_font)-1);$font = $random_font[$rnd];Hope it works! If not, post back here with the error you get and/or a screenshot of what you're getting and I'll reply back.
Futurist Posted April 27, 2008 Posted April 27, 2008 thanks.. workingbut how can i go to next row in random message?i haveTest1Test2Test3Test4, Test5i want test5 in new row, possible?
gamehead200 Posted April 27, 2008 Author Posted April 27, 2008 thanks.. workingbut how can i go to next row in random message?i haveTest1Test2Test3Test4, Test5i want test5 in new row, possible?Yes, it is. You can add a line break in the message like this:Test4, \nTest5
Futurist Posted May 1, 2008 Posted May 1, 2008 thanks i will tryanyone have newest list of OS? because when someone have vista, writes XP
shakala Posted May 28, 2008 Posted May 28, 2008 Alright. I am not sure if you would do this for me but it would be highly appreciated. Could you put this xml file from this site ---> http://ladderslasher.d2jsp.org/xmlChar.php?i=92170 onto a dynamic signature? you seem to know what you are doing and i have been messing around with the code and a bunch of other sites and i just cant get it. I have already gone and deleted what i had because i had given up . I the came to this forum and i thought i might ask. If this is possible please e-mail me at bballkid192837@aol.com http://ragnarok.lilfade.com/ls/shotkill.png/ This is an example of what i have been looking for. please send the PHP file to my email if you are able to do this.
Futurist Posted June 23, 2008 Posted June 23, 2008 (edited) hello, i have a question!i have this code<?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');// Dobij sliku$slika_pret = $_GET['image'];// Dobij ime$ime_korisnika = $_GET['nick'];// Napravi sliku koristenjem postojece pozdadine$image = imagecreatefromjpeg($slika_pret);// Format datuma$date = date("F j. Y");// Razlicit font$random_font = array("", "/font/Font1.ttf", "/font/Font2.ttf", "/font/Font3.ttf", "/font/Font5.ttf");srand ((double) microtime() * 1000000);$rnd = rand(1,4);// Odredi file u kojem su poruke$quotes = file('quote.txt');$quote = array_rand($quotes);// Saznaj IP i hostame$ip = $REMOTE_ADDR;$resolved = gethostbyaddr ($REMOTE_ADDR);// Provjeri IPif ($resolved == $ip) {$isp = "can't reslove IP";}else{$str = preg_split("/\./", $resolved);$i = count($str);$x = $i - 1;$n = $i - 2;$isp = $str[$n] . "." . $str[$x];}// Jednostavna detekcija operativnog sistema$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",// Ostalo"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 $endosto output the IP, use $ipto output the resolved IP, use $resolvedto output the browser, use $browser*/// Tip preglednika $agent = $HTTP_USER_AGENT; if ( strstr($agent, "MSIE 5") ) $browser = "IE 5"; elseif ( strstr($agent, "MSIE 6") ) $browser = "IE 6"; elseif ( strstr($agent, "MSIE 4") ) $browser = "IE 4"; elseif ( strstr($agent, "Firebird") ) $browser = "Firebird"; elseif ( strstr($agent, "Safari") ) $browser = "Safari"; elseif ( strstr($agent, "Mozilla/5") ) $browser = "Mozilla FireFox"; elseif ( strstr($agent, "Mozilla/6") ) $browser = "Netscape 6"; elseif ( strstr($agent, "Mozilla/4") ) $browser = "Netscape 4"; elseif ( strstr($agent, "Opera") ) $browser = "Opera"; else $browser = "unknown";$joke = wordwrap($quotes[$quote], 60, "\n", 1);$joke = explode("\n", $joke);// Boje$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);// Font path na serveru$font = $random_font[$rnd];// Font za ime$ime_font = $random_font[$rnd];// IP adresaImageTTFText ($image, 11, 0, 10, 20, $white, $font, "Hey! Your IP is $ip,");// HostnameImageTTFText ($image, 11, 0, 10, 40, $white, $font, "your hostname is $resolved,");// PreglednikImageTTFText ($image, 11, 0, 10, 60, $white, $font, "you're using $browser,");// Operativni sustavImageTTFText ($image, 11, 0, 10, 80, $white, $font, "on $endos OS,");// DatumImageTTFText ($image, 11, 0, 10, 100, $white, $font, "today is $date");// ImeImageTTFText ($image, 17, 0, 345, 80, $white, $ime_font, "$ime_korisnika");// Poruka - Generatorfor($i=0; $i<count($joke); $i++) {ImageTTFText ($image, 10, 0, 10, 130, $white, $font, $joke[$i]);}// Otvori i Unisti slikuimagepng($image);imagedestroy($image);?>how can I make to script resize imagewith this<?php// Load image$image = open_image('flower.jpg');if ($image === false) { die ('Unable to open image'); }// Get original width and height$width = imagesx($image);$height = imagesy($image);// New width and height$new_width = 150;$new_height = 100;// Resample$image_resized = imagecreatetruecolor($new_width, $new_height);imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);// Display resized imageheader('Content-type: image/jpeg');imagejpeg($image_resized);die();?> Edited June 23, 2008 by Futurist
bax Posted June 25, 2008 Posted June 25, 2008 Hi Everyone , I Just Want To Make A Dynamic Signature , But This Looks Too Advanced For Me ... I Have 10 Signatures In png. Format , And I Want Them To Be displayed Randomely When Changing Forum , Noticing That I Have No Knowledge In Php , And I Don't Have A Website ... So Could You Please Help Me ? Thank You !!
gamehead200 Posted May 19, 2009 Author Posted May 19, 2009 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!My original post has been edited with this info.
evandro Posted July 6, 2009 Posted July 6, 2009 (edited) 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!My original post has been edited with this info.Link is OFF, fix plsssssssssssssssssssss Edited July 7, 2009 by gamehead200 Fixed link.
gamehead200 Posted July 7, 2009 Author Posted July 7, 2009 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!My original post has been edited with this info.Link is OFF, fix plsssssssssssssssssssssForgot to update it... Here is the new link (scroll down).
evandro Posted July 7, 2009 Posted July 7, 2009 Forgot to update it... Here is the new link (scroll down).THANKSSSSSSSSSSSSSSSSSSS
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now