Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
0 user currently in Programming. | 3 guests |
Acmlm's Board - I2 Archive - Programming - w00t, my first PHP script | | | |
Pages: 1 2 | Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1120/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Check it out. It shows your IP. A simple one-line script, but hey, I never made one before. (If you're wondering about the div stuff, I use it in an iframe on my home page (a local HTML file) so I wanted it to be as much in the top left corner as possible.) ...Please don't kill my bandwidth with it. |
|||
Prier Archangel Administrative Priestess. NUCLEAR SUB WEEEOOOO Level: 119 Posts: 1464/8392 EXP: 18790939 For next: 138352 Since: 03-15-04 From: Nerima Dist. - Tokyo, Japan Since last post: 1 day Last activity: 1 day |
| ||
I couldn't see how with plain text. You ought to try putting that in an image, I mean I've seen some people use similar scripts in their sig. 'You are 255.255.255.255. You need hit over the head with a large sack of shit.' et cetera et cetera... |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1121/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
How what? How I put it on another page? < (edited by HyperHacker on 06-24-04 05:45 AM) |
|||
Darth Coby Vire Dacht je nou echt dat het over was? Dacht je nou echt dat ik gebroken was? Nee toch? Nou kijk eens goed op uit je ogen gast. zonder clic heb je geen kloten tjap... bitch Level: 55 Posts: 621/1371 EXP: 1240774 For next: 73415 Since: 03-15-04 From: Belgium Since last post: 2 days Last activity: 9 hours |
| ||
Originally posted by HyperHacker < header("Content-type: image/png"); $im = @imagecreate(75, 15) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 1, 5, 5, "A Simple Text String", $text_color); imagepng($im); imagedestroy($im); ?> That's what you're looking for. To make it show your IP you can just replace the "A simple text string" with $REMOTE_ADDR. (imagestring($im, 1, 5, 5, $REMOTE_ADDR, $text_color); (edited by Coby on 06-24-04 06:02 AM) (edited by Coby on 06-24-04 06:37 AM) |
|||
Modereb Paragoomba Level: 15 Posts: 32/75 EXP: 14749 For next: 1635 Since: 06-04-04 Since last post: 350 days Last activity: 339 days |
| ||
...You made a whole thread just because you used $REMOTE_ADDR? Please... | |||
Kwan Doesn't have a valid sized userpic. ||bass will be pissed :(((((((( Level: 50 Posts: 619/1137 EXP: 937111 For next: 10206 Since: 03-15-04 From: Durkadurkastan! Since last post: 22 days Last activity: 2 days |
| ||
There's a programming forum for this. Use it. | |||
Elric Chasupa Currently Playing: You Like A Lute. Level: 40 Posts: 239/687 EXP: 440016 For next: 1293 Since: 03-15-04 From: Melniboné Since last post: 6 hours Last activity: 6 hours |
| ||
Hmm... Heh. That was easy. Now, if I wanted to make the image say, "Your IP Adress Is x.x.x.x", how would that work? I'm thinking it would be something like this: imagestring($im, 1, 5, 5, "Your IP Address Is ".$REMOTE_ADDR.", $text_color); Is that right, or would that screw it up? Bah, I'll just try it now... Nope. Didn't work. Didn't think it would... |
|||
Gavin Fuzzy Rhinoceruses don't play games. They fucking charge your ass. Level: 43 Posts: 72/799 EXP: 551711 For next: 13335 Since: 03-15-04 From: IL, USA Since last post: 13 hours Last activity: 13 hours |
| ||
Originally posted by Modereb as he said, it's his first testing with PHP. if you don't have something nice to say, don't say anything at all anyway HH: looking pretty cool. From there you can use $REMOTE_ADDR to make a fun counter script for unique IP addresses if you're really bored and looking for something new to test |
|||
Modereb Paragoomba Level: 15 Posts: 35/75 EXP: 14749 For next: 1635 Since: 06-04-04 Since last post: 350 days Last activity: 339 days |
| ||
Originally posted by ElricThat's because apperantly, you still need a syntax lesson: imagestring($im, 1, 5, 5, "Your IP Address Is ".$REMOTE_ADDR."", $text_color); -OR- imagestring($im, 1, 5, 5, "Your IP Address Is ".$REMOTE_ADDR, $text_color); -OR- imagestring($im, 1, 5, 5, "Your IP Address Is $REMOTE_ADDR", $text_color); (edited by Modereb on 06-24-04 05:39 PM) |
|||
Xtreme984 Koopa Level: 18 Posts: 1/111 EXP: 25164 For next: 4733 Since: 07-27-04 Since last post: 116 days Last activity: 58 days |
| ||
How can I make the images background color transparant EDIT: Nevermind. in this case use imagecolortransparant($im, $background_color); (edited by Xtreme984 on 07-27-04 04:14 AM) (edited by Xtreme984 on 07-27-04 04:51 AM) |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1370/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Well since this thread is still here... I want to be able to check my IP remotely. I've installed TightVNC so I can do stuff like transfer files to whatever computer I'm actually using, but it doesn't do much good if I don't have the IP. What I thought I'd do is write a PHP script that writes the most recent IP to a file (clearing whatever used to be in the file). Using WinXP's ability to use HTML files as a desktop image without screwing everything up, I figured I'd simply make the background contain a reference to the file via image tag or some such thing. (Whenever the desktop loads, it tries to load the PHP file, which executes it.) So how can I do this? (In short: I need to know how to delete a file or clear its contents and write a variable to it. Also, for unrelated stuff, I'd like to know how to catch parameters in URLs, like '?something=pie&anotherthing=toast'.) | |||
Xkeeper The required libraries have not been defined. Level: NAN Posts: -3428/-863 EXP: NAN For next: 0 Since: 03-15-04 Since last post: 2 hours Last activity: -753366 sec. |
| ||
Originally posted by Ranko Couldn't resist. Oh, and to answer: $variable_omg = fopen("file name, stupid.blah","w"); fwrite($variable_omg, $variable_you_morons); fclose($variable_omg); foo and bar are too overused. (edited by Xkeeper on 08-05-04 02:47 AM) (edited by Xkeeper on 08-05-04 02:49 AM) |
|||
Xtreme984 Koopa Level: 18 Posts: 4/111 EXP: 25164 For next: 4733 Since: 07-27-04 Since last post: 116 days Last activity: 58 days |
| ||
I've made another cool signature thing |
|||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 926/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
Xtreme984: It's nice. I wish I could do things like that (well, I can but not at that level). | |||
Xtreme984 Koopa Level: 18 Posts: 5/111 EXP: 25164 For next: 4733 Since: 07-27-04 Since last post: 116 days Last activity: 58 days |
| ||
thanks DarkSlayr, I'm now trying to make it so the dialog has a random avatar at refresh or reload, actually what do you mean with at that level? (edited by Xtreme984 on 08-05-04 11:33 AM) (edited by Xtreme984 on 08-05-04 12:30 PM) |
|||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 931/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
Originally posted by Xtreme984 I know how to mess with PHP & GD but not that much, I can make simple text but no pics for signature. |
|||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 1420/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
Originally posted by Xkeeper Cool, thanks. |
|||
Xtreme984 Koopa Level: 18 Posts: 6/111 EXP: 25164 For next: 4733 Since: 07-27-04 Since last post: 116 days Last activity: 58 days |
| ||
I know how to mess with PHP & GD but not that much, I can make simple text but no pics for signature. I just learned how to use the function: imagecreatefrompng(); the rest is the same. I have now succeeded in getting the avatar to be random, need some more avatars ripped from Megaman Battle Network 4. EDIT: now added a random quote function (edited by Xtreme984 on 08-06-04 05:18 AM) |
|||
ProtoGuts Newcomer Level: 6 Posts: 2/9 EXP: 574 For next: 333 Since: 08-06-04 Since last post: 433 days Last activity: 339 days |
| ||
Xtreme984... Just thought I'd let you know that your thing in your sig doesn't show my ip... it show's someone else's... | |||
DarkSlaya POOOOOOOOOOOORN! Level: 88 Posts: 972/4249 EXP: 6409254 For next: 241410 Since: 05-16-04 From: Montreal, Quebec, Canada Since last post: 8 hours Last activity: 5 hours |
| ||
Originally posted by ProtoGuts Weird, it shows mine. I even tested it. |
Pages: 1 2 | Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Programming - w00t, my first PHP script | | | |