|
Posted by JimL on 07/06/05 18:15
Here is a good fast site that gives you your IP address.
http://www.whatismyip.com/
Wish I knew how they did it.
In my case, it is a roadrunner isp that gives me a dynamic address.
I'm sitting behind a router and it lots of trouble to look it up and
so much easier using the above site.
The address is not very dynamic though. I've had the same address
since installing about 6 months ago. I suppose that is a good thing.
JimL
On Wed, 6 Jul 2005 11:00:38 +0300, "Kimmo Laine"
<eternal.erectionN05P@Mgmail.com> wrote:
>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>news:bmskc19mgethqoan9ki6j0hm5b72s6ou56@4ax.com...
>> On Tue, 05 Jul 2005 23:30:09 +1200, Chris Hope
>> <blackhole@electrictoolbox.com> wrote:
>>
>>>print_r($_SERVER)
>>
>> I'll give this a shot.
>>
>> I am running a dynamic IP address on a server. I am
>> discovering that my hosting provider changes my IP address from time
>> to time. When I pull up the server from another location, I want to
>> be able to keep tabs on what the IP address has changed to.
>>
>> I have a client on the server that updates the DNS record
>> whenever the gateway IP address changes. So, I'll always be able to
>> pull up the Webserver even if the IP address changes. I just want to
>> easily display it.
>>
>> Of course, I could ping the domain name, but I'd like to code
>> it into the page, if possible.
>
>execute "ping www.yourdomain.com" and parse the IP it translates it to from
>the output. For example in a windows machine executing:
>
>C:\>ping www.google.com
>
>returns the following:
>
>Pinging www.l.google.com [66.102.9.99] with 32 bytes of data:
>
>Reply from 66.102.9.99: bytes=32 time=52ms TTL=242
>Reply from 66.102.9.99: bytes=32 time=52ms TTL=242
>Reply from 66.102.9.99: bytes=32 time=52ms TTL=242
>Reply from 66.102.9.99: bytes=32 time=52ms TTL=242
>
>Ping statistics for 66.102.9.99:
> Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
>Approximate round trip times in milli-seconds:
> Minimum = 52ms, Maximum = 52ms, Average = 52ms
>
>From the output you can parse, with regexp for example, the ip 66.102.9.99.
>It's just a matter of does your server allow execute.
Navigation:
[Reply to this message]
|