PDA

View Full Version : Make Forwarders



williamvdh
08-27-2004, 11:09 AM
Hello coders!

Sorry for my bad english.

I want to create forwarders with a form, so that people can fil in an form with what they want before the @ and to what adress it must forward and then that direct admin the forwarder real-time make.

I don't understand the class, can you tell me how the class of API works?

I hope you understand what i mean.

Thanks,
William van den Hoorn,
The Netherlands

toothbrush
10-22-2004, 03:43 AM
Luckily for you I needed to do the same thing :)

the form:


<form name="form1" method="post" action="code/da_create_forwarder.php">
from: <input name="forwardname" type="text">@domain.com<br>
to email: <input name="email" type="text"> (separate multiple addresses with comma)<br>
<input name="submit" type="submit" value="Add Forwarder"></form>


the creation:


$email = $_POST['email'];
$forwardname = $_POST['forwardname'];

$Socket = new HTTPSocket;
$Socket->connect($siteurl,$siteport);
$Socket->set_login($user,$pass);
$Socket->set_method('POST');
$Socket->query('/CMD_EMAIL_FORWARDER',
array(
'domain' => 'domain.com',
'action' => 'create',
'user' => $forwardname,
'email'=>$email,
'create'=>'Create'
));