Pages: [1] :: one page |
Author |
Thread Statistics | Show CCP posts - 0 post(s) |

TomParad0x
Caldari Soul Ripper Consortium
|
Posted - 2008.11.10 07:05:00 -
[1]
Every time I try and access /account/Characters.xml.aspx I get the following error:
<?xml version='1.0' encoding='UTF-8'?> <eveapi version="2"> <currentTime>2008-11-10 06:55:48</currentTime> <error code="521">Invalid username and/or password passed to UserData.LoginWebUser().</error> <cachedUntil>2008-11-10 07:00:48</cachedUntil> </eveapi>
First off, 521 is not even on their error number list.
Second, I have tried this with my PHP Api class, and several others and get the same exact thing. I get the same error for every API page I go to.
Heres the function I use (Keep in mind it is not close finished, I am trying to get this to work mainly):
public function doApiQuery($path, $params = array()) { $params['userID'] = $this->userID; $params['apikey'] = $this->apiKey; if ($this->charID != "") $params['characterID'] = $this->charID;
$args = http_build_query($params); $url = $this->apiRoot . $path . "?" . $args;; $res = file_get_contents($url); echo $res; }
Yet when I visit the URL manually with the API info it works fine.
|

Ambo
State Protectorate
|
Posted - 2008.11.10 08:12:00 -
[2]
Edited by: Ambo on 10/11/2008 08:12:28 Well I guess either the URL is being built wrong, (try debugging, copying the URL directly from the variable and pasting that into a web browser) or, your 'file_get_contents' function is doing somthing wrong...
There's really nothing else it can be. --------------------------------------
Trader? Investor? Just want to track your finances? Check out EMMA |

Johnathan Roark
Caldari Quantum Industries RAZOR Alliance
|
Posted - 2008.11.10 16:40:00 -
[3]
incorrect userid or apikey is what normally causes that error
POS-Tracker 2.1.0 Hosting |

TomParad0x
Caldari Soul Ripper Consortium
|
Posted - 2008.11.10 16:43:00 -
[4]
Edited by: TomParad0x on 10/11/2008 16:46:09
Originally by: Ambo Edited by: Ambo on 10/11/2008 08:12:28 Well I guess either the URL is being built wrong, (try debugging, copying the URL directly from the variable and pasting that into a web browser) or, your 'file_get_contents' function is doing somthing wrong...
There's really nothing else it can be.
Already output the $url directly and pasted it into the browser, and it worked fine. I am not quite sure why it would be the file_get_contents. For instance, I have tried file_get_contents, and several other methods to getting it (Including some that are in working PHP APIs) and nothing works, it all gets the same thing.
Edit:
Originally by: Johnathan Roark incorrect userid or apikey is what normally causes that error
I have gone and manually stuck in the URL with the apikey of 2 and userid of 1 and it gives me:
<eveapi version="2"> <currentTime>2008-11-10 16:43:58</currentTime> <error code="203">Authentication failure.</error> <cachedUntil>2008-11-10 16:48:58</cachedUntil> </eveapi>
I was under the impression that is incorrect apikey/userid? Plus like I said, I pasted the URL generated in my code into the browser directly and it works just fine, so its not my API Info.
|

Johnathan Roark
Caldari Quantum Industries RAZOR Alliance
|
Posted - 2008.11.10 20:14:00 -
[5]
Originally by: TomParad0x Edited by: TomParad0x on 10/11/2008 16:53:28 Edited by: TomParad0x on 10/11/2008 16:46:09 Edit: Ok, sticking this at the top because I fixed it.
Are you using xampp by any chance?
Check your php.ini file for the following:
[php.ini] ; The separator used in PHP generated URLs to separate arguments. ; Default is "&". arg_separator.output = "&"
My guess is it has & instead of &. You can fix this in one of two ways, change the php.ini file, or change $args = http_build_query($params); to $args = http_build_query($params, '', '&');
Another suggestion, dont use file_get_contents(), instead use either CURL or fsockopen. They way your doing it works, but the API wants POST, not GET.
POS-Tracker 2.1.0 Hosting |
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |