Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How can i reverse this?
Old 06-13-2007, 03:42 AM How can i reverse this?
The PHP Professor

Posts: 340
Name: Alex
Location: Behind You
Trades: 0
How would i reverse this system so i get the original IP?



PHP Code:
<?php
//original ip without modifications
$ip "192.168.1.1";

echo 
sprintf ('%u'ip2long ($ip));

?>
This script produces the numbers: 3232235777
__________________
Go Kirby! <(" . "<) (^" . "^) (>" . ")> Talkupation!
microcolt is offline
Reply With Quote
View Public Profile Visit microcolt's homepage!
 
 
Register now for full access!
Old 06-13-2007, 06:03 AM Re: How can i reverse this?
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
Well, just use long2ip().

PHP Code:
<?php
//original ip without modifications
$ip "192.168.1.1";
$longIp=ip2long ($ip);
echo 
long2ip($longIp); //should output 192.168.1.1
?>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Reply     « Reply to How can i reverse this?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11293 seconds with 12 queries