Remote Connection/Access

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
colby.anderson
Forum Newbie
Posts: 3
Joined: Sat Apr 02, 2011 3:49 pm

Remote Connection/Access

Post by colby.anderson »

I'm new to PHP. Does anyone know how to connect to a port other than SSH2? For example, port 9999 instead of port 22.
fugix
Forum Contributor
Posts: 207
Joined: Fri Mar 18, 2011 8:01 pm

Re: Remote Connection/Access

Post by fugix »

maybe try the ftp_connect() funtion...first parameter is the host, second is the port, and third is the timeout...the last two parameters are optional so you would have ftp_connect(host,port);
colby.anderson
Forum Newbie
Posts: 3
Joined: Sat Apr 02, 2011 3:49 pm

Re: Remote Connection/Access

Post by colby.anderson »

Is the ftp_connect() function an API?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Remote Connection/Access

Post by califdon »

It's one of many built-in functions of PHP. See http://php.net/manual/en/book.ftp.php. But I think you may not want to be restricted to the FTP protocol, so you may find PHP's socket functions to be what you need. See http://us3.php.net/manual/en/function.s ... onnect.php. This is not an area in which I have any experience, so I can't help you more than this, but I think it may point you in the right direction and maybe others can help you more.
Post Reply