I have set up a php program that calls a RESTful web service using curl and gets back well-formed XML. When I do this on th e command line and I get the correct response but when I do this in PHP using curl_exec() I only get about half of the response. The response is basically cut short.
Does anyone know the cause of this?
Code is as follows:
$url = $this->dspace_url . '/dspace/search.xml?query=' . urlencode($query);
$sac_curl = curl_init();
error_log('query url is'.$url);
curl_setopt($sac_curl, CURLOPT_HTTPGET, true);
curl_setopt($sac_curl, CURLOPT_URL, $url);
curl_setopt($sac_curl, CURLOPT_VERBOSE, true);
curl_setopt($sac_curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($sac_curl, CURLOPT_HEADER, false);
$resp = curl_exec($sac_curl);
error_log('response is '.$resp);
Thanks, Mark