NightRider

Active Member
Jan 23, 2007
27
0
151
Hello.

I have finally developed a php scipt for editing dns zone, for specified domain, without having direct access to whm.
The problem is how to send variables to scripts2/savezone via http post.
I used curl method:

PHP:
$ch = curl_init();

$url = "http://user:[email protected]/whm/scripts2/savezone";
$params = "&line-100-2=IN&line-200-1=NS&......";

curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);

$result= curl_exec ($ch);
curl_close ($ch);
And there are two results:

1. All fields for domain become empty or
2. WHM reports a fatal error.

How do You suggest to send the updated data to script?

Thanks.