Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

local IP script question..

0 views
Skip to first unread message

eriol

unread,
Oct 15, 2002, 9:52:34 PM10/15/02
to
I assume this would be easy to accomplish, but I can't seem to figure it
out.. I'm running Apache/PHP on my machine (WinXP Pro).. I want to
create a local php script that detects my ISP's assigned IP address (on
the same PC) that I can bookmark within MSIE and have it take me
directly to my IP using a different port than Apache (which is 80 for
httpd).. It'd need to be in the format of http://xxx.xxx.xxx.xxx:xxxx

I run SpyAmp (a WinAmp plugin) and that creates a basic html output page
using a different port than Apache.. They both run together fine without
conflicts, but I can't figure out how to create a bookmark using a php
script that finds my IP address and adds my SpyAmp assigned port to it..
I don't want to have to manually get it thru "run --> cmd /k ipconfig"
each time.. Is this possible using REMOTE_ADDR somehow? If so, what
function(s) do I need to look into and how would I configure this? Does
the script need to find my IP, then forward me to another page using the
header() function adding the port to my IP? I've tried a few self-made
scripts that try this, but they all end up leading me to my
localhost/127.0.0.1 with my SpyAmp port.. If you have a working example,
tips or a URL to help me on my way, I'd appreciate it.. TIA..

Take care.. peace..
eriol


R.Lange

unread,
Oct 16, 2002, 4:56:39 AM10/16/02
to
echo 'http://' . $_SERVER['SERVER_ADDR'] . ':' . $spyamp_port


0 new messages