Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged json



« Prev 1 2
This code demonstrates how to create and parse the JSON data format of using array of PHP. It's a very simple code, that allows you to perform this task.
0 2693 posted 11 years ago by apphp-snippets
This is a public jsonp api. I use it with jQuery Like This: $.getJSON("http://yourdomain/yourpath/jsonp_api.php?method=getSchema&params=your_db_name&jsoncallback=?", function(data){ //DO SOMETHING WITH THE DATA HERE }...
1 1777 posted 13 years ago by halk
This is a useful class which utilizes Phil Sturgeon's helpful restclient (http://getsparks.org/packages/restclient/versions/HEAD/show). Reference the URL attached for PinnacleCart API docs. Example request URLs to get products and categories: #...
0 1645 posted 13 years ago by crypticsoft
Make your spreadsheet public to get a key like this: 0AsfENoKj1ir7dE8yR6U0aUtpdTVNM20wRlNJOhZaclG Set it on the script and you're all done.
0 1643 posted 13 years ago by Felladrin
Writing an PHP array in a javascript file with json_encode.
0 1896 posted 13 years ago by Narayon
Use PHP to get JSON 1) set the PHP to the URL of the JSON 2) echo a variable with the loaded data 3) use a request via jQuery to get the variable from PHP
0 1558 posted 14 years ago by inreflection7
If not have access to edit json, setting url possible is: url: 'http://graph.facebook.com/4/?callback=getDatosUsuario'
0 1472 posted 14 years ago by nicolaspar
Nothing revolutionary, just a simple implementation. A reworking from Brian Cray's source code: http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/ Note: requires creating a cache file, '/caches/twitter', relative to source.
0 1486 posted 14 years ago by richardmaisano
1 1942 posted 14 years ago by frederichoule
2 1699 posted 14 years ago by simondiercks
0 1304 posted 14 years ago by dropthenerd
Check if a string it's json encoded using regular expressions Thanks to Jens Anders Bakke for his mootools code published in webfreak.no http://webfreak.no/wp/2007/09/07/jsontest-for-mootools/
0 1650 posted 14 years ago by jatubio
0 1342 posted 15 years ago by whak
0 1419 posted 15 years ago by wnasich
Simple function to store an array in a cookie. Uses JSON. To pull data out of cookie use 'json_decode()'. It can then be looped etc.
1 2140 posted 15 years ago by liamchapman
1 1698 posted 15 years ago by mloberg
A Twitter pull-in that I coded using PHP. Uses the JSON user_timeline Twitter API call. It displays the tweet with links to any urls, users, or hashtags, the time ago, and if it was in reply to anyone.
2 1797 posted 15 years ago by mloberg
This is a very simple use of the Vimeo API. All it does is list the video title, a thumbnail of the video, and the description. More advance script coming later.
0 1303 posted 15 years ago by mloberg
2 1662 posted 15 years ago by mloberg
Say you want to run content plugins on JDocumentRAW content (like in a component that returns JSON data). Some methods in JDocumentHTML like "addCustomTag" will cause the app to fail on JDocumentRAW doc types which don't have this method. Thus you...
0 1574 posted 15 years ago by harikaram
Tumblr API: http://www.tumblr.com/docs/de/api
0 1171 posted 15 years ago by ichnoweb
With most of the popular web services like Twitter providing their data through APIs, it is always helpful to know how to parse API data which is sent in various formats including JSON, XML etc.
1 1202 posted 16 years ago by paulgrenwood
This is a great way to save complex objects as cookie values. You can't just json_encode because commas are not legal in cookie values. Remember not to use this for anything too big because cookies have a 4KB limit.
1 1219 posted 16 years ago by segdeha
0 996 posted 16 years ago by wokon
1 1656 posted 16 years ago by michaelfox
A fallback for php's json_encode functionality. What do you think?
1 1242 posted 16 years ago by kirie
« Prev 1 2