local IP script question
| From: | eriol | Date: | Wed, 16 Oct 2002 04:07:59 +0000 |
| Subject: | local IP script question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-120102@lists.php.net to get a copy of this message | ||
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 and
add a port to it (e.g.: http://xxx.xxx.xxx.xxx:xxxx )..
I often am running SpyAmp (a WinAmp plugin) and that creates a basic
html output page using a different port than Apache does.. They both run
together fine without conflicts, but I can't figure out how to create 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 my IP thru "run --> cmd /k
ipconfig" each time as I'd like to bookmark the local php page instead..
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? 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