aminulsumon
04-04-2008, 12:17 AM
I want to create FTP account by php code. The steps are as:
First i login my control panel www.shopno-dinga.com:2082/cpanel
For this i use the following code:-
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, "http://shopno-dinga:2082/cpanel/");
// I also tried http://shopno-dinga:2082/login/
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
$result = curl_exec($ch);
curl_close($ch);
echo $result;
But it display the login page with user name and password text box. I don't even get any error like: invalid username and password. It means my values are not submitted yet.
Secondly, is it possible to create FTP account through CURL?
I am looking forward for a solution or better advice.
Thanks,
Md. Aminul Islam
First i login my control panel www.shopno-dinga.com:2082/cpanel
For this i use the following code:-
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, "http://shopno-dinga:2082/cpanel/");
// I also tried http://shopno-dinga:2082/login/
curl_setopt($ch, CURLOPT_USERPWD, "username:password");
$result = curl_exec($ch);
curl_close($ch);
echo $result;
But it display the login page with user name and password text box. I don't even get any error like: invalid username and password. It means my values are not submitted yet.
Secondly, is it possible to create FTP account through CURL?
I am looking forward for a solution or better advice.
Thanks,
Md. Aminul Islam