On 04/10/2012 15:54, Bastien Koert wrote:
> Hi All,
> 
> I have a page that receives third party data into my app, xml data via
> https post. This works fine and I receive the data as expected. The
> issue I am facing is around posting XML data back as a synchronous
> response to the post I receive. I am using the following code:
> 

<snip>

> 
>       $result = curl_exec($ch);
>       
>       curl_close($ch);
>       // Print CURL result.
>       echo $ch_result;
> }
> 
> 
> The endpoint recipient says they are not receiving the data and I am
> at a loss to figure out why. Any insight would be appreciated.
> 
> Thanks,
> 
Hi,

Try adding some error checking before and after the curl_exec() call:

// Check for an error
if(curl_errno($ch)>0){
        print "Error creating curl object: Err Number:".
                curl_errno($ch). " ,Description:" . curl_error($ch);
}

// Execute request
$result = curl_exec($ch);

// Check for an error again
if(curl_errno($ch)>0){
        print "Error executing query: Err Number:". curl_errno($ch).
                ", Description:" . curl_error($ch));
}

It may also be wise to increase your time out whilst testing, just in case.


Regards

Ian
-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to