Re: Username:Password??? (Using fsockopen...)
| From: | Richard Lynch | Date: | Wed, 21 Nov 2001 17:24:27 +0000 |
| Subject: | Re: Username:Password??? (Using fsockopen...) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-75421@lists.php.net to get a copy of this message | ||
Scott Fletcher wrote:
> How do I send the username and password to the port and recieve a
> response saying hte username & password is accepted or fail???
Sockets in and of themselves do not send/accept/receive/reject
username/passwords.
Once the socket is open, you send the right stuff and get back the right
stuff.
Exactly *HOW* you send the right stuff and get back the right stuff depends
on the protocol behind the socket. Is it FTP, HTTP, MySQL, SQL Server,
IMAP, or what? Every one of them has a different protocol, though they are
all pretty similar in style.
You send something like "USER: $username" and then "PASS: $password" and
then you get back a response.
If the socket simply isn't opening it's not about username/password -- It's
that the server in question isn't running a demon on that port, or it's
refusing your connection based on your IP address and/or domain name
records or lack thereof.
--
Like music? http://l-i-e.com/artists.htm