none
Bing Webmaster API IWebmasterApi.SubmitUrl Error 400

    Question

  • Be "Body text cannot contain images or links until we are able to verify your account."

    I can't add links in this question,so i remove the URLS.

    API  Library IWebmasterApi.SubmitUrl

    PHP Code

    [

    $url="/* remove URL */ api.svc/pox/SubmitUrl?apikey=my apikey";
    
    $xml_data='<SubmitUrl xmlns="/* remove URL */">
    <siteUrl>my site</siteUrl>
    <url>my url</url>
    </SubmitUrl>';
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_POST, 1);
                            curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/xml"));
                            curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_data);
                            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
                            $xmlhtml=curl_exec($ch);
                            curl_close($ch);

    ]

    last month before,it work,but this month,it was 400 error

    this is the header

    "

    HTTP/1.1 400 Bad Request
    Cache-Control: no-cache
    Pragma: no-cache
    Content-Type: application/xml; charset=utf-8
    Content-Encoding: gzip
    Expires: -1
    Content-Length: 99
    Date: Sat, 03 Nov 2012 12:13:03 GMT
    Connection: close

    "

    why?

    Thanks

    Tuesday, November 06, 2012 1:52 AM

Answers

All replies