How do I create a page which shows my ip?
#1
Posted 15 June 2010 - 08:16 AM
I want to create such a page like in this website
http://www.showmyip.com/
How do I do that?
In a simple description, I want to create a page on my website which shows my vistors their IP address and if possible there mac address to.
Many Thanks!
#2
Posted 15 June 2010 - 08:24 AM
#3
Posted 15 June 2010 - 08:29 AM
cluberti, on 15 June 2010 - 08:24 AM, said:
WOW thanks!
I didn't know that this code is written by java!
What about server side programing languages?
If you have more things that might help me, please add them too.
Best Regards,
This post has been edited by CrazyDoctor: 15 June 2010 - 08:36 AM
#4
Posted 15 June 2010 - 11:50 AM
#5
Posted 15 June 2010 - 03:16 PM
CrazyDoctor, on 15 June 2010 - 08:29 AM, said:
It isn't. Java and Javascript are unrelated, even though they sound alike. Javascript is interpreted by the browser (IE/Firefox/Chrome/Safari/etc). Java is something totally different.
CrazyDoctor, on 15 June 2010 - 08:29 AM, said:
Depends on the particular server-side language you want.
Either ways, a quick google search turns up countless relevant results.
#6
Posted 15 June 2010 - 04:23 PM
<?php
$text='<html><head><title>PHP Environment</title></head><body>'.
'<table style="border-collapse: collapse;" cellpadding="1">';
foreach ($_SERVER as $key => $val)
$text.='<tr onMouseOver="this.style.backgroundColor=\'AAAABB\';" '.
'onMouseOut="this.style.backgroundColor=\'transparent\';">'.
'<td style="font-weight: bold; border-right: 2px solid #000000;">'.
$key.'</td><td style="width: 100%;">'.
(is_array($val)?nl2br(print_r($val,true)):$val).'</td></tr>';
$text.='</table>';
echo $text.'</body></html>';
?>
...and how it is executed can be seen by pressing this link
This post has been edited by VideoRipper: 15 June 2010 - 04:24 PM
#7
Posted 05 July 2010 - 06:57 PM
You really helped me alot!
I found this site which shows my IP.
www.seemyip.com
I tried to look over it's code to understand the function who finds my IP but I can't find anything.
It seems like part of the code is hidden from visitor, am I right?
How does this site works and build?
What function and language does this site use in order to detact my IP?
Best Regards,
#8
Posted 05 July 2010 - 09:39 PM
#9
Posted 07 July 2010 - 07:52 AM
cluberti, on 05 July 2010 - 09:39 PM, said:
I guess that I can't see the code (PHP) of the this site? do I?
I tried to get view source but nothing like PHP.
Is what I see the outcome of the PHP code that run on the site's server?
#10
Posted 07 July 2010 - 07:58 AM
- ← Unable to link tot page within pdf in IE from cd-rom
- Web Development (HTML, Java, PHP, ASP, XML, etc.)
- eBay RSS feed problems →



Help
Back to top










