The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HTTP POST to scripts2/savezone

Discussion in 'General Discussion' started by NightRider, Oct 2, 2007.

  1. NightRider

    NightRider Active Member

    Joined:
    Jan 23, 2007
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    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:password@domain.com/whm/scripts2/savezone";
    $params "&line-100-2=IN&line-200-1=NS&......";

    curl_setopt($chCURLOPT_URL,$url);
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_POSTFIELDS,$params);

    $resultcurl_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.
     
Loading...

Share This Page