Jump to content

How to make a dynamic signature (IP sig)


gamehead200

Recommended Posts

Okey dokey lil’ smokies, ya'll discard my prior posts in this here thread, my issues seem to be resolved, (in another forum, BTW.) Posting if anybody else needs to know. As getting assistance here is apparently like pulling teeth.

[ QUOTE ]

ImageTTFText ($image, 10, 0, 10, 17, $green, $font, "Place Text Here: "); 
ImageTTFText ($image, 10, 0, *, 17, $PlaceNewColorCodeVarHere, $font, $PlaceVarNameHere);
// Replace the * with the number of pixels between the left side of the image and the start of the number.

[ /QUOTE ]

[ INSERT SARCASM ] Again, thanks you all for your wonderful help and attitudez onboard this here MSFN board, outstanding work guyz, ya'll r just sooo l33t! w00t! w00t! U go boyz! laff … These forums are actually eerily similar to calling MS tech support, lolol, newayz I am so outtie, kthxbye [ /INSERT SARCASM ] :hello:

Link to comment
Share on other sites


Okey dokey lil’ smokies, ya'll discard my prior posts in this here thread, my issues seem to be resolved, (in another forum, BTW.) Posting if anybody else needs to know. As getting assistance here is apparently like pulling teeth.

[ QUOTE ]

ImageTTFText ($image, 10, 0, 10, 17, $green, $font, "Place Text Here: "); 
ImageTTFText ($image, 10, 0, *, 17, $PlaceNewColorCodeVarHere, $font, $PlaceVarNameHere);
// Replace the * with the number of pixels between the left side of the image and the start of the number.

[ /QUOTE ]

[ INSERT SARCASM ] Again, thanks you all for your wonderful help and attitudez onboard this here MSFN board, outstanding work guyz, ya'll r just sooo l33t! w00t! w00t! U go boyz! laff … These forums are actually eerily similar to calling MS tech support, lolol, newayz I am so outtie, kthxbye [ /INSERT SARCASM ] :hello:

I hope you realize we all have lives away from this board and more than half our time is spent AWAY from MSFN. I am currently still in school and don't have much time to reply to or even discuss stuff like this on a daily basis; I just don't have the time to go through every single post and make sure that every single little thing is taken care of during every single second of every day; that's why we have more than one moderator.

Your sarcasm is not welcome here if that's the way you're going to be. And you shouldn't be saying something such as "OMFG!!! A MOD DISSING WINDOZE!!" either because we all have our personal opinions regarding technology. It's not too surprising in my opinion to see someone saying something of that sort, and I'm sure my fellow colleagues would agree with me.

In either case, I'm glad you resolved your problem, but behaviour of that sort (sarcasm towards others) will not be tolerated here. Seeing as you are a new member here, I suggest you take another good read at the rules located beneath the MSFN logo before continuing to post. Something you might have missed:

7.b This community is built upon mutual respect. You are not allowed to flame other members. People who do not respect personal opinions and/or personal work will be warned in first instance. If you ignore the warning and keep on flaming, you will be banned without notice.

If you feel the need to reply to this small bit of information, please feel free to PM me. Do NOT, under any cirumstances, reply to this post in this thread.

Link to comment
Share on other sites

  • 2 weeks later...

This is a great topic and I thank you for sharing it.

I have it working as intended, but I want to make it more dynamice and change some of the Text in the Image when I read a XML file.

Any chance I can post my code (that isn't working) and have some see if they can spot my error?

Link to comment
Share on other sites

This is a great topic and I thank you for sharing it.

I have it working as intended, but I want to make it more dynamice and change some of the Text in the Image when I read a XML file.

Any chance I can post my code (that isn't working) and have some see if they can spot my error?

Go right ahead. I'll try to look at it when I get back home later tonight or tomorrow when I have a chance. :)

Link to comment
Share on other sites

Thanks for the reply, I think I have it worked out.

For some reason, when I was moving the XML data into a variable to be used, some of the data that was passed was blank (not sure why). So when I tried to use that Variable, it would not display anything and I assumed it wasn't working.

When I decided to try using an ARRAY instead, then I noticed every other array field was blank, so data was only in 0, 2, 4 & 6. I'm still not sure why, but at least it's working.

This is a great topic and I thank you for sharing it.

I have it working as intended, but I want to make it more dynamice and change some of the Text in the Image when I read a XML file.

Any chance I can post my code (that isn't working) and have some see if they can spot my error?

Go right ahead. I'll try to look at it when I get back home later tonight or tomorrow when I have a chance. :)

Link to comment
Share on other sites

Thanks for the reply, I think I have it worked out.

For some reason, when I was moving the XML data into a variable to be used, some of the data that was passed was blank (not sure why). So when I tried to use that Variable, it would not display anything and I assumed it wasn't working.

When I decided to try using an ARRAY instead, then I noticed every other array field was blank, so data was only in 0, 2, 4 & 6. I'm still not sure why, but at least it's working.

This is a great topic and I thank you for sharing it.

I have it working as intended, but I want to make it more dynamice and change some of the Text in the Image when I read a XML file.

Any chance I can post my code (that isn't working) and have some see if they can spot my error?

Go right ahead. I'll try to look at it when I get back home later tonight or tomorrow when I have a chance. :)

It's possible you set your code to use a delimiter without a space (making the space a value), when in fact, the delimiter contained a certain character AND a space.

Post your code and the XML data you were trying to grab. I have a feeling this is what the problem was.

Link to comment
Share on other sites

Here is the code I have working now, you can see where I'm only using every other Array. I actually had 4 different variables before I changed it to the one $pilot array, and I would move each value under name/flights/hours/miles into variables $pname/$flights/$hours/$miles.

Edited by RevRaz
Link to comment
Share on other sites

Thanks, I'm still puzzled on how blanks are getting in there. Should I add a check to ignore the value if it's blank or a space?

Also about the quotes, I removed some paths after I pasted, so I probably just deleted it by accident here, but the code is correct on the server.

Link to comment
Share on other sites

Thanks, I'm still puzzled on how blanks are getting in there. Should I add a check to ignore the value if it's blank or a space?

Also about the quotes, I removed some paths after I pasted, so I probably just deleted it by accident here, but the code is correct on the server.

Try adding the check and see what happens. That is really weird. :}

Link to comment
Share on other sites

  • 4 months later...

Hi i'm trying to get this part to show up but I guess I must be doing something wrong cause i get a bland box.

could someone let me know what I may be doing wrong,.. I do have the .htaccess part done already.

gd

GD Support enabled

GD Version bundled (2.0.28 compatible)

FreeType Support enabled

FreeType Linkage with freetype

GIF Read Support enabled

GIF Create Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled

XBM Support enabled

// 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

*/

Edited by bullboykennels
Link to comment
Share on other sites

Hi there, having problems with it, I used your samples from the main post, and I uploaded them onto my host, and all I can see when I look at the image is a blue box, is this what I'm meant to be seeing, or what?

Also, say I wanted to add the show the persons browser thing, where would I put the coding, which place, I know in the mysig.jpg file, but where in it? Does it have to go over the top of something?

And finally, as far as I can tell I have Apache and GD on my host, here: www.primehabbo.com/phpinfo.php .

Thanks.

Link to comment
Share on other sites

@Sir.Frogster - You'll have to edit the given sample files to give the proper path to the font files. Otherwise, the script won't find the font and won't be able to insert it into the image.

Link to comment
Share on other sites

Hi there, having problems with it, I used your samples from the main post, and I uploaded them onto my host, and all I can see when I look at the image is a blue box, is this what I'm meant to be seeing, or what?

Like Zxian mentioned, you have to edit the path to your font. It should usually be something like /home/username/public_html/sig/font.ttf. If that doesn't work, just try putting in the name of the font file (font.ttf).

Also, say I wanted to add the show the persons browser thing, where would I put the coding, which place, I know in the mysig.jpg file, but where in it? Does it have to go over the top of something?

It should go somewhere before you start parsing the text (before the ImageTTFText lines).

And finally, as far as I can tell I have Apache and GD on my host, here: www.primehabbo.com/phpinfo.php .

Yes, it's installed! :thumbup

Thanks.

No problem. :)

Link to comment
Share on other sites

  • 2 weeks later...

Hey, Im kinda new to Php. Just a few questions.

After Ive found a host site how do I host my picture there. Like for the one sir.frogster was using. What do I do once im there lol.

And what do I upload, the htaccess thing or the mysig.jpg thing.

Im a noob i know lol, but itd be greatly appreciated if you could help me!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...