Creating an image that shows IP.


Recommended Posts

  AresXP said:
Too bad I dont have access to neowin's mysql db (read only access, nothing such as write)... I could display the last post and last registered member on my sig :)

584711923[/snapback]

You don't need access to a db to get that information into a sig. :)

Cheers Guyss

Here is a VB Script that can get you the IP of the visitor :


<%

behindProxy = Request.ServerVariables("HTTP_X_FORWARDED_FOR")

proxy = Request.ServerVariables("REMOTE_ADDR")

if behindProxy = "" then

Response.Write "<p>Your IP address is: " & proxy & "</p>" & vbcrlf

else

Response.Write "<p>Your IP address is: " & behindProxy

Response.Write " and your proxy address is: " & proxy & "</p>" & vbcrlf

end If

%>

-Siddhs :)

Getting the IP like that doesnt work for some people behind transparent proxys(me).

Try:

<?php

header ("Content-type: image/png");

if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {

$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];

}

else {

$ip = $_SERVER['REMOTE_ADDR'];

}

$img_handle = ImageCreate (500, 20) or die ("Cannot Create image");

$back_color = ImageColorAllocate ($img_handle, 255, 255, 255);

$txt_color = ImageColorAllocate ($img_handle, 231, 43, 43);

ImageString ($img_handle, 31, 5, 5, "Your IP is $ip", $txt_color);

ImagePng ($img_handle);

?>

  • 2 weeks later...
  • 3 months later...

OK, I read through this thread and picked up some useful material. Obviously I am going to have to get more acquainted with PHP to see what else I can do, but for simplicity's sake, How do I get a script to paste just normal items, such as pre-defined text?

Basically, my idea is to create a merge of the script that shows folks their IP address with the info in my sig below (well some of it - the thread count will go) and some *more* stuff. I have my own webspace to host the script, and as can be seen here, it works some:

This is the original script posted by Ares:

script.php

This is one that he had quoted in reply #13, which doesn't seem to work, btw:

script1.php

When I load this directly in my browser I get:

The image ?http://s88013406.onlinehome.us/script1.php? cannot be displayed, because it contains errors.

And this last is the one posted by timbernerslee:

script2.php

Now, Can this method be used to paste that text as an overlay *over* another image, or added to an image, or what? I know, I know, n00b questions, but if I can learn to do this then I can learn to start making dynamic banners and such on my own - I know where to get a hold of images to to make my own, but the scripting is all new to me.

Anyone know how to have an existing image as the background, then float text and another image ontop of it..?

Edit**

Figured out how to use an existing image as a background, but cannot figure out how to float another image ontop!

-Ax

Edited by Axon
  Axon said:
Anyone know how to have an existing image as the background, then float text and another image ontop of it..?

Edit**

Figured out how to use an existing image as a background, but cannot figure out how to float another image ontop!

-Ax

585636243[/snapback]

i downloaded this:

http://s88013406.onlinehome.us/script2.php

it contains the following:

?PNG

IHDR ? A+]ے PLTEےےے?++#?r ِIDATx?يز1JD1??ئfؤ6?ک+,

Xx???ءض'آ?غفj??وظjٌ?ق?m?????Vcaه‏إگو??? ???گkسدؤ#ىفu?(??نRَ?\ء$آ,?ئغ?ُ5ه?s?B0??oV?‏?y3lگM??P??<?Y

ٍ?j??ح_2x1Q??ك?دW(ُ‏َذ? أ??ك?ع؟V?ـ?eّ??ے?Fq Jصںص‎=+??}??دبپطٹ?گ??غd?IًSطٌُِر؟فڈم{<=P‏ں،6زًِ?? ےغMزس6ڑے IEND?B`?

is it encrypted?!

anyway it works!!

i hope i can make a sig like danasoft, anybody know how to add image and cool stuff to the php?

so why does the raw image data work? while this php code doesn't?

<br />

<b>Fatal error</b>: Call to undefined function ImageCreateFromPNG() in <b>c:\My Site\file.php</b> on line <b>5</b><br />

my PHP Version 5.0.3

i had PHP Version 5.0.1 before and it used not to show the image, now i can see the above error.

  AresXP said:
ImageCreateFromPNG() is undefined, which means you do not have the GD library installed ;) You're using Windows so get the GD .dll and install it as a PHP module in php.ini ;)

585638790[/snapback]

i know nothing about GD .dll, could you please post more details? i don't know anything about programing!

also where is aero77 sig.php?

i can't find it in the site: http://www.aero77.com/scripts/PHPmySignature.rar

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Lmao. Cries about not playing those games not installed and yet don't ever want to touch them.
    • If I want to merge folder trees that have a similar structure, Beyond Compare is always my first choice. It's not free but it's awesome. If I want to just scan a whole drive/folder and find duplicates that are taking up space, I like Czkawka.
    • Claude Code gets throttled as Anthropic rolls out fresh usage caps by David Uzondu Claude Code, the AI-in-terminal utility developed by Anthropic and launched back in February, is getting updated usage limits following weeks of user complaints about being abruptly cut off. Many developers on the "$200/month Max plan" found their access blocked after just a few requests, with no explanation from the company. In a recent thread posted to X, the AI lab explained that it has seen "unprecedented demand since launch," pointing to some of its heaviest users who were running the tool continuously in the background 24/7, with one person reportedly consuming tens of thousands of dollars in model usage on a single $200 subscription. Anthropic also claimed that some users were violating its usage policy by sharing and reselling accounts, which impacts system capacity for everyone. These factors all led the company to announce new weekly limits that will be added on top of the existing five-hour caps, effective August 28. Max plan subscribers will have the option to buy additional usage at standard API rates if they hit their cap. Here's what the new weekly limits look like: Pro Plan ($20/month): An estimated 40 to 80 hours of usage with the Sonnet 4 model. Max Plan ($100/month): An estimated 140 to 280 hours with Sonnet 4 and 15 to 35 hours with the top-tier Opus 4 model. Max Plan ($200/month): An estimated 240 to 480 hours with Sonnet 4 and 24 to 40 hours with Opus 4. Per TechCrunch, the company provided these hour-based estimates, noting that the actual numbers may vary based on the size of a project's codebase. What's interesting is how this new structure compares to the old marketing. Anthropic previously advertised its $200 Max plan as offering 20 times more usage than the Pro plan. Based on these new hourly estimates, that multiple is now closer to six. It is possible the 20x figure still applies when measured in tokens or raw compute, but, according to TechCrunch, the company has not clarified that point.
    • I don't give a rat's f### what Trumpette, the Putin puppet likes!
  • Recent Achievements

    • First Post
      Gladiattore earned a badge
      First Post
    • Reacting Well
      Gladiattore earned a badge
      Reacting Well
    • Week One Done
      NeoWeen earned a badge
      Week One Done
    • One Month Later
      BA the Curmudgeon earned a badge
      One Month Later
    • First Post
      Doreen768 earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      645
    2. 2
      ATLien_0
      260
    3. 3
      Xenon
      165
    4. 4
      neufuse
      142
    5. 5
      +FloatingFatMan
      107
  • Tell a friend

    Love Neowin? Tell a friend!