Results 1 to 4 of 4
Thread: Faster Json data pull
-
01-04-2014, 08:30 PM #1Newbie
- Join Date
- Jan 2014
- Posts
- 15
Faster Json data pull
as the title says I want to pull data from the API FASTER! I am currently trying to pull data quicker here is my sample code
--------------------------------------------------------------
$ ApiLink = " http: //census.soe.com/ " ;
$json_decode = (json_decode(file_get_contents($ApiLink), true));
$tada = $json_decode["character_list"];
--------------------------------------------------------------
the above information takes 2.4633 seconds to load, I want to make this happen faster... when I load the url it takes 1419 MS if you scroll to the bottom but when I view the same url it takes 2 seconds
Any tips will be appreciated
Thanks!
-
01-05-2014, 11:07 AM #2Junior Guru Wannabe
- Join Date
- Oct 2011
- Location
- Cary, NC (USA)
- Posts
- 49
CrankedCode.com - Professional Mobile and Web Development
-
01-05-2014, 11:12 AM #3WHT Addict
- Join Date
- Jan 2011
- Posts
- 147
Is the api return data date wise? If so run cron daily and store data daily.
The coder.
-
01-05-2014, 04:48 PM #4Newbie
- Join Date
- Jan 2014
- Posts
- 15
I do cache most of everything in MySQL but there are a few small items which I want to be "live" just this small piece
http: //census.soe.com/get/ps2:v2/characters_online_status/?character_id=5428029729515051201
the api tells me how long it takes to get the info
timing: {
characters_online_status-ms: 13,
total-ms: 13
}
but when I pull it using json_decode takes longer than the API says instead of Milliseconds it takes seconds to load
Similar Threads
-
Faster Web Host : Experience A Reliable, Faster Business Hosting ! 75 % OFF!
By fasterwebhost in forum Shared Hosting OffersReplies: 0Last Post: 10-09-2013, 02:09 AM -
Want to pull data from a URL and display it using PHP/HTML
By 2399Skillz in forum Programming DiscussionReplies: 14Last Post: 11-17-2012, 10:30 PM -
Dynamically pull data to website from excel question
By tinoisawesome in forum Web HostingReplies: 13Last Post: 03-10-2012, 11:26 PM -
Small task (php/mysql), pull data from db and list it in A-Z listing
By mrsam in forum Employment / Job OffersReplies: 8Last Post: 07-27-2004, 06:26 AM