SimpleXMLElement error, error message httperror503

Source: Internet
Author: User
When executing the pannalesports api (which is an api for Data Capturing anyway), I use SimpleXMLElement to convert the data into an xml format so that I can intercept it. However, the error p.s. I used curl to capture it before turning it into curl {code ...} (This is actually not... execute the pannalesports api (a data capture api)
I use SimpleXMLElementConvert the data into xml format for my convenience. However, errors always occur after execution for a period of time.

P.s. I used curl to capture it and convert it to curl.

curl_setopt($httpChannel, CURLOPT_URL, $url);curl_setopt($httpChannel, CURLOPT_RETURNTRANSFER, true);curl_setopt($httpChannel, CURLOPT_HTTPHEADER, $IP);curl_setopt($httpChannel, CURLOPT_HTTPHEADER, $header);curl_setopt($httpChannel, CURLOPT_SSL_VERIFYPEER, false);$data = curl_exec($httpChannel);

(This is not the focus)

Focus on the following error messages
I use trySimpleXMLElementWhen an error occurs$e print_rAfter

Exception Object ( [message:protected] => String could not be parsed as XML [string:private] => [code:protected] => 0 [file:protected] => /home/ns/www/gamble/mlb.php [line:protected] => 66 [trace:private] => Array ( [0] => Array ( [file] => /home/ns/www/gamble/mlb.php [line] => 66 [function] => __construct [class] => SimpleXMLElement [type] => -> [args] => Array ( [0] => ) ) ) ) 2014-10_01 20:02:12Exception Object ( [message:protected] => String could not be parsed as XML [string:private] => [code:protected] => 0 [file:protected] => /home/ns/www/gamble/mlb.php [line:protected] => 66 [trace:private] => Array ( [0] => Array ( [file] => /home/ns/www/gamble/mlb.php [line] => 66 [function] => __construct [class] => SimpleXMLElement [type] => -> [args] => Array ( [0] => ) ) ) ) Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Space required after the Public Identifier in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 6: parser error : Opening and ending tag mismatch: hr line 5 and BODY in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 6: parser error : Opening and ending tag mismatch: BODY line 4 and HTML in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 7: parser error : Premature end of data in tag HEAD line 2 in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 7: parser error : Premature end of data in tag HTML line 2 in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 

$ E error:

Service UnavailableHTTP Error 503. The service is unavailable.

Is there any release or debug method?

Reply content:

Execute the pannalesports api (a data capture api)
I useSimpleXMLElementConvert the data into xml format for my convenience. However, errors always occur after execution for a period of time.

P.s. I used curl to capture it and convert it to curl.

curl_setopt($httpChannel, CURLOPT_URL, $url);curl_setopt($httpChannel, CURLOPT_RETURNTRANSFER, true);curl_setopt($httpChannel, CURLOPT_HTTPHEADER, $IP);curl_setopt($httpChannel, CURLOPT_HTTPHEADER, $header);curl_setopt($httpChannel, CURLOPT_SSL_VERIFYPEER, false);$data = curl_exec($httpChannel);

(This is not the focus)

Focus on the following error messages
I use trySimpleXMLElementWhen an error occurs$e print_rAfter

Exception Object ( [message:protected] => String could not be parsed as XML [string:private] => [code:protected] => 0 [file:protected] => /home/ns/www/gamble/mlb.php [line:protected] => 66 [trace:private] => Array ( [0] => Array ( [file] => /home/ns/www/gamble/mlb.php [line] => 66 [function] => __construct [class] => SimpleXMLElement [type] => -> [args] => Array ( [0] => ) ) ) ) 2014-10_01 20:02:12Exception Object ( [message:protected] => String could not be parsed as XML [string:private] => [code:protected] => 0 [file:protected] => /home/ns/www/gamble/mlb.php [line:protected] => 66 [trace:private] => Array ( [0] => Array ( [file] => /home/ns/www/gamble/mlb.php [line] => 66 [function] => __construct [class] => SimpleXMLElement [type] => -> [args] => Array ( [0] => ) ) ) ) Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Space required after the Public Identifier in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 6: parser error : Opening and ending tag mismatch: hr line 5 and BODY in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 6: parser error : Opening and ending tag mismatch: BODY line 4 and HTML in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 7: parser error : Premature end of data in tag HEAD line 2 in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): Entity: line 7: parser error : Premature end of data in tag HTML line 2 in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): in /home/ns/www/gamble/mlb.php on line 66 Warning: SimpleXMLElement::__construct(): ^ in /home/ns/www/gamble/mlb.php on line 66 

$ E error:

Service UnavailableHTTP Error 503. The service is unavailable.

Is there any release or debug method?

HTTP 503 is an internal server error.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.