These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

lotto, wallet walking and pulling from api

Author
Louis Vitton
Viziam
Amarr Empire
#1 - 2012-01-31 09:14:34 UTC  |  Edited by: Louis Vitton
Hey guys,

The titel is a but bad for this thread sorry.

I am looking for a lotto script like all the others which will update fro mthe journal who gives a certain amount and allocate them a ticket based on the amount they give.

I am not looking to start a lotto or anything like that i wish to use this script to learn off how it is done i know that sounds noobish but i am learning php and a noob to it all so i like examples to learn off it helps me heaps overall.

The main goal is to get it to work so if someone deposits isk it will read it and who did it. updating as it updates the journal.

Cheers Louis.

Edit: Preferably in PHP language.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2012-01-31 12:35:03 UTC
Something to get you started.
Quote:

< ?php


$keyid='123456';
$vcode="uGFDkldjgkflgeriogedxkgdfjgkdhfjgkdhfjkghdkfjghdkfjghkd0";
$characterid='493048293';

$data = file_get_contents("https://api.eveonline.com/char/WalletJournal.xml.aspx?keyID=".$keyid."&vcode=".$vcode."&characterID=".$characterid);
$xml = new SimpleXMLElement($data);

foreach ($xml->result->rowset->row as $row){

echo $row{'ownerName1'};
echo "\n";
echo $row{'ownerID1'};
echo "\n";
echo $row{'amount'};
echo "\n";

}
? >



Just fill in the keyid, vcode and character id.

If you want to see everything, var_dump($xml)

SimpleXML is a bit of a pain to work with, until you realize how it all fits together. And that you often have to cast the elements into specific data types before using them.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter