jemz
1
Hi, I need some help please, I want to connect to ftp server but the problem is I need to use proxy,
FTP credentials
Address: XXX.XXX.XXX.XXX
username: theftpusername
password: theftppassword
Then I have this proxy setup by our administrtor which can access to the ftp server
host: sample.myproxy.com
port:8080
Then in my php script
$ftp_server_proxy = 'sample.myproxy.com ';
$ftp_server_proxy_port = ‘8080’;
$conn_id = ftp_connect($$ftp_server_proxy,$ftp_server_proxy_port) or die("Couldn't connect to $ftp_server");
but it looks like I am ftping the proxy, I am confuse… can someone help me on this or is there other way not using ftp_connect ?
Thank you in avdvance
chorn
2
at least your $$
seems wrong.
rpkamp
3
Isn’t that the idea of a proxy server? You connect to that, and it forwards your connection to the actual server.
rpkamp
5
Well yes, but you do need to tell the proxy server what server you actually want to connect to.
That’s why your code should connect to the actual server, using the proxy in the stream context. See the link I posted earlier.
jemz
6
Hi I was confuse how to apply that context to my existing code…
Thank you in advance
system
Closed
7
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.