Guest User

Untitled

a guest
Dec 28th, 2014
139
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <title></title>
  7. </head>
  8. <body>
  9. <html>
  10. <p>
  11. <?php
  12. error_reporting(0);
  13. @ini_set('display_errors', 0);
  14. /* SMF theme
  15. require("/home/xxxxx/public_html/Osmosis/SSI.php");
  16. $context['page_title_html_safe'] = 'Ratters';
  17. template_header();
  18. */
  19. ?>
  20. <?php
  21. //API Stuff
  22. $keyID="xx";
  23. $vcode="xxxxxxx";
  24. $accountKey="1000"; //the division you want
  25. //pull API
  26. $url = "http://api.eveonline.com/corp/WalletJournal.xml.aspx?keyID=".$keyID."&vcode=".$vcode."&accountKey=".$accountKey."";
  27. $file = file_get_contents($url);
  28. $xml = new SimpleXMLElement($file);
  29. //parsing XML
  30. if ($xml === false)
  31. {
  32. die('Error parsing XML');
  33. }
  34. //now we can loop through the xml structure
  35. foreach ($xml -> result -> rowset-> row as $row)
  36. //echo "<table><thead><tr><th>Time</th><th>Name</th><th>System</th><th>Amount</th><th>Corp Balance</th></tr></thead><tbody>";
  37. {
  38. //name
  39. // $transactionType = $row['ownerName2'];
  40. //amount
  41. // $typeName = $row['amount'];
  42. $myFields = array("Time:" => $row['date'],
  43. "Name:" => $row['ownerName2'],
  44. "System:" => 'OPSEC',
  45. "Amount:" => $row['amount'],
  46. "Balance:" => $row['balance']);
  47. echo '<tbody><table><tr>';
  48. //echo "<table><thead><tr><th>Name</th><th>Email</th></tr></thead><tbody>";
  49. foreach($myFields as $field_title => $field_value)
  50. echo
  51. '<td>', $field_title, '</td>
  52. <td>', $field_value, '</td>';
  53. echo '</tbody></tr></table>';
  54. }
  55. //test
  56. ?>
  57. </p>
  58. </body>
  59. </html>
  60. <?php
  61. template_footer(); ?>
RAW Paste Data