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
avoiding cpanel login prompt
Moderator: General Moderators
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.
Its line 5 that you goto mess arround with.
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);
Last edited by anjanesh on Thu Sep 22, 2005 1:41 am, edited 1 time in total.
- devork
- Forum Contributor
- Posts: 213
- Joined: Fri Aug 08, 2003 6:44 am
- Location: p(h) developer's network
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 6Code: 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);