I tried posting this under the E-Mail discussion forum but have not even had one reply, not even if it was the appropriate forum. So I will try posting this again in here this time.
This will be a fairly big post, I will try explaining what I am trying to accomplish and the hurdles I've been having.
Goal: To be able to create en e-mail forwarder through PHP
Problem: I do not have root access, the hosting company does, they just happen to have cPanel.
What I've tried:
I've been going through various resources on the forums here, trying them one at a time and seeing what works.
- The first thing I tried was: http://forums.cpanel.net/f42/php-scr...ly-115569.html
But without root access I could not put it where it was needed.
- Then I read through: http://forums.cpanel.net/f42/xmlapi-...ss-111897.html
Tried implementing it with:
I replaced the variables and values for the purpose of the explanation, such as accountUsername, accountPassword, mysite.ca and parsingScript.php
include_once "xmlapi.php" ;
$ip = 'mysite.ca';
$root_pass = 'accountPassword';
$xmlapi = new xmlapi($ip);
$p['domain'] = 'mysite.ca';
$p['email'] = 'testUser@mysite.ca';
$p['fwdopt'] = 'pipe';
$p['pipefwd'] = '/home/accountUsername/public_html/parsingScript.php';
$res = $xmlapi->api2_query('accountUsername', 'Email', 'addforward', $p);
Which failed drastically, for what I'm assuming is the lack of root administration password.
This site is being done under a shared hosting domain, so I don't imagine getting root access in the near future. What are my options? When I asked this question to the hosting providers they seemed to believe I needed a better php coder ...
What can I do in order to have forwarders created automatically that will not require root access on my part?