cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

XML Tags are being stripped

From: Richards, James <James.Richards_at_am.sony.com>
Date: Mon, 26 Apr 2010 08:53:59 -0400

All,

I have been using curl/php to retrieve XML documents from an external web server. It has been working correctly over the past few years and all of a student, the response I received is stripping the xml tags off. What could be causing this? Below is my function I use to retrieved the XML document. Any help would be appreciated.

function getURL($url) {

  $ch = curl_init();
  $proxy=getProxyServer();
  $user=getUsername();
  $passwd=getPassword();
  $user="$user:$passwd";

  curl_setopt ($ch, CURLOPT_URL, $url);

  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT, 300);
  if($proxy!=null)
    curl_setopt($ch, CURLOPT_PROXY,$proxy);
  curl_setopt($ch, CURLOPT_USERPWD,$user);

  $result=curl_exec ($ch);
  curl_close ($ch);

  return $result;
}

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2010-04-26