Checking IP's

All about creating websites!
Post Reply
User avatar
EotHKraken
Newbie
Newbie
Posts: 7
Joined: 16 May 2007, 16:00
16

Checking IP's

Post by EotHKraken »

Hi i was surfing the other day and i entered to a website and notice that when u just enter theres a big sing thats say " welcome ur real IP is:..., ur server is :....... etc " all those special information. my question is this, whats the name of that? i have a small web page in freewebs but i dont know if i can put one of those there.... someone knows the site where i can find them or download them and how to use them? i really apreciate ur advise........
PD: that little box save ur IP or just show it?

alien100
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 693
Joined: 25 Sep 2006, 16:00
17
Location: Spartan HQ
Contact:

Post by alien100 »

heres a php script

Code: Select all

<?php
$img_number = imagecreate(275,25);
$backcolor = imagecolorallocate($img_number,102,102,153);
$textcolor = imagecolorallocate($img_number,255,255,255);

imagefill($img_number,0,0,$backcolor);
$number = " Your IP is $_SERVER[REMOTE_ADDR]";

Imagestring($img_number,10,5,5,$number,$textcolor);

header("Content-type: image/jpeg");
imagejpeg($img_number);
?>
[img]http://img127.imageshack.us/img127/9128/sig3copyyybq4.jpg[/img]

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

you get the data by a php script, for example:

Code: Select all

<?
$hst = $_SERVER["HTTP_HOST"];
$rmt = $_SERVER["REMOTE_ADDR"];
$ref = $_SERVER["HTTP_REFERER"];
$uri = $_SERVER["REQUEST_URI"];
$br = $_SERVER["HTTP_USER_AGENT"];
?> 
and in the box you display the variables, for example:

Code: Select all

Your hostname is: <b><?echo $hst; ?></b><br>
Your IP address is: <b><?echo $rmt; ?></b><br>
You came from: <b><?echo $ref; ?></b><br>
Requested URL: <b><?echo $uri; ?></b><br>
Browser INFO: <b><?echo $br; ?></b><br
:wink:

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

Btw. The codes above wont work on freewebs, you will need a host that supports php coding. Check out

Code: Select all

http://www.free-webhosts.com/free-php-webhosting.php
for more details on this. :wink:

User avatar
EotHKraken
Newbie
Newbie
Posts: 7
Joined: 16 May 2007, 16:00
16

Post by EotHKraken »

ty guys ill check on it , so i think first to read whats PHP correct. if someone reads this try this site: http://us2.php.net/manual/es/index.php . its a manual for PHP so new guys like me can learn it...... :P

ebrizzlez
Kage
Kage
Posts: 732
Joined: 31 Mar 2007, 16:00
17
Location: Hidden in a Buffer Protection.
Contact:

Post by ebrizzlez »

EotHKraken wrote:ty guys ill check on it , so i think first to read whats PHP correct. if someone reads this try this site: http://us2.php.net/manual/es/index.php . its a manual for PHP so new guys like me can learn it...... :P
Nice.... you can also check out

Code: Select all

www.w3schools.com
for all your need in php,html,xhtml,java, and many other languages. :wink:
[img]http://i81.photobucket.com/albums/j205/ebrizzlez/4lsint1.jpg[/img]

User avatar
EotHKraken
Newbie
Newbie
Posts: 7
Joined: 16 May 2007, 16:00
16

Post by EotHKraken »

Thanks, ill check it out that too. another tip for noobies like me, you need a web server (apache,PhP) and a Database (MySQL) installed in your CPU so you can start playing and practice PHP u can get those Individually or as a pre-configured package heres a site where you can find last one :
http://www.apachefriends.org/en/xampp-windows.html .... :P

Post Reply