Forums | Chat | News | Contact Us | Register | PSU Social |
PSU: May I salvage your earwax?
Forums | Chat | News | Contact Us | Register | PSU Social |
Home | Forum | Chat | Wiki | Social | AGN | PS2 Stats |
|
|
|
Thread Tools | Search this Thread | Display Modes |
2013-03-05, 08:16 AM | [Ignore Me] #2 | ||
Private
|
Happy to help, but we are going to need more details on what areas you are having issues with so we can give specific help. Have you been through all teh details on http://census.soe.com/?
__________________
outfitpoints.com - the Planetside 2 Outfit Management Toolkit |
||
|
2013-03-05, 09:44 AM | [Ignore Me] #3 | ||
PSU Admin
|
Also check out our initial Wiki page on the API:
http://wiki.planetside-universe.com/ps/API Otherwise as mentioned we will need more info on what you are trying to do. |
||
|
2013-03-08, 04:16 AM | [Ignore Me] #5 | ||
Private
|
I went through the information that you all provded I never knew about he PSU wiki thanks for that
one question i Have is how do I extract information from this link in php @_@ http://census.soe.com/get/ps2-beta/o..._online_status that was pulled from the census.seo.com example url |
||
|
2013-03-08, 12:28 PM | [Ignore Me] #6 | |||
PSU Code Monkey
|
|
|||
|
2013-03-10, 12:08 AM | [Ignore Me] #7 | |||
Contributor Private
|
Code:
<?php error_reporting(E_ALL); ini_set('display_errors', 1); $folder = "ps2-beta"; $outfit_alias = "666"; $member_status = json_decode(file_get_contents("http://census.soe.com/get/$folder/outfit?alias=$outfit_alias&c:resolve=member_online_status")); ?> Hope that helps.
__________________
|
|||
|
2013-03-10, 10:39 PM | [Ignore Me] #9 | ||
Private
|
I am having an issue with this piece of code its not showing up for anybody but locally it works and outputs the information anybody have any ideas? thanks!
Code:
$character = $_POST["character"]; $submit = $_POST["submit"]; if (isset($submit)) { $ApiLink = "https://census.soe.com/get/ps2-beta/character/?name.first_lower=^" . $character . "&c:limit=1000&c:show=name.first&c:show=id&c:show=type.faction"; $json_decode = (json_decode(file_get_contents($ApiLink), true)); $output = $json_decode["character_list"]; foreach ($output as $key=> $value) { $get_character[$key] = $output[$key]["name"]; $get_character_id[$key] = $output[$key]["id"]; echo $get_character[$key]["first"] . "<br/>"; echo "it worked you submited " . $character; } } else { ?> <form action="search.php" method="POST"> <input type="text" name="character" autofocus required> <input name="submit" type="submit" value="Find me!"> </form> <?php } |
||
|
2013-03-11, 03:12 PM | [Ignore Me] #10 | ||
PSU Code Monkey
|
It works for me, are you using CaSe in your search that isn't working? Should probably change to strtolower($_POST["character"]) to ensure you are searching with lower.
FYI, there is also a limit of 100 results. http://www.planetside-universe.com/api/squirrel.php http://www.planetside-universe.com/api/squirrel.phps http://pside.co/YYv2nz Last edited by Ghryphen; 2013-03-12 at 05:05 PM. |
||
|
2013-03-13, 05:08 AM | [Ignore Me] #11 | ||
Private
|
awesome thanks =b I got it to work it was the strtolwr
I am having errors with an outfit listing here is the code and error Error HTML Code:
Warning: Invalid argument supplied for foreach() in F:\web server\wamp\www\API\includes\functions-outfit.php on line 37 Call Stack # Time Memory Function Location 1 0.0002 249376 {main}( ) ..\outfit.php:0 2 0.0021 527856 display_outfit_members( ) ..\outfit.php:28 HTML Code:
foreach ($output as $key => $value) { $alias***91;$key***93; = $output***91;$key***93;***91;"alias"***93;; $name***91;$key***93; = $output***91;$key***93;***91;"name"***93;; $members***91;$key***93; = $output***91;$key***93;***91;"members"***93;; foreach ($members***91;$key***93; as $row) { $name_user = $row***91;'name'***93;***91;'first'***93;; $char_id = $row***91;'character_id'***93;; $outfit_rank = $row***91;'rank'***93;; $experience = $row***91;'experience'***93;; $kills = $row***91;'stats'***93;***91;'kills'***93;***91;'value'***93;; $deaths = $row***91;'stats'***93;***91;'deaths'***93;***91;'value'***93;; $kdr = $row***91;'stats'***93;***91;'kill_death_ratio'***93;***91;'value'***93;; $fcc = $row***91;'stats'***93;***91;'facility_capture_count'***93;***91;'value'***93;; $fdc = $row***91;'stats'***93;***91;'facility_defended_count'***93;***91;'value'***93;; $medals = $row***91;'stats'***93;***91;'medal_count'***93;***91;'value'***93;; echo "<tr>"; echo "<td><a href='character.php?id=" . $char_id . "'>" . $name_user . "</a></td>"; echo "<td>" . $outfit_rank . "</td>"; foreach ($experience as $expier => $value) { echo "<td>" . $value***91;'rank'***93; . "</td>"; echo "<td>" . $value***91;'score'***93; . "</td>"; } echo "<td>" . $kills . "</td>"; echo "<td>" . $deaths . "</td>"; echo "<td>" . number_format($kdr, 3) . "</td>"; echo "<td>" . $fcc . "</td>"; echo "<td>" . $fdc . "</td>"; echo "<td>" . $medals . "</td>"; echo "</tr>"; } |
||
|
2013-03-17, 04:46 AM | [Ignore Me] #12 | ||
Staff Sergeant
|
Just have it var_dump the variables when it gives you an error so you can check what's wrong. Most likely the cause is that the API decides to return data that doesn't happen to contain the values. Some rows it returns are incomplete, and thus if your code assumes certain keys exist, it won't work properly.
They really should fix the API so it returns nulls for data that's not in place since missing keys is definitely not the right way to go. |
||
|
|
Bookmarks |
Tags |
mar05tweet |
|
|