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

Kw4h
Dragon's Rage Intrepid Crossing
|
Posted - 2007.09.11 19:14:00 -
[31]
Originally by: Constance DeKebec I've copy/paste all that you write and replaced USERID and APIKEY, created folder xmlcache, i get those messages :
Error: File does not exist: ./xmlcache/account/Characters.xml.aspx Api: Must provide userID parameter for authentication. Error: File does not exist: ./xmlcache/account/Characters.xml.aspx
Don't understand, previous version worked fine ... 
Was a small error at my snippet at the top. Typed it out of my head without checking it myself :)
It should be correct now, so please try again :) _ Planet Sight Wallpaper - EvE map |

Constance DeKebec
|
Posted - 2007.09.11 21:38:00 -
[32]
Thanks, i didn't even though to do that :/ it works now :)
Again, nice job, i managed to make some cool stuff for my carebear char 
|

Z011
|
Posted - 2007.09.16 15:37:00 -
[33]
too bad it is dependent on php5.
needs http_build_query() and probably more.
The class stuff was easy enough to 'fix', just drop all the public, private, static keywords. Bu, unfortunately....
Time to port PHP5 to AIX I guess. |

Shinhan
Phoenix Knights Dark Nebula Galactic Empire
|
Posted - 2007.09.16 20:58:00 -
[34]
Originally by: Z011 too bad it is dependent on php5.
needs http_build_query() and probably more.
The class stuff was easy enough to 'fix', just drop all the public, private, static keywords. Bu, unfortunately....
Time to port PHP5 to AIX I guess.
http_build_query() doesn't look complicated. There are couple examples at php.net for emulating this function on PHP 4 that look like they would work...
-- Selling apples, 1 signature each. ѼѼѼѼѼѼѼ |

Dead6re
Amarr The Knighthawks FREGE Alliance
|
Posted - 2007.09.17 13:16:00 -
[35]
Edited by: Dead6re on 17/09/2007 13:16:02 Find: $poststring = http_build_query($params);
Replace:
$poststring = "userID=".$params['userID']."&apiKey=".$params['apiKey'];
if ($params['characterID'] != null) $poststring .= "&characterID=".$params['characterID'];
|

Ryushe
M. Corp M. PIRE
|
Posted - 2007.09.24 16:13:00 -
[36]
I got PHP5 running, got your latest API classes, changed the caching part as per Wyehrs directions. Now when running your little example code there, of course with correct userID and APIKey, I do get a list of all characters on that account, but I also get this: "Error: File does not exist: ./xmlcache/<userID>/account/Characters.xml.aspx" (<userID> substituted for actual userID obviously) Now I've made an xmlcache dir in both basedir and the class dir, chmodded them both to 777 just to be sure, changed ownership of the directory to the web user, and still I get that message. I've tried absolute paths, relative paths, etc etc. Any ideas?
----------------------- Vi veri veniversum vivus vici!
|

Atari Commodore
|
Posted - 2007.09.26 21:58:00 -
[37]
Originally by: Constance DeKebec I've copy/paste all that you write and replaced USERID and APIKEY, created folder xmlcache, i get those messages :
Error: File does not exist: ./xmlcache/account/Characters.xml.aspx Api: Must provide userID parameter for authentication. Error: File does not exist: ./xmlcache/account/Characters.xml.aspx
I'm having a similar problem:
Quote: Error: File does not exist: ./xmlcache/421527/account/Characters.xml.aspx Api: Must provide userID parameter for authentication. Error: File does not exist: ./xmlcache/421527/account/Characters.xml.aspx
Stumped.
|

Atari Commodore
|
Posted - 2007.09.28 16:40:00 -
[38]
Anyone any idea why this is happening?
Tearing my hair out here...
|

Rynlam
Gallente
|
Posted - 2007.12.24 19:06:00 -
[39]
Edited by: Rynlam on 24/12/2007 19:10:42 Edited by: Rynlam on 24/12/2007 19:08:43 Edited by: Rynlam on 24/12/2007 19:07:50 Reviving this :) Anyway, the retrieve characters function shown works just fine for me. I have no idea how to work cURL, though, so I assume my problem with getSkillInTraining is with the print_r part. Here's my code: (without my API key)
<?php require_once('./api/class.api.php'); require_once('./api/class.charselect.php'); require_once('./api/class.charactersheet.php');
$api = new Api(); $api->setCredentials("7-characters","64-characters"); $api->debug(true); // enable debugging $api->cache(false); // do not use a cache-file, if one exists $contents = $api->getCharacters(); // retrieve API characters XML file $skilltrn = $api->getSkillInTraining(); // retrieve API characters SIT
print_r(CharSelect::getCharacters($contents)); print_r(CharacterSheet::getSkillInTraining($skilltrn)); $api->printErrors(); // display errors ?>
I get: Array ( [0] => Array ( [charname] => Rynlam [charid] => 120544169 [corpname] => OCForums [corpid] => 878299514 ) ) Array ( [rowset] => ) Error: File does not exist: ./xmlcache/1188020/char/SkillInTraining.xml.aspx Api: Invalid characterID. Error: File does not exist: ./xmlcache/1188020/char/SkillInTraining.xml.aspx
|

Rynlam
Gallente
|
Posted - 2007.12.24 19:17:00 -
[40]
Thought it might be because I hadn't retrieved the charactersheet yet. New code:
<?php require_once('./api/class.api.php'); require_once('./api/class.charselect.php'); require_once('./api/class.charactersheet.php');
$api = new Api(); $api->setCredentials("blah","diddly"); $api->debug(true); // enable debugging $api->cache(false); // do not use a cache-file, if one exists $contents = $api->getCharacters(); // retrieve API character XML file $character = $api->getCharacterSheet(); // retrieve API character sheet $skilltrn = $api->getSkillInTraining(); // retrieve API character SIT
print_r(CharSelect::getCharacters($contents)); print_r(Charactersheet::getCharacterSheet($character)); print_r(Charactersheet::getSkillInTraining($skilltrn)); $api->printErrors(); // display errors ?>
New output:
Array ( [0] => Array ( [charname] => Rynlam [charid] => 120544169 [corpname] => OCForums [corpid] => 878299514 ) ) Error: File does not exist: ./xmlcache/1188020/char/CharacterSheet.xml.aspx Api: Invalid characterID. Error: File does not exist: ./xmlcache/1188020/char/CharacterSheet.xml.aspx Error: File does not exist: ./xmlcache/1188020/char/SkillInTraining.xml.aspx Api: Invalid characterID. Error: File does not exist: ./xmlcache/1188020/char/SkillInTraining.xml.asp
|
|

Kw4h
Dragon's Rage Intrepid Crossing
|
Posted - 2007.12.25 09:56:00 -
[41]
Originally by: Rynlam *snip* New output:
Array ( [0] => Array ( [charname] => Rynlam [charid] => 120544169 [corpname] => OCForums [corpid] => 878299514 ) ) Error: File does not exist: ./xmlcache/1188020/char/CharacterSheet.xml.aspx Api: Invalid characterID. Error: File does not exist: ./xmlcache/1188020/char/CharacterSheet.xml.aspx Error: File does not exist: ./xmlcache/1188020/char/SkillInTraining.xml.aspx Api: Invalid characterID. Error: File does not exist: ./xmlcache/1188020/char/SkillInTraining.xml.asp
Think the highlighted part says enough ^^ _ Planet Sight Wallpaper - EvE map |

Coconut Joe
VIRTUAL LIFE VANGUARD Te-Ka
|
Posted - 2007.12.25 13:27:00 -
[42]
Originally by: Z011 too bad it is dependent on php5.
needs http_build_query() and probably more.
The class stuff was easy enough to 'fix', just drop all the public, private, static keywords. Bu, unfortunately....
Time to port PHP5 to AIX I guess.
How very lazy 
Try http://uk.php.net/manual/en/function.http-build-query.php#57424 - Eve IGB Store Template - The complete eve retail solution. |

Rynlam
Gallente
|
Posted - 2007.12.25 18:05:00 -
[43]
Originally by: Kw4h Think the highlighted part says enough
It says invalid characterID. I have looked through the code and I'm not seeing where to input the characterID for the Charactersheet class. (BTW, is that meant to be capitalized differently than all the other classes?)
|

Zafar
|
Posted - 2007.12.27 20:02:00 -
[44]
Hi,
I probably suck too much at PHP to use this API, because I'm always getting this error message:
Quote:
Warning: mkdir() [function.mkdir]: Permission denied in /home/filtered/htdocs/dev/jewperapi/include/api/class.api.php on line 189
Warning: fopen(./xmlcache/687369/account/Characters.xml.aspx) [function.fopen]: failed to open stream: No such file or directory in /home/www-folke/htdocs/dev/jewperapi/include/api/class.api.php on line 192 Array ( [0] => Array ( [charname] => filtered [charid] => 712441404 [corpname] => filtered [corpid] => 920892) [1] => Array ( [charname] => Zafar [charid] => 931632819 [corpname] => Zorg Corporation [corpid] => 949675640 ) ) Error: File does not exist: ./xmlcache/687369/account/Characters.xml.aspx Error: File does not exist: ./xmlcache/687369/account/Characters.xml.aspx Error: Could not open file for writing: ./xmlcache/687369/account/Characters.xml.aspx
- Z. |

Kw4h
Dragon's Rage Intrepid Crossing
|
Posted - 2007.12.28 19:00:00 -
[45]
Originally by: Rynlam EDIT2:
If I put the charID retrieved from the first function in manually into the api->setCredentials line, then charactersheet stuff works properly. How do I retrieve the charID into a variable to automatically update credentials, though?
after the line "$char = $api->getCharacters();" you can do the following.
$characters = CharSelect::getCharacters($char); $charid = $characters[0]['charid']; // 0 is the first in the array, 1 is the 2nd etc etc.
// then you can set the credentials again $api->setCredentials("userid", "apikey", "CHARID");
// so, instead of "CHARID" (including quotes) you can use $charid $api->setCredentials("foo", "bar", $charid);
_ Planet Sight Wallpaper - EvE map |

Rynlam
Gallente
|
Posted - 2008.01.03 16:04:00 -
[46]
Code:<html> <head><title>EVE API</title></head> <body bgcolor="#000000" text="#00CCCC"> <center><h1>EVE API</h1></center> <?php require_once('./api/class.api.php'); require_once('./api/class.charselect.php');
$api = new Api(); $api->debug(true); // enable debugging $api->cache(false); // do not use a cache-file, if one exists $api->setCredentials($apiuser,$apipasskey); $apichars = $api->getCharacters(); // retrieve API character XML file $apicharacters = CharSelect::getCharacters($apichars); $apicharid = $apicharacters[0]['charid']; $apicharcorp = $apicharacters[0]['corpname']; echo "<br />Character ID: ".$charid; echo "<br />Corporation: ".$charcorp; //$api->setCredentials($apiuser,$apipasskey,$charid); $api->printErrors(); // display errors ?> </body> </html>
Output:EVE API
Character ID: Corporation: Error: File does not exist: ./xmlcache/1188020/account/Characters.xml.aspx Error: File does not exist: ./xmlcache/1188020/account/Characters.xml.aspx
|

Xaroth Brook
Minmatar BIG Ka-Tet
|
Posted - 2008.01.09 00:05:00 -
[47]
I think a lot is doable in php4, except simpleXml as I don't think that runs on php4 by default... you might want to check PEAR to see if there's a php4 version of simpleXml..
It was like a baby, it landed on my lap and was helpless and totally defenseless. Then I shot it and bragged about it on a killboard.
|

DeTox MinRohim
Madhatters Inc. Enuma Elish.
|
Posted - 2008.01.09 07:44:00 -
[48]
Edited by: DeTox MinRohim on 09/01/2008 07:45:34
Originally by: Xaroth Brook I think a lot is doable in php4, except simpleXml as I don't think that runs on php4 by default... you might want to check PEAR to see if there's a php4 version of simpleXml..
I never could walk the line of full php5 especially since I still see many many hosting keeping php4 by default. And my coding style is dumb anyway to get a clue.
For a simpleXML replacement, this nifty file does the trick (was made to read files but I modified it to read variable content on the fly instead of only files).
xml parser
Was meant to parse files but I made it so that you can parse variables without the need of a file.
Example (just a grab of a few lines from the skillsheet stuff) :
// $data = Containing your xml stuff
include_once('includes/xml.php'); $parse = XML_parsecontent($data);
echo '<pre>'; print_r($parse); echo '</pre>';
Replace XML_parsecontent by XML_parsefile if you're reading a file instead. ------ This sig space is Read-only ! omgalink - Online Skillsheet |

seren10pity
|
Posted - 2008.02.12 09:06:00 -
[49]
Hi,
I just put the code linked by the author
<?php require_once('class.api.php'); // Verified the path is good, I have an error if not. require_once('class.charselect.php'); // Verified the path is good, I have an error if not.
$api = new Api(); $api->setCredentials("my_user_id", "my_api_key"); $api->debug(true); // enable debugging $api->cache(false); // do not use a cache-file, if one is stored on the disk $contents = $api->getCharacters(); // retrieve api characters XML file
print_r(CharSelect::getCharacters($contents)); $api->printErrors(); // display errors ?>
And I get this error : <?php Error: File does not exist: ./xmlcache/1955767/account/Characters.xml.aspx Api: Invalid username and/or password passed to UserData.LoginWebUser(). Error: File does not exist: ./xmlcache/1955767/account/Characters.xml.aspx ?>
I read post that people that have the same problem than mine, I test lots of modification to make it work, I always get this error. My user id and api key are correct, I can use the other PHP class on the eve dev wiki, but this one is more complete....
What should I do to fix that ?
|

Rynlam
Gallente
|
Posted - 2008.02.16 18:04:00 -
[50]
Store the array to a variable before using print_r on it.
|
|

KtoJest
Minmatar
|
Posted - 2008.02.20 20:08:00 -
[51]
To the assembled wisdom-
i hope this thread is still alive. :) would some one give me a clue as to what i'm doing wrong here.
<?php require_once('./classes/api/class.api.php'); require_once('./classes/api/class.charselect.php'); require_once('./classes/api/class.balance.php'); require_once('./classes/api/class.charactersheet.php'); require_once('./classes/api/class.generic.php'); require_once('./classes/api/class.membertrack.php'); require_once('./classes/api/class.transaction.php'); require_once('./classes/api/class.walletjournal.php');
$user= '********'; $pass= '***********************************************'; $charID= '*********';
// example code works just fine $api = new Api(); $api->debug(true); // enable debugging $api->cache(false); // do not use a cache-file, if one exists $api->setCredentials($user,$pass); $apichars = $api->getCharacters(); // retrieve API character XML file $apicharacters = CharSelect::getCharacters($apichars); $apichar = $apicharacters[0]['charid']; $apicharname = $apicharacters[0]['charname']; $apicharcorp = $apicharacters[0]['corpname']; echo "<br />Character ID: ".$apichar; echo "<br />Character Name: ".$apicharname; echo "<br />Corporation: ".$apicharcorp; echo "<br><br>"; $api->setCredentials($apiuser,$apipass,$charID); $api->printErrors(); // display errors
//this does not work $api = new Api(); $api->debug(true); // enable debugging $api->cache(false); // do not use a cache-file, if one exists $api->setCredentials($user,$pass); $Tng = $api->getSkillInTraining(); // retrieve API skills XML file
$api->setCredentials($user,$pass,$charID); <<with or without this line, same result $api->printErrors(); // display errors ?>
Error: File does not exist: ./xmlcache/********/char/SkillInTraining.xml.aspx Api: Invalid characterID. Error: File does not exist: ./xmlcache/********/char/SkillInTraining.xml.aspx
Why/ere is my characterID invalid/ated?
|

Rynlam
Gallente
|
Posted - 2008.02.21 02:10:00 -
[52]
$api = new Api(); $api->setCredentials($user,$pass,$charid); $skit = $api->getSkillInTraining(); print_r($skit);
You can't find out what skill is training if you don't tell it which character you're looking at. Looks like you just randomly stuck the setCredentials line with charid to the end of your code.
|

KtoJest
Minmatar
|
Posted - 2008.02.21 10:24:00 -
[53]
thanx Rynlam-
don't know where my head had gone. last honest code i'd written was in Pascal. another lifetime.
...and thanx Kw4h for the great code.
the best-
|

Casabian
Gallente Seven. Enuma Elish.
|
Posted - 2008.02.22 21:03:00 -
[54]
I keep getting the error
"Api: Invalid username and/or password passed to UserData.LoginWebUser()."
I'm using the correct userID, and apiKey, but it doesn't seem to validate.
For referece - I'm using the same code as Rynlam's html page above.
Thanks Casa ------------------------------------------------ Casabian - Everyone loves magical Trevor. |

Andy Moo
|
Posted - 2008.02.25 12:47:00 -
[55]
So how would I use the skill sheet data to get a total SP value. Everything I've tried gives a zero output.
|

Padyn
Black Eclipse Corp Band of Brothers
|
Posted - 2008.02.25 15:44:00 -
[56]
Originally by: Andy Moo So how would I use the skill sheet data to get a total SP value. Everything I've tried gives a zero output.
This is how I have done a total SP:
... $api->setCredentials($apiuser,$apipass,$apichar); $charsheet = $api -> getCharacterSheet(); // retrieve API character sheet $skills = Charactersheet::getCharacterSheet($charsheet);
$sp = 0; foreach($skills['skills'] as $sk) { $sp += $sk['skillpoints']; } echo '<br/>Skillpoints: '.number_format($sp);
Nemo Me Impune Lacessit - "No one strikes me with impunity" |

Rynlam
Gallente
|
Posted - 2008.02.26 16:23:00 -
[57]
Kw4h, are you planning on updating the classes for the new API functions anytime soon? Should I be waiting for the "official" version or should I just hack up my own?
|

Rynlam
Gallente
|
Posted - 2008.02.27 16:27:00 -
[58]
Edited by: Rynlam on 27/02/2008 16:27:10 If anybody wants it, I've got an AllianceList class done. class.alliancelist.php and 4 additional lines in class.api.php. The array output is slightly biased to work easily on my site, but isn't too hard to modify if you know how to mess with nested foreach($array as $key=>value) stuff. Output array looks like:
Alliances => Array( [101010 Alliance] => Array( [membercorp1idhere] => "membercorp1startdate" [membercorp2idhere] => "membercorp2startdate" ) [secondalliancename] => Array( [firstmembercorp] => "firstmembercorpstart" ) [allianceid1] => "101010 Alliance" [allianceid2] => "secondalliancename" ) And so on.
Working on a CorporationSheet class now.
|

Rynlam
Gallente
|
Posted - 2008.03.05 17:57:00 -
[59]
Have a basically working class.corporationsheet.php but I need to make it read the rowsets "accountkeys" and "logo" properly still. Having $api->cache(true) breaks it however, as it loads whatever is cached no matter whether $corpid is set or not. Any way from within the getCorporationSheet function to disable caching for that function?
|

Rynlam
Gallente
|
Posted - 2008.03.06 22:49:00 -
[60]
Kw4h, are you alive anymore?
Anyway, I've completed class.corporationsheet.php. Requires some modifications to class.api.php, to support using corporatinID in setCredentials.
Example php file:
$apiuser = "7or8digits"; $apipass = "64charactersazAZ09"; $apichar = "acharacterIDontheaccount"; $apicorp = "anycorpIDhere"; $api = new Api(); $api->debug(false); $api->cache(false); $api->setCredentials($apiuser,$apipass,$apichar); // Returned corporation will be the character's corp, and will include wallet divisions and such //$api->setCredentials($apiuser,$apipass,$apichar,$apicorp); // Returned corporation will be the specified corpID, and will not include information unless you select the corpID the character is in, which would be kind of pointless $ucorp = $api->getCorporationSheet(); $corp = Corporationsheet::getCorporationSheet($ucorp);
echo '<html>'; echo '<head><title>Corpsheettest</title></head>'; echo '<body style="background:#000000; color:#C0C000;">'; echo '<pre>'; echo '<hr color="orange" />'; print_r($corp); echo '<hr color="orange" />'; echo '</pre>'; echo '</body>'; echo '</html>';
Will return:
Array ( [corporationID] => 230445889 [corporationName] => Mindstar Technology [ticker] => MNDS [ceoID] => 1778331558 [ceoName] => Hodur [stationID] => 60011572 [stationName] => Osmeden IX - Moon 6 - University of Caille School [description] => You can do anything you set your mind to when you have vision, determination and an endless suppply of expendable labor. [url] => http://mindstar.dimensionjump.com [allianceID] => 936628053 [allianceName] => The Kano Organisation [taxRate] => 10 [memberCount] => 120 [shares] => 11000 [logo] => Array ( [graphicID] => 0 [shape1] => 567 [shape2] => 574 [shape3] => 513 [color1] => 676 [color2] => 679 [color3] => 680 ) )
If you have priveleges to see the corp wallet info, additional data is included in the array:
[divisions] => Array ( [0] => Array ( [accountKey] => 1000 [description] => RECYCLE BIN ) [1] => Array ( [accountKey] => 1001 [description] => SHIPS AND EQUIPMENT ) [2] => Array ( [accountKey] => 1002 [description] => MANUFACTURING ) [3] => Array ( [accountKey] => 1003 [description] => CORP PLAN ITEMS ) [4] => Array ( [accountKey] => 1004 [description] => ORE AND MINERALS ) [5] => Array ( [accountKey] => 1005 [description] => MISCELLANEOUS AND FREE STUFF ) [6] => Array ( [accountKey] => 1006 [description] => AMMUNITION ) ) [walletDivisions] => Array ( [0] => Array ( [accountKey] => 1000 [description] => Master Wallet ) [1] => Array ( [accountKey] => 1001 [description] => 2nd Wallet Division ) [2] => Array ( [accountKey] => 1002 [description] => Andarys Embezzlement fund ) [3] => Array ( [accountKey] => 1003 [description] => 4th Wallet Division ) [4] => Array ( [accountKey] => 1004 [description] => 5th Wallet Division ) [5] => Array ( [accountKey] => 1005 [description] => 6th Wallet Division ) [6] => Array ( [accountKey] => 1006 [description] => 7th Wallet Division ) )
|
|
|
|
|
Pages: 1 [2] 3 4 :: one page |
First page | Previous page | Next page | Last page |