Page 1 of 1

avoiding cpanel login prompt

Posted: Mon Sep 19, 2005 10:14 am
by devork
I'm trying to avoid the cpanel/webmail prompt for username/password
http://www.site.com:2095/

is there any way that form submits to server without prompt and user views his inbox

| FORM | ---------no prompt -----------> CPANEL

Posted: Mon Sep 19, 2005 12:04 pm
by anjanesh
When you login into Cpanel and goto your web-mail a/c, whats the url you see in the address bar ?

Posted: Wed Sep 21, 2005 12:18 am
by devork
http://www.SITE_NAME.com:2095/horde/login.php

did you get what i'm trying to accomplish?

Posted: Wed Sep 21, 2005 12:54 am
by anjanesh
This may work. A lot of Cpanel users automate adding many emails, db users, addon/parked domains using some script so that they can add 100's or 1000's entries automatically.

Code: Select all

$user = "Cpanel_Username";
$pass = "Cpanel_Password";
$IP   = "IP address"; // I think site_name.com should work too

$handle = fopen("http://$user:$pass@$IP:2095/horde/login.php", "r");

while (!feof($handle))
 {
        $buffer = fgets($handle);
 }

echo $buffer;

fclose($handle);
Its line 5 that you goto mess arround with.

Posted: Wed Sep 21, 2005 5:20 pm
by devork
it's given permission denied error

Code: Select all

Warning: fopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/SITE/public_html/a.php on line 6

Warning: fopen(http://USER_NAME:1234@www.SITE_NAME.com:2095/horde/login.php): failed to open stream: Permission denied in /home/SITE/public_html/a.php on line 6

Code: Select all

$user = "Cpanel_Username"; 
$pass = "Cpanel_Password"; 
$IP   = "IP address"; // I thing site_name.com should work too 

$handle = fopen("http://$user:$pass@$IP:2095/horde/login.php", "r"); 

while (!feof($handle)) 
{ 
        $buffer = fgets($handle); 
} 

echo $buffer; 

fclose($handle);

Posted: Thu Sep 22, 2005 1:36 am
by anjanesh
Dont include www. in your IP