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

Peter Powers
FinFleet Raiden.
28
|
Posted - 2011.10.26 07:23:00 -
[1] - Quote
Hello everyone,
i noticed that there is no Pheal post here yet, so i decided to port my old post from the old forums over here.
"Peter Powers" wrote:Hello everyone, during the last few days i had a look at the available PHP API Libraries, and well decided i'd be better of porting my Ruby Library (EAAL) to PHP. so i did (mostly last night), and now its time for a first release. you can get the library at github, you will also find a little bit of documentation there. a few more words why i wrote this instead of using Yapeal or Ale, you can find in my Blog.Hint: While the library works alone, it integrates very well in King23 (the framework i used for building northern-crusade). best regards, PP PS: you can find a page about it on the eve-dev wiki too.
since that post Pheal has constantly been extended and improved by several people, special thanks go here to Wollari who really put alot of efford in it.
Today i published v0.1.0 (click on "tags" on github to find a download link)
Pheal-0.1.0 has - custom keys enabled by default - ssl enabled by default update if you want to use custom keys (you should want that) dont update if you only have legacy keys and dont want to switch.
|

Peter Powers
FinFleet Raiden.
29
|
Posted - 2011.12.02 09:48:00 -
[2] - Quote
since some other libs who needed changes for the new extension got a bumb by their new version i take the freedom to bump this post aswell.
Pheal should still be working with crucible without any changes.
regards, PP |

Novect
MARS. NEM3SIS.
0
|
Posted - 2011.12.25 10:53:00 -
[3] - Quote
bumpage!
More examples/documentation pretty pls! :D Great tool! |

Louis Vitton
Kickass inc
6
|
Posted - 2011.12.31 09:25:00 -
[4] - Quote
Hi peter,
I am trying to get Pheal to work. I have used version .0.14 before and got it to work nicely now i am trying version .0.1.0 but i can not get it to work i am not sure why. The code below is the one i am trying to get to work but there is no output. I think they auto loader might not be loading but the path to Pheal.php is correct.
Any help that you could give me would be great thanks mate.
I am using windows with apache2 server.
Quote: require_once "Pheal/Pheal.php"; spl_autoload_register("Pheal::classload"); PhealConfig::getInstance()->cache = new PhealFileCache(); $pheal = new Pheal("keyID", "vCode"[, "scope for request"]);
$pheal->scope = "eve"; $result = $pheal->CharacterID(array("names" => "Peter Powers")); echo $result->characters[0]->characterID;
|

Peter Powers
FinFleet Raiden.
30
|
Posted - 2012.01.02 02:48:00 -
[5] - Quote
Louis Vitton wrote:Hi peter,
I am trying to get Pheal to work. I have used version .0.14 before and got it to work nicely now i am trying version .0.1.0 but i can not get it to work i am not sure why. The code below is the one i am trying to get to work but there is no output. I think they auto loader might not be loading but the path to Pheal.php is correct.
Any help that you could give me would be great thanks mate.
I am using windows with apache2 server.
do you have any error message to work with? like, try to set your PHP error reporting to E_ALL and check your webservers errorlog if it doesn't output an error.
cause classload not working or anything as dramatic should put out quite a few messages. |

Louis Vitton
Kickass inc
7
|
Posted - 2012.01.02 03:03:00 -
[6] - Quote
No i didnt with that one. I have since tried a diff request and have received an error but when i attempt to make the folders writeable it wont work.
Erorr:
Quote:generic error: 0 message: Cache directory '/.pheal/cache/KeyID/vCode/char/Characters/' isn't writeable The KeyID and vCode there are the real ones on the error but didnt want to post them.
code:
Quote:$keyID = ''; $vCode = '';
require_once "Pheal/Pheal.php"; spl_autoload_register( "Pheal::classload" ); $pheal = new Pheal( $keyID, $vCode, "char" ); PhealConfig::getInstance()->http_ssl_verifypeer = false; //PhealConfig::getInstance()->api_base = 'https://api.eveonline.com/'; //PhealConfig::getInstance()->http_method = 'curl'; //PhealConfig::getInstance()->http_post = false; PhealConfig::getInstance()->cache = new PhealFileCache(); PhealConfig::getInstance()->access = new PhealCheckAccess(); try { $result = $pheal->Characters(); foreach( $result->characters as $character ) { echo $character->name; } } catch( PhealAccessException $e ) { echo "access error: ".$e->getMessage(); /* do something - example: disable key */
} catch( PhealAPIException $e ) { echo 'api error: ' . $e->getCode() . ' message: ' . $e->getMessage(); /* do something - example: disable key */
} catch( PhealException $e ) { echo 'generic error: ' . $e->getCode() . ' message: ' . $e->getMessage(); /* do something - example: wait 5 minute next key usage (network/cluster problem) */ } |

Peter Powers
FinFleet Raiden.
30
|
Posted - 2012.01.02 03:10:00 -
[7] - Quote
Louis Vitton wrote:No i didnt with that one. I have since tried a diff request and have received an error but when i attempt to make the folders writeable it wont work. Erorr: Quote:generic error: 0 message: Cache directory '/.pheal/cache/KeyID/vCode/char/Characters/' isn't writeable The KeyID and vCode there are the real ones on the error but didnt want to post them.
you probably want to set a proper directory path there. i'm not too familliar with windows permissions and such.
that said, from my understanding this, depending if you have a windows or a cygwin apache tries to either write in the cygwin / path, which might be some confusing rights stuff or with a xampp for example, it might try to write on the root of your working directories harddisk like c:\.pheal... which i could imagine to require administrator privileges.
try giving some path that it doesnt need those rights in by doing someting like
PhealConfig::getInstance()->cache = new PhealFileCache('path/to/somewhere');
i wish i could be of more assistance here.. maybe someone else who runs it on windows has an idea. |

Louis Vitton
Kickass inc
7
|
Posted - 2012.01.02 03:22:00 -
[8] - Quote
Thank you. I have tried alot of other query's also and alot of the time it doesnt fetch the API or even try to. I will try it on my Ubuntu server soon and see if I can get it working.
There is no real install process is there just download and unzip really?
Thank you for your help and time also. :)
Cheers Louis
Also now trying
PhealConfig::getInstance()->cache = new PhealFileCache(__DIR__ . '/.pheal-cache/');
Same issues as before just added the new location with the error message. |

Peter Powers
FinFleet Raiden.
30
|
Posted - 2012.01.02 10:57:00 -
[9] - Quote
Louis Vitton wrote: This same error is happening on my Apache2 ubuntu web server also the persmissions for the folder where pheal is stored on there is 755 and 755 on the file i am using with the pheal query in it.
and the owner of the folder is the apaches user?
something else i could think of would be your key containing illegal characters for the filesystem |

Louis Vitton
Kickass inc
7
|
Posted - 2012.01.03 07:32:00 -
[10] - Quote
Yes its my own. The old Pheal from the tutorials stickyed on this forum works fine though. Seems weird to me that i cant get this new one to work. |

Peter Powers
FinFleet Raiden.
30
|
Posted - 2012.01.04 22:18:00 -
[11] - Quote
Louis Vitton wrote:Yes its my own. usually the apache user is not your user..
i believe the default user for apache2 on ubuntu should be www-data, so www-data needs write rights.
Quote: The old Pheal from the tutorials stickyed on this forum works fine though. Seems weird to me that i cant get this new one to work.
that indeed seems weird, as i said, have you checked if the new style key has only characters that are allowed in the filesystem? |

Louis Vitton
Invictus Australis Northern Coalition.
13
|
Posted - 2012.01.29 10:29:00 -
[12] - Quote
All working now and thank you for your assistance.
Is there going to be an update to accomidate the changes made in te latest patch to the API or shall they work anyways on the current version?
Cheers mate. |

Ingrid Pitt
Republic University Minmatar Republic
0
|
Posted - 2012.01.29 19:23:00 -
[13] - Quote
I've been reading through forum posts and readmes trying to understand how Pheal works, but clearly I'm simply not understanding some basic part of how it prepares and retrieves information. Apologies if this seems basic but there certainly seems to be an assumption that this must be obvious, but it's certainly not to me. In fact I'm not even sure how to go about asking so my questions might even look a bit weird!
Firstly, I've now figured out how to get this to work...
Quote: ### Example 2, getting the id for a given character name require_once "Pheal/Pheal.php"; spl_autoload_register("Pheal::classload"); $pheal = new Pheal("keyID", "vCode"[, "scope for request"]);
$pheal->scope = "eve"; $result = $pheal->CharacterID(array("names" => "Peter Powers")); echo $result->characters[0]->characterID;
seems I have to remove "[, "scope for request"]", probably because the scope is included here instead ... "$pheal->scope = "eve";" (Bah! Why include that in the example then! , and that example doesn't even appear to need KeyID or vCode).
Okay, but why doesn't it need the "account" scope? Hmmm.
Well let's say that I wanted to retrieve a characters contact list. That seems to want userID, apiKey and characterID. Well I can see where and how to add the scope ($pheal->scope = "char";), and I'm presuming that I change keyID and vCode to something valid this time (such as $pheal = new Pheal("12345", "fgdhfghdgfhdetc");), but where and how do I feed it the characterID?
I guess I could do with seeing a few annotated examples. I tried Trenker's tutorial but I can't get his example to work.
I'm just looking for a way in, so all help appreciated! |

Louis Vitton
Invictus Australis Northern Coalition.
13
|
Posted - 2012.01.29 21:10:00 -
[14] - Quote
Hey mate,
First upi am on my phone at wOrk so sorry for the short reply I will give more detail later.
I think pheal uses a combination of curl and simple XML to make its requests to the API. First up if you can't get that tutorial to work. What version of php are you using and MySQL also? Ploys what are you using for your web host eg apache on Ubuntu os.
I shall update this more later with some examples from the pheal version your using. |

Ingrid Pitt
Republic University Minmatar Republic
0
|
Posted - 2012.01.29 23:34:00 -
[15] - Quote
Thanks for the quick reply! However, I think I've just cracked it (or at least got a foot hold, or maybe just a toe jam)...
I'll carry on and see how far I can get but I've proved I think that it's just my lack of understanding the library and poor OOP skills that's letting me down.
|

Louis Vitton
Invictus Australis Northern Coalition.
13
|
Posted - 2012.01.30 07:28:00 -
[16] - Quote
Good news mate, i had my issues with pheal but it was just me not getting it right its a great thing pheal and if you have more questions i shall help if i can or peter will know as he is the MAN! |

Sol Laxon
Aideron Robotics Darkmatter Initiative
0
|
Posted - 2012.01.30 18:04:00 -
[17] - Quote
Hello, is there a quick reference for querying various things?
For example I am able to get the system name from the EVE browser, but I need to convert it to an ID. Can pheal do that? Then from that ID I would like to grab and cache the number of jumps in that system.
I am just not sure how to proceed when it comes to getting something like jumps, or podkills etc. Most of the examples are with the character area. |

Peter Powers
FinFleet Raiden.
41
|
Posted - 2012.01.30 18:15:00 -
[18] - Quote
Sol Laxon wrote:Hello, is there a quick reference for querying various things?
For example I am able to get the system name from the EVE browser, but I need to convert it to an ID. Can pheal do that? Then from that ID I would like to grab and cache the number of jumps in that system.
I am just not sure how to proceed when it comes to getting something like jumps, or podkills etc. Most of the examples are with the character area.
Hello, since Pheal basically maps the API xml to methods, Pheal can provide you with the stuff that the API provides. you can find a list of things at http://wiki.eve-id.net/APIv2_Page_Index, but i think it might be missing the latest additions for retrieving item ids.
stuff like solarsystemID's or jump data is not available through the API so pheal cannot provide you with that information. You can however get the information you need to build such functionality for your app in CCP's static data dump. while it does not provide you with jump numbers it contains all data needed to calculate them yourself.
regards, PP |

Sol Laxon
Aideron Robotics Darkmatter Initiative
0
|
Posted - 2012.01.30 18:28:00 -
[19] - Quote
Hello Peter,
Thanks for the quick reply. I noticed for example that the sovereignty(); xml output contains both system names and the system ID's which solves that issue. Once cached I am just going through it with simplexml. and xpath
I would like some input on caching though, when I go $pheal -> Jumps(); It doesn't cache the output. Is there something I have to do to make sure that it is being cached? It works naturally on $pheal -> Sovereignty();
I am probably missing the fundamental basics here, but would really appreciate if you could get me on the right path with this.
EDIT: here is the base code I am working from.
Quote:
require_once "pheal/Pheal.php"; spl_autoload_register("Pheal::classload"); PhealConfig::getInstance()->cache = new PhealFileCache('[path]/cache/'); PhealConfig::getInstance()->archive = new PhealFileArchive('[path]pheal/cache/'); $pheal = new Pheal(null, null, 'map'); $pheal->Jumps();
|

Sol Laxon
Aideron Robotics Darkmatter Initiative
0
|
Posted - 2012.01.30 18:36:00 -
[20] - Quote
Also what I have in the cache looks like this:
public/public/map/Sovereignty/Request.xml
and the exact copy in a dated folder. No /map/Jumps as I would expect. |

Peter Powers
FinFleet Raiden.
42
|
Posted - 2012.01.30 18:42:00 -
[21] - Quote
Sol Laxon wrote:Also what I have in the cache looks like this:
public/public/map/Sovereignty/Request.xml
and the exact copy in a dated folder. No /map/Jumps as I would expect. i just run that code on my own machine:
disasta@j3737:/tmp$ ls -la testcache/public/public/map/Jumps/Request.xml -rw-rw-rw- 1 disasta disasta 254079 Jan 30 19:40 testcache/public/public/map/Jumps/Request.xml
so it seems to work here. have you checked your errorlog?
|

Sol Laxon
Aideron Robotics Darkmatter Initiative
0
|
Posted - 2012.01.30 18:52:00 -
[22] - Quote
Could it be something with the timing? So it isn't adding new cache files because sovereignty was cached too recently?
edit: There are no errors in the log. |

Peter Powers
FinFleet Raiden.
42
|
Posted - 2012.01.30 19:18:00 -
[23] - Quote
Sol Laxon wrote:Could it be something with the timing? So it isn't adding new cache files because sovereignty was cached too recently? . no. |

Sol Laxon
Aideron Robotics Darkmatter Initiative
0
|
Posted - 2012.01.30 19:23:00 -
[24] - Quote
Sorry for all these questions Peter,
I have deleted the folders under cache, and now everything is being added properly. The only thing is it now only has the dated folder, and not the second folder with the unchanging path to the result files.
so it has /cache/2012-01-30/public/public/map/Jumps/Request_20120130-191258.xml and no longer has the: public/public/map/Jumps/Request.xml
Any ideas where I went wrong now? |

Peter Powers
FinFleet Raiden.
42
|
Posted - 2012.01.30 19:28:00 -
[25] - Quote
Sol Laxon wrote:Sorry for all these questions Peter,
I have deleted the folders under cache, and now everything is being added properly. The only thing is it now only has the dated folder, and not the second folder with the unchanging path to the result files.
so it has /cache/2012-01-30/public/public/map/Jumps/Request_20120130-191258.xml and no longer has the: public/public/map/Jumps/Request.xml
Any ideas where I went wrong now? the "dated" folder, is the one that the archive adds. im not sure if you even want that.
i havent used the archive stuff myself, but maybe you should have archive and cache write to different directories anyways. |

Sol Laxon
Aideron Robotics Darkmatter Initiative
0
|
Posted - 2012.01.31 01:03:00 -
[26] - Quote
Thank you, I think that did the trick.
And thank you very much for creating this piece of code :)
I am currently using the following code, after I get everything cached via a cron:
Quote://Getting the System ID, $sysname comes from the eve browser data. $xml = simplexml_load_file("YOURPATH/Request.xml"); $pathx = "//row[@solarSystemName='".$sysname."']"; $result = $xml->xpath($pathx); $sysid = $result[0]['solarSystemID'];
//Getting the Jumps $xml = simplexml_load_file("YOURPATH/Jumps/Request.xml"); $pathx = "//row[@solarSystemID='".strval($sysid)."']"; $result = $xml->xpath($pathx); $theJumps = $result[0]['shipJumps'];
Just in case this can help out someone finding this in a search. Someone else has recommended a restructure of this though, but it went over my head. Will be playing around with it till I can understand. |

graves warship
United Kings Rolling Thunder.
1
|
Posted - 2012.02.10 10:49:00 -
[27] - Quote
currently on my forums i am using the phpbb3 authentication tool which you can find here further up the pages but it gives me a pheal error
can you point me in th right direction as where to look?
Fatal error: Cannot access protected property PhealHTTPException::$code in /datasan/www/vhosts/xxxxxx/httpdocs/forums/includes/eveapi/functions_eveapi.php on line 261
thnx |

Trenker
11
|
Posted - 2012.02.10 10:54:00 -
[28] - Quote
graves warship wrote: Fatal error: Cannot access protected property PhealHTTPException::$code in /datasan/www/vhosts/xxxxxx/httpdocs/forums/includes/eveapi/functions_eveapi.php on line 261
Sounds like you are trying something like
echo $exception->code;
the code property is not public, as the error says, try
echo $exception->getCode();
instead.
|

graves warship
United Kings Rolling Thunder.
1
|
Posted - 2012.02.10 11:01:00 -
[29] - Quote
catch(PhealException $e) { $charArray["error"][$e->code] = $e->getMessage(); cronlog('EVE API error: ' . $e->code . ' -> ' . $e->getMessage(), $characterName);
is about what the code is around those lines
|

graves warship
United Kings Rolling Thunder.
1
|
Posted - 2012.02.10 11:04:00 -
[30] - Quote
could it be that eve has blocked our ip adress from the use of the api ?
|
| |
|
| Pages: [1] 2 :: one page |
| First page | Previous page | Next page | Last page |