can someone tell how to detect which port a script is being executed from?
I need to send a username & password to a php script using ssl and I would like the script to check that it was called from the correct port.
thanks for any help
Greg.
Try Getservbyname(). This returns the Internet port which corresponds to service for the specified protocol as per /etc/services. protocol is either TCP or UDP. Hope this helps!
Sorry! I should have given more info: The function returns the integer; port number and works as follows: int getservbyname (string service, string protocol).