Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Inactive Seller
Hedion University Amarr Empire
21
|
Posted - 2017.05.02 11:51:46 -
[1] - Quote
Today passing the Maintenance window, i begin to get the valid response finishing in < /eveap i> , but a whole doctype document passing the final of the data. I connect using a curl.
I resolve the rpoblem doing this before ths simplexml call:
$arr=explode("< /eveapi >",$data); if (strlen($arr[0] < >'')){ $data=$arr[0]."< /eveapi >"; } $apiInfo = new SimpleXMLElement($data);
i assume the curl response is $data, maybe you need to modify your call some times in your code (i must do five times ), i put some spaces to be able to post here.
Selling some inactive pilots ...Goal for Third phase : 30 for 15 may 2017 at the moment 33
|
Zerzzes Markarian
McCloud and Markarian Trade and Logistics Corp.
5
|
Posted - 2017.05.02 15:13:11 -
[2] - Quote
I.m also having API problems since downtime..... |
Inactive Seller
Hedion University Amarr Empire
21
|
Posted - 2017.05.02 15:20:45 -
[3] - Quote
check the api result in plaintext . some as htmlentities($data) in PHP, you are getting the api and a whole web page too.
Selling some inactive pilots ...Goal for final phase : 36 pilots at 2017-may-31 at the moment 40 pilots
|
Drakul Zephyrus
Zonk Holding
0
|
Posted - 2017.05.02 15:33:33 -
[4] - Quote
They are parsing now .net output with the XML curl requests...
If you curl "https://api.eveonline.com/server/ServerStatus.xml.aspx" you see the normal XML output plus the html garbage... |
Inactive Seller
Hedion University Amarr Empire
21
|
Posted - 2017.05.02 15:37:04 -
[5] - Quote
Agree, i already put the solution in PHP to that problem
Selling some inactive pilots ...Goal for final phase : 36 pilots at 2017-may-31 at the moment 40 pilots
|
MJ Maverick
nul-li-fy Circle-Of-Two
120
|
Posted - 2017.05.02 16:40:13 -
[6] - Quote
Also having this issue... CCP confirm?
Quote:Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 31: parser error : Extra content at the end of the document in /home/sever/public_html/ts3api/pheal/Pheal.php on line 226
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: < /eveapi >< !DOCTYPE html > in /home/sever/public_html/ts3api/pheal/Pheal.php on line 226
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/sever/public_html/ts3api/pheal/Pheal.php on line 226 An error occured: API Date could not be read / parsed, original exception: String could not be parsed as XML [A106]
[EVEOTS] Eve Online Teamspeak 3 API Registration
|
Inactive Seller
Hedion University Amarr Empire
21
|
Posted - 2017.05.02 19:46:55 -
[7] - Quote
Maybe clean the string data before covert to xml. I dont use Pheal, but function for me.
Selling some inactive pilots ...Goal for final phase : 36 pilots at 2017-may-31 at the moment 40 pilots
|
Cassie Helio
Push Industries Push Interstellar Network
51
|
Posted - 2017.05.03 03:52:08 -
[8] - Quote
MJ Maverick wrote:Also having this issue... CCP confirm? Quote:Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 31: parser error : Extra content at the end of the document in /home/sever/public_html/ts3api/pheal/Pheal.php on line 226
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: < /eveapi >< !DOCTYPE html > in /home/sever/public_html/ts3api/pheal/Pheal.php on line 226
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in /home/sever/public_html/ts3api/pheal/Pheal.php on line 226 An error occured: API Date could not be read / parsed, original exception: String could not be parsed as XML [A106]
If you look at the raw response from file_get_contents() or cUrl you will see that after the end of the XML there is a .NET error saying User Agent is not set. CCP must have updated something today and their service is throwing that exception. Your code is throwing that error because after the end of the XML, which ends with /eveapi>, there is more content. The XML parser does not like that. I fixed it in my app by getting the the raw contents of the XML call result and cutting everything off after /eveapi>
NOTE: If you make the call by directly pasting the xml URL into a browser address bar you will NOT see the error because a browser sets the User Agent string but the PHP |
Santinav
Banished Braindead Zombies Circle-Of-Two
0
|
Posted - 2017.05.03 08:51:19 -
[9] - Quote
Simply set an UserAgent to your Curl-Request.
curl_setopt($ch, CURLOPT_USERAGENT, 'AgentString');
This will fix your calls. |
Sansire Nerevar
The Scope Gallente Federation
0
|
Posted - 2017.05.03 11:01:38 -
[10] - Quote
Santinav wrote:Simply set an UserAgent to your Curl-Request.
foobar = could be any String
I dont like such quickfixes. CCP must fix this.
The raw response form file_get_contents() for my account balance is:
Quote: Server Error in '/' Application.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] webapp.utils.DDogManager.GetAgentData(String userAgent) +24 webapp.utils.DDogManager.GetAgentTags(String userAgent) +45 webapp.utils.DDogManager.StoreStat(HttpRequest request, Int32 statusCode, List`1 additionalTags) +448 BasePage.BasePage_Error(Object sender, EventArgs e) +677 System.Web.UI.TemplateControl.OnError(EventArgs e) +142 System.Web.UI.Page.HandleError(Exception e) +106 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +10415 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +361 System.Web.UI.Page.ProcessRequest() +76 System.Web.UI.Page.ProcessRequest(HttpContext context) +70 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +508 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1590.0
|
|
Inactive Seller
Hedion University Amarr Empire
24
|
Posted - 2017.06.08 00:39:52 -
[11] - Quote
Broke again today in the api of the specific character.
I must comment my old solution and put an user agent call passing each curl_init, and later use trim before convert to xml.
Selling some inactive pilots ...Goal for final phase : 21 pilots at 2017-jun-30 at the moment 22 pilots
|
Achanjati
Royal Amarr Science Institute Royal Amarr Space Industries
1028
|
Posted - 2017.06.08 09:37:17 -
[12] - Quote
Added the user agent to my skripts. So far, seams to work. Was there any anouncement of this change I have missed? Was noch active watching for api chances the last weeks so I might have missed it. |
Leila Larphson
Interstellar Exploration Center
5
|
Posted - 2017.06.08 10:21:24 -
[13] - Quote
Have used CURLOPT_USERAGENT all the time, but having problems with certain api requests at the moment as well. Already built in a trim of everything after < / eveapi > to get rid of the < DOCTYPE > rubbish at the end. I use file_get_contents() for most calls and nothing (empty string) is returned. But if I paste the url in IE or Chrome it works fine, I get normal response data, for example:
< eveapi version="2" > < currentTime > 2017-06-08 09:55:45 < /currentTime > < result > < rowset name="jobs" key="jobID" columns="jobID,installerID,installerName,facilityID,solarSystemID,solarSystemName,stationID,activityID,blueprintID,blueprintTypeID,blueprintTypeName,blueprintLocationID,outputLocationID,runs,cost,teamID,licensedRuns,probability,productTypeID,productTypeName,status,timeInSeconds,startDate,endDate,pauseDate,completedDate,completedCharacterID,successfulRuns" / > < /result > < cachedUntil > 2017-06-08 10:09:45 < /cachedUntil > < /eveapi >
|
Inactive Seller
Hedion University Amarr Empire
25
|
Posted - 2017.06.08 14:19:58 -
[14] - Quote
Leila Larphson wrote:Have used CURLOPT_USERAGENT all the time, but having problems with certain api requests at the moment as well. Already built in a trim of everything after < / eveapi > to get rid of the < DOCTYPE > rubbish at the end. I use file_get_contents() for most calls and nothing (empty string) is returned. But if I paste the url in IE or Chrome it works fine, I get normal response data, for example: < eveapi version="2" > < currentTime > 2017-06-08 09:55:45 < /currentTime > < result > < rowset name="jobs" key="jobID" columns="jobID,installerID,installerName,facilityID,solarSystemID,solarSystemName,stationID,activityID,blueprintID,blueprintTypeID,blueprintTypeName,blueprintLocationID,outputLocationID,runs,cost,teamID,licensedRuns,probability,productTypeID,productTypeName,status,timeInSeconds,startDate,endDate,pauseDate,completedDate,completedCharacterID,successfulRuns" / > < /result > < cachedUntil > 2017-06-08 10:09:45 < /cachedUntil > < /eveapi >
EDIT: Never mind, works again.
I had the same problems and result one of my calls have diff name of variant in the user agent. I change all the user agents to use the same variable, and answer as googlebot. Maybe need do a wrapper around the curl to modiify in only a place, but was a surprise yesterday.
Selling some inactive pilots ...Goal for final phase : 21 pilots at 2017-jun-30 at the moment 22 pilots
|
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |