Hi,
I'm trying to make it possible to login from a cpanel account from my main site login. I found some code that opens up the socket, but how would I then display or redirect to that page?
Just to reiterate what I'm trying to do, rather than having them type in: lonestarservers.com/cpanel/ and then have the http auth form popup, I want them to be able to type in their user and pass on the index.php page and have it process it for them without that http auth popup.
$host = "lonestarservers.com";
$cpaneluser = "testcom";
$cpanelpass = "hometown";
$socket = fsockopen($host,2082);
$authstr = "$cpaneluser:$cpanelpass";
$pass = base64_encode($authstr);
$in = "GET /frontend/Xskin/index.html\r\n HTTP/1.0\r\nAuthorization: Basic $pass \r\n";
fputs($socket,$in);
Any help would be appreciated, thanks...