This PHP script will add email forwarder to cPanel account by using it’s API. It’s pretty simple to call the API using PHP. For this example I’m not gonna use their SDK as it’s only one call, unless you want to call multiple API’s then their SDK is more practical.
You can download the entire script:
Before run this script make sure to change some settings.
/***** *Setting part *Change according to your cPanel settings *****/ $fwd_to_email = "firstname.lastname@example.org"; //your free email eg: gmail and so on. $fwd_from_email = "email@example.com"; //your forwarder email $port = 2082 ; //2082 for unsecured, 2083 for secured but your hosting must support SSL (put https in cpanellogindomain) $cpanelpassword = "yourpass#"; //your cPanel login password $cpanelusername = "xxxx"; //your cPanel username $cpanellogindomain = "http://mahadirlab.com"; //your domain when login to cPanel without port or /cpanel .
I was recently wrote Facebook application using graph API , In this case my application need to update settings in... more
In this tutorial I will share how to Root and Unroot Android Gingerbread without using Odin or starting the phone... more
Wow... It was very shocked since a group of very well-known Hackers sent their notice to attack Malaysian Government portal... more