cURL Mailing List Monthly Index Single Mail
curl-and-php mailing list Archives
Automate Cpanel login using php CURL
From: Richard B <rborg_at_operamail.com>
Date: Mon, 01 Aug 2005 15:53:25 +0100
The whole point is to offer my clients direct access to the web editor within cpanel to edit a specific html page on their domain without giving them the actual cpanel username and pass by creating a custom log in page through which clients log on using a user name and password provided by me and then in turn the script would automatically log them on to the target url this time naturally using the cpanel user pass combination
Testing and outcome so far (attempt 1 using CURL):
If the script (below) is used on the following link I only get as far as the page's text because a login dialog still pops up twice (one for the stylesheet and one for the image if I figured out correctly)
Also if you click on a link within the page a login dialog still pops up.
On the other hand if I access the page directly via browser and provide cpanel user and pass the page loads fine and links work well. No further log ins required.
Then I also went one step further and attempted access to the editor directly by using this link "http://www.manicmalta.com:2082/frontend/x/files/htmledit.html?dir=/home/manicmal/www&file=20050117ira_losco.htm"
In this case the page loads and works fine BUT when I try to save the changes I always get a 'page not found' error page.
On the other hand if I access the page directly via browser and provide cpanel user and pass the page works fine and also saves well.
Is there something I am missing or is there something better suited for this than curl perhaps?? Any replies / ideas would be greatly appreciated. Hope that this is useful for other admins too.
$ch = curl_init();
-- _______________________________________________ Surf the Web in a faster, safer and easier way: Download Opera 8 at http://www.opera.com Powered by OutblazeReceived on 2005-08-01
These mail archives are generated by hypermail.
Page updated November 12, 2010.
web site info