Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Lieutenant Kiff
The Skunkwerks E C L I P S E
29
|
Posted - 2011.09.26 14:09:00 -
[1] - Quote
Well right now I am looking at a one of the libraries but Im not sure exactly how I am going to use it for my needs so I am looking to see if I can even fully accomplish what I am looking to do.
Pretty much I am coding a login system for a project of mine but I want to by default fill 3 of the fields I ask for using the API.
Username (Ingame Name) Corporation Alliance
Those 3 fields I want to use API to put in the MySQL DB table using limited API on my register page.
So could anyone point me in the right direction or have any tips to pulling those 3 things with PHP? |
Steve Ronuken
Cossette Moana
4
|
Posted - 2011.09.26 15:07:00 -
[2] - Quote
http://wiki.eveonline.com/en/wiki/EVE_API_Account_Characters has most of what you want. Just not the alliance info.
http://wiki.eveonline.com/en/wiki/EVE_API_EVE_Character_Info Has the alliance info, but you'll need to hit the first, to get the character id, as an api doesn't limit to it. (If you're using the IGB, you could cheat and use the header to get the char id)
While it's not directly relevant, the php below is an example of how to parse info from the API
Quote: < ?php
$data = file_get_contents('https://api.eveonline.com/eve/CharacterInfo.xml.aspx?characterID=90926985'); $xml = new SimpleXMLElement($data); #var_dump($xml);
print $xml->result->{'characterName'}->{0};
? >
Another option you have is http://wiki.eveonline.com/en/wiki/IGB_Headers This would require people to come in via the IGB, but it would allow you to bypass needing an API key (though it's not trustworthy. An evil git like myself could fake it all). If you're only using it for prepopulation, then:
Quote: < ?php $name=$_SERVER['HTTP_EVE_CHARNAME']; $corp=$_SERVER['HTTP_EVE_CORPNAME']; $alliance=$_SERVER['HTTP_EVE_ALLIANCENAME']; ? >
Bear in mind that these days, the limited API is going away. You'll need people to create a specific API key for use here, with specific privs. I believe all you'll need is the public character information.
|
Lieutenant Kiff
The Skunkwerks E C L I P S E
29
|
Posted - 2011.09.26 15:15:00 -
[3] - Quote
I wasnt really even thinking about the headers..... But yes the headers seem like it would be the simplest way and I was intending for use with the IGB primarly... However as for faking it that would just defeat the purpose of using what I am making which I dont want to throw about publicly right now. So I think I may go with the IGB headers for now and possibly switch over later... |
Johnathan Roark
The Graduates Morsus Mihi
5
|
Posted - 2011.09.29 04:23:00 -
[4] - Quote
Do not use headers! They are very easily spoofed, would take me about a minute to do so.
For this, I suggest using pheal. It has the examples your looking for in the documentation. EVEVERIFY - A recruiting API Verification and Audit Tool
Also try out Yapeal for your php api needs |
TorTorden
NorCorp Enterprise No Holes Barred
1
|
Posted - 2011.09.29 12:01:00 -
[5] - Quote
Im using apikeyinfo that gives charname,corp,charid I also keep alliance list stored in the db. Fetches a list of corporations and pumps into an array if he/she is a member of one of them then good, else they can take a hike. |
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |