CPanel : Add email forwarder using PHP

April 2, 2013  |  cPanel, Programming  |  No Comments

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 = "mahadirlabxxx@gmail.com"; //your free email eg: gmail and so on.
$fwd_from_email = "madetxx@mahadirlab.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 .

WHMCS Hacks – Get Domain TLD List

03/31/2013  |  No Comments

WHMCS provides various APIs for developer, but recently I  need an API to get list of the TLD domain for... more

Download Papago M11 Malaysia & Singapore

02/17/2013  |  No Comments

Today I had the opportunity to try new  Android Papago M11 for Malaysia and Singapore. Overall rating for this new... more

file_get_contents – failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

02/15/2013  |  No Comments

I was recently wrote Facebook application using graph API , In this case my application need to update settings in... more

Tutorial How to Root and UnRoot Phone with Android Gingerbread

01/06/2012  |  No Comments

In this tutorial I will share how to Root and Unroot Android Gingerbread without using Odin or starting the phone... more

Facebook Emoticons Tool (Free Software)

08/07/2011  |  1 Comment

I really sure that all of you already knew about Facebook Chat Emoticon.. isn't  right? so I will not spend... more

Anonymous Hacker Attacked Malaysian Government Portal

06/17/2011  |  1 Comment

Wow... It was very shocked since a group of very well-known Hackers sent their notice to attack Malaysian Government portal... more

MHR Custom Anti Copy (WordPress Plugin)

06/17/2011  |  23 Comments

Do you come here to find the solution for your web contents always being copied by other peoples without your... more

MHR Banner (WordPress Plugin)

06/12/2011  |  41 Comments

MHR-Banner is a WordPress plugin for people who want to easily publish their banner easily and attractively. MHR-Banner was designed... more

Free Hosting (000webhost) is Scam

06/09/2011  |  14 Comments

Welcome to my new blog..  I have moved to new paid domain. My previous blog which was hosted on free... more