
Originally Posted by
NightRider
WHM developers, do you read? Answer something, please!
I'm not sure why I'm even helping you as no one HAS to help. This is a 100% free forum and people can post where they like. Also it is hard to troubleshoot your code as you only gave us a small part. Here is some code for you. Hopefully it helps someone else out as well...
Code:
<?
######### Set up basic variables here #########
$username = "root";
$password = "123456";
$ip = "208.74.121.52";
$agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)";
//build URL here
$url = "http://".$username.":".$password."@".$ip.":2086/scripts2/savezone";
######### Set up all the field values here#########
$fields = "line-100-2=IN&";
$fields .= "line-200-1=NS&";
$fields .= "another=more&";
$fields .= "last_one=here";
######### Prepare curl settings and variables #########
$ch=curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
$buffer = curl_exec($ch);
curl_close($ch);
?>
Try that and then let us know how it works. If it doesn't work...research a little more and also post ALL of your code.