Jump to content


Photo

Can I get the socket or port number for a HTTP client connection?


  • Please log in to reply
2 replies to this topic

#1 Hardwarez

Hardwarez
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 23 October 2006 - 08:19 PM

???
I have been authorizing users for a script by ip address.  Problem is that I will have many users from the same ip address.

Is there a way I can find the socket or port number being used to connect to a client ip address?

For example I see  that this http connection is on port 2297... So I hope to generate an Id based on ip and port number..


#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 23 October 2006 - 10:11 PM

$_SERVER['REMOTE_PORT']

#3 Hardwarez

Hardwarez
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 24 October 2006 - 12:14 PM

Great!  That is what I was looking for.  Now, I see that the port changes every 15 seconds.. I guess I will need to find a way to make apache allow 500 second time outs :P

Thanks again!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users