Create a listening socket in PHP ?

From: 127.0.0.1 (newsgroup(at)craznar.com_at_verisign-sux-ijlkl.com)
Date: 10/20/03


Date: Mon, 20 Oct 2003 13:35:53 GMT

How does one go about creating a listening socket in a PHP script.

I'm trying to work out a way of finding out my IP address (dynamic,
behind NAT) and I can't use the normal http idea to get it (due to
stuff proxy by ISP).

SO what I thought was to write a protected PHP script which listend for
ONE request on that port - and send back the IP bound on that port.

So from my linux box I would:

1. GET http://xyz.com/wait.php?port=2002
2. telnet xyz.com 2002

Thus geting my IP address ...

Any ideas ?

-- 
Spam:newsgroup(at)craznar.com@verisign-sux-klj.com
EMail:<0110001100101110011000100111010101110010011010110
11001010100000001100011011100100110000101111010011011100
1100001011100100010111001100011011011110110110100100000>


Relevant Pages

  • Re: Create a listening socket in PHP ?
    ... > How does one go about creating a listening socket in a PHP script. ... > ONE request on that port - and send back the IP bound on that port. ... Luke ...
    (comp.lang.php)
  • Re: ConnectEx
    ... trying to make the ConnectEx working first. ... u_short port; ... DWORD dwError = WSAGetLastError; ... client trying to connect to a different IP than the listening socket is ...
    (microsoft.public.win32.programmer.networks)
  • Re: port 4125 closed on my server ?
    ... then I see a listening socket at port 4125 ... but through ISA I can't be connected ... > On the server just logon to the RWW and connect to a server or machine. ...
    (microsoft.public.windows.server.sbs)
  • Detecting a blocked port
    ... In my Carbon/Mach application I am opening a listening socket and would ... like to detect if the OS X firewall is blocking the port, ...
    (comp.sys.mac.programmer.help)
  • Re: port 4125 closed on my server ?
    ... How are you verifying that the port is open? ... steps of seeing end to end communication through the ISA firewall? ... >> Can you check whether the TS Proxy will start a listening socket on port ... >> On the server just logon to the RWW and connect to a server or machine. ...
    (microsoft.public.windows.server.sbs)