cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

ftp via socks5

From: Katran Nier <katrann_at_mail.ru>
Date: Wed, 19 Sep 2007 02:02:26 +0300

I try to access ftp file list connecting thru SOCKS5, but get a
response with errors.

I use following code:

<?
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'ftp://login:password:someftp.com');
curl_setopt($ch,CURLOPT_PROXY,'xx.xx.xx.xx:xxxxx');
curl_setopt($ch,CURLOPT_PROXYTYPE,CURLPROXY_SOCKS5);
curl_setopt($ch,CURLOPT_TIMEOUT,30);
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_VERBOSE,0);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,0);

curl_exec($ch);
curl_close($ch);
?>

and get a response like this:

220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 11:11. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
530 You aren't logged in
500 ?
500 ?
500 ?

When I don't use SOCKS5, everything works perfectly.
When I use FTP client (in passive or active mode) with this SOCKS, everything is ok too.
What is the problem?

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-19