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
SimpleXMLElement
Convert 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 trySimpleXMLElement
When an error occurs$e print_r
After
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 useSimpleXMLElement
Convert 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 trySimpleXMLElement
When an error occurs$e print_r
After
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.