Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged json



« Prev 1 2
  1. FAV

    Creating and Parsing JSON Data in PHP

    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.
    PHP 9 views posted 6 years ago by apphp-snippets
  2. FAV

    JSONP Public API with jQuery getJSON (callback) (MySql)

    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 }...
    PHP saved by 4 people 9 views posted 7 years ago by halk
  3. FAV

    REST API products and categories from pinnacleCart

    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: #...
    PHP 5 views posted 7 years ago by crypticsoft
  4. FAV

    Listing Google Spreadsheet answers with PHP (Parsing JSON)

    Make your spreadsheet public to get a key like this: 0AsfENoKj1ir7dE8yR6U0aUtpdTVNM20wRlNJOhZaclG Set it on the script and you're all done.
    PHP 5 views posted 7 years ago by Felladrin
  5. FAV

    Pass PHP array parameter to Javascript Function

    Writing an PHP array in a javascript file with json_encode.
    PHP 10 views posted 7 years ago by Narayon
  6. FAV

    JSON with a PHP proxy

    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
    PHP 7 views posted 8 years ago by inreflection7
  7. FAV

    JS data from json - CrossDomian

    If not have access to edit json, setting url possible is: url: 'http://graph.facebook.com/4/?callback=getDatosUsuario'
    PHP 4 views posted 8 years ago by nicolaspar
  8. FAV

    PHP + JSON + Twitter API

    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.
    PHP 11 views posted 8 years ago by richardmaisano
  9. FAV

    Create a Basic Web Service Using PHP, MySQL, XML, and JSON

    PHP saved by 8 people 17 views posted 8 years ago by mb2o
  10. FAV

    Object to Array

    PHP saved by 4 people 3 views posted 8 years ago by frederichoule
  11. FAV

    PHP JSON Headers

    PHP saved by 6 people 5 views posted 9 years ago by simondiercks
  12. FAV

    Example of a JSON encoded repsonse

    PHP 2 views posted 9 years ago by dropthenerd
  13. FAV

    Check if a string it's json encoded using regular expressions

    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/
    PHP 5 views posted 9 years ago by jatubio
  14. FAV

    PHP Array into Javascript Array with JSON

    PHP 1 views posted 9 years ago by whak
  15. FAV

    Processing json POST request with PHP

    PHP 0 views posted 9 years ago by wnasich
  16. FAV

    Store array in cookie

    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.
    PHP saved by 3 people 5 views posted 9 years ago by liamchapman
  17. FAV

    Flickr Photos Pull-In PHP JSON

    PHP saved by 3 people 3 views posted 9 years ago by mloberg
  18. FAV

    Twitter PHP Script

    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.
    PHP saved by 6 people 14 views posted 9 years ago by mloberg
  19. FAV

    Simple Vimeo JSON API Implementation

    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.
    PHP 2 views posted 9 years ago by mloberg
  20. FAV

    Tumblr JSON API Implementation

    PHP saved by 6 people 3 views posted 9 years ago by mloberg
  21. FAV

    Run content plugins on JDocument type RAW (ie temp. replace JDocument with a different type)

    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...
    PHP 2 views posted 9 years ago by harikaram
  22. FAV

    PHP Function for show JSON Raw a bit more readable

    PHP 6 views posted 9 years ago by jvandemerwe
  23. FAV

    How to access a JSON in PHP easy (like a JSON recordset with multiple fields)

    PHP saved by 4 people 10 views posted 9 years ago by jvandemerwe
  24. FAV

    Process Tumblr JSON Feed

    Tumblr API: http://www.tumblr.com/docs/de/api
    PHP 1 views posted 9 years ago by ichnoweb
  25. FAV

    MySQLi convert a result set to CSV or to JSON

    PHP saved by 8 people 2 views posted 10 years ago by ginoplusio
  26. FAV

    Parse JSON Data

    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.
    PHP saved by 2 people 0 views posted 10 years ago by paulgrenwood
  27. FAV

    MySQL to JSON - PHP Class

    mysql2json.class.php
    PHP saved by 5 people 15 views posted 10 years ago by hasantayyar
  28. FAV

    cookie_encode & cookie_decode

    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.
    PHP saved by 1 person 3 views posted 10 years ago by segdeha
  29. FAV

    php twitpocalypse bugfix

    PHP 1 views posted 10 years ago by wokon
  30. FAV

    json header in php

    PHP saved by 4 people 5 views posted 10 years ago by michaelfox
« Prev 1 2