hi!
I posted two days ago to ask for help to add an e-mail-forwarder through my php-script. I don't know what happened to the post, but I got some usefull help and I developed the following script. It might be helpfull for some of you.
Even the description is in German, you should be able to understand itPHP Code:<?
//Variablen
$CPanelUser = "user"; //Ihr CPanel User-Name
$CPanelPass = "pass"; //Ihr CPanel-Passwort
$domain = "domain"; //Ihre Domain
$email = "vordererteil"; //vorderer Teil der E-Mail-Adresse, die angelegt werden soll
$forward = "weiterleitung"; //an diese E-Mail-Adresse werden dann die E-Mails weitergeleitet
//ab hier nichts mehr ändern
$auth = $CPanelUser.":".$CPanelPass;
$sAuth = base64_encode($auth);
$sHTTP = "GET /frontend/x/mail/doaddfwd.html?email=".$email."&domain=".$domain."&forward=".$forward."\r\n HTTP/1.0\r\nAuthorization: Basic $sAuth\r\n";
$hSocket = fsockopen($domain, 2082);
fputs($hSocket, $sHTTP);
fclose($hSocket);
//ENDE
?>
Have fun with it!
Alexander Göbel
http://www.ag-hosting.de



LinkBack URL
About LinkBacks
Reply With Quote




