<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ashley Ford - Tutorials :: jQuery :: PHP :: CSS :: HTML5 :: Papermashup.com &#187; API&#8217;s</title>
	<atom:link href="http://papermashup.com/category/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://papermashup.com</link>
	<description>Ashley Ford - Tutorials :: jQuery :: PHP :: CSS :: HTML5 :: Papermashup.com</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:28:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using Google&#8217;s Weather API</title>
		<link>http://papermashup.com/using-googles-weather-api/</link>
		<comments>http://papermashup.com/using-googles-weather-api/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 16:46:58 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=2471</guid>
		<description><![CDATA[I thought it would be a nice little project to write a tutorial on how to build a basic but powerful weather application for either mobile devices or the desktop. The application takes a set of Google weather API feeds &#8230; <br/> <a href="http://papermashup.com/using-googles-weather-api/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>I thought it would be a nice little project to write a tutorial on how to build a basic but powerful weather application for either mobile devices or the desktop. The application takes a set of Google weather API feeds and makes some simple decisions based on the output. For example we can recommend the user takes an umbrella if rain or storms are forecast, or whether the temperature warrants the need for warm clothes. Basic but nonetheless useful information.</p>
<h3>The Logic Code</h3>
<p>Lets have a quick run through at what the project consists of. Firstly we use the simplexml_load_file() PHP function to get the xml data for the given location. We then check to see if the current weather condition is in the XML file. If it doesn&#8217;t exist then we can make the assumption that the API feed couldn&#8217;t determine the location, bear in mind this is very basic error checking and if the feed fails it will still return this error.</p>
<p>We now do some basic data checking to to see what extra data we can give the user. Firstly we check on line 14 to see if the current weather and forecast are different, if they are different we&#8217;ll display the forecast if not we show just the current weather.</p>
<p>Next on lines 21 and 28 we do a simple check to see if the temperature is higher or lower than 20 degrees and echo whether it&#8217;s likely to be hot or cold. </p>
<p>Finally on lines 35 we check to see if the current or future forecast contains any rain or storms so we can recommend the user takes an umbrella. This is done using some basic PHP regular expression.</p>
<pre class="brush: php; title: ;">
	// load the XML feeds for the Google Weather API
	$xml = simplexml_load_file('http://www.google.com/ig/api?weather='.urlencode($_GET['location']));
	$current = $xml-&gt;xpath(&quot;/xml_api_reply/weather/current_conditions&quot;);
	$forecast = $xml-&gt;xpath(&quot;/xml_api_reply/weather/forecast_conditions&quot;);

	// do a basic error check to see if we can get the current weather condition for the given location
	// if no return an error.
	if(!$current[0]-&gt;condition['data']){

		$error = 'Couldn\'t determine this location';

		}

	// is the current weather the same as the forecast? if not display the forecast
	if(strtolower($current[0]-&gt;condition['data'])!=strtolower($forecast[0]-&gt;condition['data'])){

	$outlook = 'but the forecast says '.strtolower($forecast[0]-&gt;condition['data']);	

		}

	// if the temp in degrees c is below 20 i.e. cold
	if($current[0]-&gt;temp_c['data']&lt;=20){

	$coat = 'If you\'re going outside i\'d wrap up warm.';	

		}	

	// if the temp in degrees c is over 21 i.e. Warm / Hot
	if($current[0]-&gt;temp_c['data']&gt;=21){

	$coat = 'You should be ok without warm clothes today.';	

		}		

	// check to see if there is rain or storms forecast
	if (preg_match(&quot;/\brain\b/i&quot;, $current[0]-&gt;condition['data']) ||
		preg_match(&quot;/\brain\b/i&quot;, $forecast[0]-&gt;condition['data']) ||
		preg_match(&quot;/\bstorm\b/i&quot;, $current[0]-&gt;condition['data']) ||
		preg_match(&quot;/\bstorm\b/i&quot;, $forecast[0]-&gt;condition['data'])
		){

		$umbrella = ' But &lt;u&gt;don\'t forget to take an umbrella&lt;/u&gt;!';
		}
</pre>
<h3>Displaying the data</h3>
<pre class="brush: php; title: ;">
&lt;form action=&quot;&quot; method=&quot;get&quot;&gt;
&lt;label for=&quot;location&quot;&gt;Location&lt;/label&gt;
&lt;input type=&quot;text&quot; class=&quot;location&quot; name=&quot;location&quot; value=&quot;&lt;?php echo $_GET['location'];?&gt;&quot;/&gt;
&lt;/form&gt; 

&lt;?php if(!empty($_GET['location'])){

	if($error){ echo '&lt;div class=&quot;errors&quot;&gt;'.$error.'&lt;/div&gt;'; }else{

?&gt;

&lt;div class=&quot;weather_app&quot;&gt;

&lt;h1&gt;Weather Summary for &lt;?php echo $_GET['location'];?&gt;&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;?php echo '&lt;img src=&quot;http://google.com'.$current[0]-&gt;icon['data'].'&quot;/&gt;'; ?&gt; The weather in &lt;?php echo $_GET['location'];?&gt; is &lt;strong&gt;&lt;?php echo strtolower($current[0]-&gt;condition['data']).' '. $outlook;?&gt;&lt;/strong&gt;. The temperature is currently &lt;strong&gt;&lt;?php echo $current[0]-&gt;temp_c['data']; ?&gt;&amp;deg;c (&lt;?php echo $current[0]-&gt;temp_f['data']; ?&gt;&amp;deg;f)&lt;/strong&gt;. &lt;?php echo $coat;?&gt; &lt;?php echo $umbrella;?&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;?php } } ?&gt;
</pre>
<p><a href="http://papermashup.com/demos/google-weather-api/?location=Bristol"><img src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" title="demo" class="alignnone size-full wp-image-23" /></a> <a href="http://papermashup.com/demos/google-weather-api/google-weather-api.zip"><img src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="download" title="download" class="alignnone size-full wp-image-24" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/using-googles-weather-api/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Country drop down list with php function</title>
		<link>http://papermashup.com/country-drop-down-list-with-php-function/</link>
		<comments>http://papermashup.com/country-drop-down-list-with-php-function/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 06:30:21 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=2429</guid>
		<description><![CDATA[I had a project recently that required the user to select their country from a drop down list and store the data in a database. It was such a long process setting up the PHP switch statement that I thought &#8230; <br/> <a href="http://papermashup.com/country-drop-down-list-with-php-function/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>I had a project recently that required the user to select their country from a drop down list and store the data in a database. It was such a long process setting up the PHP switch statement that I thought someone might find it useful for a project. The code below is a snapshot of the switch statement I&#8217;ve setup. The download at the bottom includes 238 countries and continents. You just need to store the country code in the database then call the function below to return the country name.</p>
<h3>Code snapshot</h3>
<p>Below is a snapshop of the PHP switch statement. <a href="http://papermashup.com/demos/php-country-dropdown/php-country-dropdown.zip">Download the full code of the tutorial here</a>. Upload the PHP file included and see the demos.</p>
<pre class="brush: php; title: ;">

function user_country($country){

	switch($country){

		case 'AF':
		$name = 'Afghanistan';
		break;

	        case 'AL':
		$name = 'Albania';
		break;	

	        case 'DZ':
		$name = 'Algeria';
		break....	

	  } 

	return array(

		&quot;name&quot; =&gt; $name

		);

		}
</pre>
<h3>The HTML</h3>
<p>Again this is a snapshot of the select drop down form.</p>
<pre class="brush: xml; title: ;">

    &lt;label&gt;Country&lt;/label&gt;
        &lt;select name=&quot;country&quot;&gt;
          &lt;option value=&quot;AF&quot;&gt;Afghanistan&lt;/option&gt;
          &lt;option value=&quot;AL&quot;&gt;Albania&lt;/option&gt;
          &lt;option value=&quot;DZ&quot;&gt;Algeria&lt;/option&gt;
    	  .......
        &lt;/select&gt; 
</pre>
<p><a href="http://papermashup.com/demos/php-country-dropdown/php-country-dropdown.zip"><img src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="download" title="download" class="alignnone size-full wp-image-24" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/country-drop-down-list-with-php-function/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML5 Geo location using the Google API</title>
		<link>http://papermashup.com/html5-geo-location-using-the-google-api/</link>
		<comments>http://papermashup.com/html5-geo-location-using-the-google-api/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 17:56:19 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[maps]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=2151</guid>
		<description><![CDATA[HTML5 came on the scene around the beginning of the year, but as we&#8217;re seeing more browsers becoming more sophisticated and applications more intelligent how can we use HTML5 to our advantage and what can it do to make life a &#8230; <br/> <a href="http://papermashup.com/html5-geo-location-using-the-google-api/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>HTML5 came on the scene around the beginning of the year, but as we&#8217;re seeing more browsers becoming more sophisticated and applications more intelligent how can we use HTML5 to our advantage and what can it do to make life a little easier. Well one of the things we can do is plot your location on a Google map using the maps API and a touch of HTML5. <a href="http://remysharp.com/">Remy Sharp</a> a fellow UK developer wrote about this along with a demo a while back. You can see the <a href="http://papermashup.com/demos/html5-geolocation/">demo here</a>.</p>
<h3>The Code</h3>
<p>The first line of code included below is the Google API library for geo location. This code is compatible across the following browsers: Opera, FireFox, Chrome, and Safari. It will also work on Safari Mobile. </p>
<p>Using the Google Map Canvas our web browser sends our location through to the API which then plots it on the map. I&#8217;ve found it to be a bit in accurate at times but it works 80% of the time. You&#8217;ll also have to click &#8216;allow&#8217; in Google Chrome to allow your location to be shared.  </p>
<pre class="brush: jscript; title: ;">

&lt;section id=&quot;wrapper&quot;&gt;

&lt;script type=&quot;text/javascript&quot; src=&quot;http://maps.google.com/maps/api/js?sensor=true&quot;&gt;&lt;/script&gt;
    &lt;article&gt;
      &lt;p&gt;&lt;span id=&quot;status&quot;&gt;Please wait whilst we try to locate you...&lt;/span&gt;&lt;/p&gt;
    &lt;/article&gt;
&lt;script&gt;
function success(position) {
  var s = document.querySelector('#status');

  if (s.className == 'success') {
    return;
  }

  s.innerHTML = &quot;found you!&quot;;
  s.className = 'success';

  var mapcanvas = document.createElement('div');
  mapcanvas.id = 'mapcanvas';
  mapcanvas.style.height = '400px';
  mapcanvas.style.width = '560px';

  document.querySelector('article').appendChild(mapcanvas);

  var latlng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
  var myOptions = {
    zoom: 15,
    center: latlng,
    mapTypeControl: false,
    navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById(&quot;mapcanvas&quot;), myOptions);

  var marker = new google.maps.Marker({
      position: latlng,
      map: map,
      title:&quot;You are here!&quot;
  });
}

function error(msg) {
  var s = document.querySelector('#status');
  s.innerHTML = typeof msg == 'string' ? msg : &quot;failed&quot;;
  s.className = 'fail';

  // console.log(arguments);
}

if (navigator.geolocation) {
  navigator.geolocation.getCurrentPosition(success, error);
} else {
  error('not supported');
}

&lt;/script&gt;
&lt;/section&gt;
</pre>
<p><a href="http://papermashup.com/demos/html5-geolocation/"><img src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" title="demo" class="alignnone size-full wp-image-23" /></a><a href="http://papermashup.com/demos/html5-geolocation/html5-geolocation.zip"><img src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="download" title="download" class="alignnone size-full wp-image-24" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/html5-geo-location-using-the-google-api/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Latest tweets tooltip plugin with  jQuery</title>
		<link>http://papermashup.com/latest-tweets-tooltip-plugin-with-jquery/</link>
		<comments>http://papermashup.com/latest-tweets-tooltip-plugin-with-jquery/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 11:20:15 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=2070</guid>
		<description><![CDATA[Whilst browsing my feeds I found an interesting post by Cody over at Codrops on how to add a twitter tooltip popup on any paragraph of text. You can find the main plugin here: jQuery Twitter Search Plugin or view &#8230; <br/> <a href="http://papermashup.com/latest-tweets-tooltip-plugin-with-jquery/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Whilst browsing my feeds I found an interesting post by Cody over at <a href="http://tympanus.net/codrops/">Codrops</a> on how to add a twitter tooltip popup on any paragraph of text.</p>
<p>You can find the main plugin here: <a href="http://jquery.malsup.com/twitter/">jQuery Twitter Search Plugin</a> or view the <a href="http://tympanus.net/Development/LatestTweetsTooltip/">demo</a></p>
<h3>The Code</h3>
<p>Oh well there&#8217;s not much to brag about here but here&#8217;s how to initialise the plugin.</p>
<p>The popup box that appears can be dragged and resized. Clicking on the cross will make it disappear. The tweets are constantly being loaded in a predefined time span. This loading stops when the user hovers over the tooltip box.</p>
<p>If you want to configure and restyle the tooltip, you will need to have a look at the configurations of the Twitter Search Plugin. Many parameters can be set here, from style to timings.</p>
<pre class="brush: jscript; title: ;">
$(function() {
	$('#article').find('.twitter_search').twitterpopup();
});
</pre>
<p>Check out the <a href="http://tympanus.net/Development/LatestTweetsTooltip/">demo</a> and <a href="http://tympanus.net/codrops/2010/07/20/latest-tweets-tooltip/">download</a> over at Codrops.</p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/latest-tweets-tooltip-plugin-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Build a MySpaceID Application</title>
		<link>http://papermashup.com/build-a-myspaceid-application/</link>
		<comments>http://papermashup.com/build-a-myspaceid-application/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 11:43:38 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Front Page]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=2004</guid>
		<description><![CDATA[MySpaceID allows MySpace Users to easily come into your site and get going by bringing their identity with them. By allowing Users to link their MySpace account with your site, a Developer can enable social functionality. This guide is designed &#8230; <br/> <a href="http://papermashup.com/build-a-myspaceid-application/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>MySpaceID allows MySpace Users to easily come into your site and get going by bringing their identity with them. By allowing Users to link their MySpace account with your site, a Developer can enable social functionality.</p>
<p>This guide is designed to give you a thorough understanding of the MySpace API as well as demonstrate with step by step instructions on how to setup a MySpaceID powered site in a short amount of time. You can check out the <a href="http://papermashup.com/demos/myspaceapi/samples/myspaceid-oauth/">demo</a> and <a href="http://papermashup.com/demos/myspaceapi/myspaceapi.zip">download</a> the files needed in this tutorial.</p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/08/app.png" width="583" height="610"/></p>
<h3>Setup a developer account on MySpace</h3>
<p>First you’ll need to head over to MySpace.com and signup for a <a href="https://signups.myspace.com/index.cfm?fuseaction=signup">standard user account here</a>:</p>
<p>If you already have a MySpace account login at http://myspace.com. If you don’t have a developer account you’ll need to <a href="http://developer.myspace.com/Modules/Apps/Pages/ApplyDevSandbox.aspx">create one here</a>:</p>
<h3>Setup a new MySpaceID application</h3>
<p>Once you have your developer account and have confirmed everything you can go ahead and click ‘<a href="http://developer.myspace.com/Modules/Apps/Pages/CreateAppAccount.aspx">Build</a>’.</p>
<p>you’re now presented with two options. MySpace Apps or MySpaceID. We’re going to be creating an application that doesn’t sit on MySpace so you’ll need to select ‘Create MySpaceID App’</p>
<p>Once you have completed the first step and given your application a title, accepted the terms and conditions and filled In the CAPTCHA you can click ‘Next’</p>
<p>Step Two may seem a little daunting but don’t be worried there are just three things we need to do on this page. Firstly give you’re application a description (you can come back and edit this later along with the title) the next most important part to edit on this page is the ‘External Site Settings’</p>
<p>The external URL should look like this for the purposes of our demonstration:</p>
<p><strong>http://yourdomain.com/myspaceapi/samples/myspaceid-oauth/</strong></p>
<p>The External Callback Validation box should just contain your site’s domain for example like this:</p>
<p><strong>http://yourdomain.com</strong></p>
<p>We’re not using OpenID in this demonstration so just leave that un-ticked.</p>
<p><strong>Click ‘Save’.</strong></p>
<blockquote><p>TIP: We’ll need the OAuth API Key and Secret so make a note of them. The location of where they can be found is a little further up the page under the header ‘OAuth Settings’. </p>
<p>TIP: If at any stage you need to get back to your OAuth Key and Secret just click ‘My Apps’ then ‘Edit App details’</p></blockquote>
<h3>Configuring the application</h3>
<p>Lets just have a look at the file structure of our application so we can understand from the outset exactly where each component of the app is located and what to look out for when making any changes.</p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/08/structure.png" width="583" height="400"/></p>
<ol>
<li>This is where your MySpace API Key and Secret need to go.</li>
<li>Myspaceid-oauth Folder. This contains all the frontend files for our application. The index.php file is the main application page that we visit initially. If the user isn’t logged in to the app then they are directed to login.php</li>
<li>Views folder. This is where all the HTML layout files are kept this of you familiar with the MVC or Model View Controller principal will understand this better as the structure is loosely based on this</li>
<li>Source Folder. This folder contains the MySpace API files in order to connect to MySpace and make requests for data. The myspace.php file is the file that contains the functions required to get the specific data requested. </li>
</ol>
<p>There are two files you need to edit in order to get the application up and running. </p>
<p>The first file is <strong>config.MySpace.php</strong> which can be seen above in the config folder. You just need to add your API key and Secret as shown below:</p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/08/config.jpg" width="583" height="68"/></p>
<p>You’ll then need to open up the functions.php file and edit the URL in the base_url() function. This is the main function which returns your main application URL its vital that this URL matches the URL that you entered into MySpace when you setup the application.</p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/08/function.jpg" width="583" height="68"/></p>
<h3>Run the application</h3>
<p>If you have followed the tutorial correctly you should now see a login screen when you visit your application URL:</p>
<p><strong>http://yourdomain.com/myspaceapi/samples/myspaceid-oauth/</strong></p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/08/demo.jpg" width="583" height="200"/></p>
<p>Once you click Login with MySpaceID you are taken to the MySpace login page which once you connect will re-direct you back to the application.<br />
 After login you are re-directed back to index.php which now should be displaying a selection of your profile information as shown at the top of the page. </p>
<h3>Looking at the application in a little more detail</h3>
<p>To get a full understanding of what’s going on lets have a look at the index.php file  which is located directly inside the myspaceid-oauth folder.<br />
The first thing you should notice is there’s not a lot of code in this file compared to the sample OAuth code that comes with the default PHP SDK from MySpace. </p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/08/code.jpg" width="583" height="541"/></p>
<p>Starting at the top. The three required files are used to setup the application. The first required file contains the API key and Secret, the second file is the main MySpace API file that is used to get data. And finally we load the functions.php file which contains a few functions that I’ve created in order to abstract code from this file to make it easier to understand and logical when it comes to making API requests.</p>
<p>From Lines 11-35 above we have the main block of code that is required to determine if a request has been made to the MySpace API. Within each if/else statement we’re calling the specified functions. For example. If a user initially visits index.php they wont be logged into the application. Because of this they will be re-directed to login.php which is the not logged in landing page. On login.php there is a link to login to MySpace. When the user clicks this they actually visit index.php?f=start. This sets off the authentication process re-directing the user to MySpace to login, once they login MySpace re-directs them back to index.php?f=callback where the myspace_callback function is called.</p>
<blockquote><p>TIP: all the functions used in this demo can be found In the functions.php file.</p></blockquote>
<p>At the bottom of the index.php file we have three included files. </p>
<ul>
<li>Header.php</li>
<li>Index-content.php</li>
<li>Footer.php</li>
</ul>
<p>The header and footer files container default code that can be used throughout the app. So in the header.php file we have the document Head and opening Body tag along with an opening container div.</p>
<p>In the footer.php file there’s a footer div and the closing container div from the header.php file.</p>
<p><a href="http://papermashup.com/demos/myspaceapi/samples/myspaceid-oauth/"><img src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" title="demo" class="alignnone size-full wp-image-23" /></a><a href="http://papermashup.com/demos/myspaceapi/myspaceapi.zip"><img src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" title="download" class="alignnone size-full wp-image-24" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/build-a-myspaceid-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MySpace Open Search API</title>
		<link>http://papermashup.com/myspace-open-search-api/</link>
		<comments>http://papermashup.com/myspace-open-search-api/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 20:47:21 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[MySpace]]></category>
		<category><![CDATA[Open Search]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1957</guid>
		<description><![CDATA[The MySpace Search API allows you to search MySpace for user, videos, images, and music. With an individual feed for each search item. It is designed to function like a search on the MySpace website and to have a response &#8230; <br/> <a href="http://papermashup.com/myspace-open-search-api/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>The MySpace Search API allows you to search MySpace for user, videos, images, and music. With an individual feed for each search item. It is designed to function like a search on the MySpace website and to have a response format that is compatible with OpenSocial. The API returns either JSON or XML and in this tutorial i&#8217;ll be using PHP and CURL to parse an XML response to build a simple MySpace search page.</p>
<h3>Application use</h3>
<p>Open Search could be used to mash data using the MySpace API with other applications, for example automatically pulling in a users MySpace profile image, name, location and URL.  Building a Facebook application that recommends bands to you on MySpace.</p>
<p><img class="alignnone size-full wp-image-1963" title="MySpace api" src="http://papermashup.com/wp-content/uploads/2010/07/myspace-api.jpg" alt="" width="583" height="213" /></p>
<h3>The Code</h3>
<p>Just like the Twitter search API tutorial that I did a last year we&#8217;re using the CURL function in PHP5 to allow us to parse the XML file and format the data that we get back.</p>
<h3>Here&#8217;s how it works</h3>
<p>Any search that we make will send GET variables through the page URL therefore making it easy to see the data that we&#8217;re sending to the API generally you will see search pages use this method as we&#8217;re not transmitting private data such as usernames or passwords.</p>
<p>The search data is stored in the variable $q if nothing is searched for initially we run a default search mainly for demo purposes with the search term &#8216;Coldplay&#8217;. You&#8217;ll notice that the first result on the left is highlighted green, this is because it is the official profile for the Coldplay. you can see that we construct the URL and store it in the variable $search. There are many different variables that can be passed to the API. It&#8217;s worth pointing out that we&#8217;re using the People search call. You can see all the values that can be passed in <a href="http://wiki.developer.myspace.com/index.php?title=Open_Search#Searching_for_People">here</a></p>
<p>Here is an example XML request: <a href="http://api.myspace.com/opensearch/people?searchTerms=ferrari&amp;format=xml">http://api.myspace.com/opensearch/people?searchTerms=ferrari&amp;format=xml</a></p>
<pre class="brush: php; title: ;">

//Search API Script

$q=$_GET['q'];

if($_GET['q']==''){

$q = 'coldplay';

}

if($_GET['pics']==1){

$pics[0] = '&amp;hasPhoto=on';
$pics[1] = 'checked';

}

if(!empty($_GET['location'])){

$pics[0] = '&amp;location='.urlencode($_GET['location']).'';

}

$search = &quot;http://api.myspace.com/opensearch/people?searchTerms=&quot;.urlencode($q).&quot;&amp;format=xml&quot;.$pics[0].&quot;&quot;;

$cu = curl_init();

curl_setopt($cu, CURLOPT_URL, $search);
curl_setopt($cu, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($cu);
$search_res = new SimpleXMLElement($result);

echo &quot;&lt;h3&gt;&quot;.$search_res-&gt;totalResults.&quot; MySpace results for '&quot;.$q.&quot;'&lt;/h3&gt;&quot;;

// Echo the Search Data

foreach ($search_res-&gt;entry as $user) {

$officialprofile = null;

if($user-&gt;isOfficial==1){

$officialprofile = 'official';

}

echo &quot;&lt;div class='user &quot;.$officialprofile.&quot;'&gt;&lt;a href=\&quot;&quot;.$user-&gt;profileUrl.&quot;\&quot; target=\&quot;_blank\&quot;&gt;&lt;img border=\&quot;0\&quot; width=\&quot;68\&quot; class=\&quot;user_image\&quot; src=\&quot;&quot;.$user-&gt;thumbnailUrl.&quot;\&quot; title=\&quot;&quot;.$user-&gt;displayName.&quot;\&quot; /&gt;&lt;/a&gt;&quot;;
echo &quot;&lt;div class='text'&gt;&quot;.$user-&gt;displayName.&quot;&lt;/div&gt; &lt;strong&gt;&quot;.$user-&gt;location.&quot;&lt;/strong&gt;&lt;br/&gt;&lt;a href='&quot;.$user-&gt;profileUrl.&quot;' &gt;Visit &quot;.$officialprofile.&quot; profile&lt;/a&gt;&lt;div class='clear'&gt;&lt;/div&gt;&lt;/div&gt;&quot;;

}

curl_close($cu);
</pre>
<pre class="brush: php; title: ;">
&lt;div id=&quot;search&quot;&gt;
&lt;form action=&quot;&quot; method=&quot;get&quot;&gt;
  Search MySpace &lt;input type=&quot;text&quot; name=&quot;q&quot; value=&quot;&lt;?php echo $q;?&gt;&quot; id=&quot;searchbox&quot; /&gt;
 Location &lt;input type=&quot;text&quot; name=&quot;location&quot; value=&quot;&lt;?php echo $_GET['location'];?&gt;&quot; id=&quot;location&quot; /&gt;
  Only show users with profile pics &lt;input name=&quot;pics&quot; type=&quot;checkbox&quot; value=&quot;1&quot; &lt;?php echo $pics[1];?&gt; /&gt;
  &lt;input type=&quot;submit&quot; name=&quot;submit&quot; id=&quot;submit&quot; value=&quot;Search&quot; /&gt;

&lt;/form&gt;
&lt;/div&gt;
</pre>
<p><a href="http://papermashup.com/demos/myspace-open-search/"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a><a href="http://papermashup.com/demos/myspace-open-search/myspace-open-search.zip"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/myspace-open-search-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get started with jQuery Tools</title>
		<link>http://papermashup.com/get-started-with-jquery-tools/</link>
		<comments>http://papermashup.com/get-started-with-jquery-tools/#comments</comments>
		<pubDate>Thu, 20 May 2010 13:55:59 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Expose]]></category>
		<category><![CDATA[Overlays]]></category>
		<category><![CDATA[tabs]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1849</guid>
		<description><![CDATA[It&#8217;s so easy to go on the hunt for a plugin for a project and end up with multiple plugins all doing different things maintained and managed by separate developers, but wait there&#8217;s a common solution to this problem with &#8230; <br/> <a href="http://papermashup.com/get-started-with-jquery-tools/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s so easy to go on the hunt for a plugin for a project and end up with multiple plugins all doing different things maintained and managed by separate developers, but wait there&#8217;s a common solution to this problem with <a href="http://flowplayer.org/tools/index.html">jQuery Tools</a>. <a href="http://flowplayer.org/tools/index.html">jQuery Tools</a> packages up some commonly used functions which are relatively easy to manipulate and use in any project.</p>
<h3>What&#8217;s in the Package</h3>
<p><a href="http://flowplayer.org/tools/index.html">jQuery Tools</a> puts together some of the key user interface components in an easy to use package. They even make it easy to get started by including the latest version of jQuery minified alongside the Tools plugin all in one link, and you can hot-link to their CDN link so you don&#8217;t need to even host the plugin code.</p>
<p><img class="alignnone size-full wp-image-1857" title="tabs" src="http://papermashup.com/wp-content/uploads/2010/05/tabs.jpg" alt="" width="582" height="217" /><br />
<img class="alignnone size-full wp-image-1859" title="overlay" src="http://papermashup.com/wp-content/uploads/2010/05/overlay.jpg" alt="" width="582" height="217" /><br />
<img class="alignnone size-full wp-image-1860" title="scrollable" src="http://papermashup.com/wp-content/uploads/2010/05/scrollable.jpg" alt="" width="582" height="217" /><br />
<img class="alignnone size-full wp-image-1861" title="tooltips" src="http://papermashup.com/wp-content/uploads/2010/05/tooltips.jpg" alt="" width="582" height="217" /><br />
<img class="alignnone size-full wp-image-1863" title="expose" src="http://papermashup.com/wp-content/uploads/2010/05/expose.jpg" alt="" width="582" height="217" /></p>
<p><a href="http://flowplayer.org/tools/download/index.html"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a><a href="http://flowplayer.org/tools/demos/index.html"><img class="alignnone size-full wp-image-23" title="demo" src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/get-started-with-jquery-tools/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>20 Complete scripts to download</title>
		<link>http://papermashup.com/20-complete-scripts-to-download/</link>
		<comments>http://papermashup.com/20-complete-scripts-to-download/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 22:01:20 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[Analytics]]></category>
		<category><![CDATA[API's]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Gallery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Learn]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[popular]]></category>
		<category><![CDATA[Social Networks]]></category>
		<category><![CDATA[Trends]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Javascript Vimeo Tutorials API Downloads]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1812</guid>
		<description><![CDATA[I&#8217;ve put together a nice little collection of scripts over the past year or so, and have decided as it&#8217;s approaching summer in the UK (sorry winter in Australia!) to do a download bundle of 20 assorted scripts where you &#8230; <br/> <a href="http://papermashup.com/20-complete-scripts-to-download/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put together a nice little collection of scripts over the past year or so, and have decided as it&#8217;s approaching summer in the UK (sorry winter in Australia!) to do a download bundle of 20 assorted scripts where you can get the lot in one click for free! Although <a class="thickbox" title="Download And Donate" onclick="return false;" href="http://papermashup.com/wp-content/themes/arthemia/donate.php?download=http://papermashup.com/demos/bundle/bundle.zip&amp;keepThis=true&amp;TB_iframe=true&amp;height=220&amp;width=620">donations</a> are also much appreciated. Check out the list below for all the details of the package. This collection is based on a variety of different techniques, from CSS, PHP jQuery to MySQL.</p>
<p><img class="alignnone size-full wp-image-1834" title="boxes" src="http://papermashup.com/wp-content/uploads/2010/04/boxes.png" alt="" width="583" height="180" /></p>
<h3>What&#8217;s in the bundle?</h3>
<ol>
<li>
<h4>jQuery Drag &amp; Drop</h4>
<p>Using jQuery PHP and MySQL a complete drag and drop script that updates the database. <a href="http://papermashup.com/demos/jquery-drag-drop/">demo</a></li>
<li>
<h4>jQuery Delete</h4>
<p>Delete items using PHP jQuery using an AJAX request <a href="http://papermashup.com/demos/jquery-delete/">demo</a></li>
<li>
<h4>PHP jQuery and MySQL Autosuggest</h4>
<p>A powerful autosuggest script that searches a MySQL database to return you result <a href="http://papermashup.com/demos/autosuggest/">demo</a></li>
<li>
<h4>jQuery &amp; PHP username checker</h4>
<p>Checks the database to see if a chosen username exists in the database and returns true or false <a href="http://papermashup.com/demos/check-username/">demo</a></li>
<li>
<h4>CSS3 Buttons</h4>
<p>Styling elegant buttons using CSS3 <a href="http://papermashup.com/demos/css-buttons/">demo</a></li>
<li>
<h4>Feedburner Stats</h4>
<p>Using PHP and CURL to get your feedburner subscriber count <a href="http://papermashup.com/demos/feedburner-stats/">demo</a></li>
<li>
<h4>jQuery &amp; PHP username checker</h4>
<p>Checks the database to see if a chosen username exists in the database and returns true or false <a href="http://papermashup.com/demos/check-username/">demo</a></li>
<li>
<h4>jQuery image Zoom</h4>
<p>create a simple gallery with a hover image effect <a href="http://papermashup.com/demos/image-jquery/">demo</a></li>
<li>
<h4>jQuery PHP &amp; MySQL inline editing</h4>
<p>Edit page content directly in the browser inline using jQuery AJAX requests <a href="http://papermashup.com/demos/inline-editing/">demo</a></li>
<li>
<h4>jQuery Gallery</h4>
<p>Animated jQuery gallery with title and description <a href="http://papermashup.com/demos/jquery-gallery/index-title.html">demo</a></li>
<li>
<h4>Highlighting form inputs</h4>
<p>Highlight any input field using JavaScript <a href="http://papermashup.com/demos/jquery-highlighting-form-inputs/">demo</a></li>
<li>
<h4>jQuery JSON &amp; PHP</h4>
<p>Create a simple product gallery using JSONP PHP and MySQL <a href="http://papermashup.com/demos/jquery-json-php/">demo</a></li>
<li>
<h4>jQuery Tabs</h4>
<p>Simple tabs rendered using jQuery <a href="http://papermashup.com/demos/jquery-tabs/">demo</a></li>
<li>
<h4>jQuery XML</h4>
<p>build a product gallery parsing XML using jQuery <a href="http://papermashup.com/demos/jquery-xml/">demo</a></li>
<li>
<h4>jTruncate</h4>
<p>Using the jTruncate plugin to truncate text with a &#8216;more&#8217; link <a href="http://papermashup.com/demos/jtruncate/">demo</a></li>
<li>
<h4>PHP Page scrape</h4>
<p>Scrape page contents using PHP and CURL <a href="http://papermashup.com/demos/page-scrape/">demo</a></li>
<li>
<h4>AJAX Check</h4>
<p>Check to see if a normal GET or POST request was made or if an AJAX request was made <a href="http://papermashup.com/demos/ajax-check/">demo</a></li>
<li>
<h4>PHP Pagination</h4>
<p>A useful and raw PHP pagination script that could be adapted in to a class <a href="http://papermashup.com/demos/php-pagination/">demo</a></li>
<li>
<h4>jQuery Sliding Menu</h4>
<p>jQuery drop down slide in / out menu inspired by 9rules.com <a href="http://papermashup.com/demos/jquery-menu/">demo</a></li>
<li>
<h4>jQuery Tooltips</h4>
<p>An experimentation into building jQuery tooltips with AJAX requests, images etc <a href="http://papermashup.com/demos/tooltip/">demo</a></li>
</ol>
<p><a href="http://papermashup.com/demos/bundle/bundle.zip"><img class="alignnone size-full wp-image-24" title="download" src="http://papermashup.com/wp-content/uploads/2009/01/download.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/20-complete-scripts-to-download/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Translate your site in 52 languages</title>
		<link>http://papermashup.com/translate-your-site-in-52-languages/</link>
		<comments>http://papermashup.com/translate-your-site-in-52-languages/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 07:00:56 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[translation]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1580</guid>
		<description><![CDATA[Is your site reaching audiences that would probably rather content in their native language? we&#8217;ll there&#8217;s a simple solution which models itself on the popular social sharing site AddThis. TranslateThis developed by Jon Raasch, a front-end web programmer from Portland, &#8230; <br/> <a href="http://papermashup.com/translate-your-site-in-52-languages/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>Is your site reaching audiences that would probably rather content in their native language? we&#8217;ll there&#8217;s a simple solution which models itself on the popular social sharing site <a href="http://addthis.com/">AddThis</a>. <a href="http://translateth.is/">TranslateThis</a> developed by Jon Raasch, a front-end web programmer from Portland, OR is a very easy to implement translation solution that uses the Google Language API and AJAX to translate your page content on the fly.</p>
<h3>Why is it good?</h3>
<p><img class="alignnone size-full wp-image-1585" title="trans" src="http://papermashup.com/wp-content/uploads/2010/01/trans.jpg" alt="trans" width="583" height="300" /></p>
<p>It has several advantages over using the <a href="http://translate.google.com/translate_tools">Google translate widget</a> the main one being that <a href="http://translateth.is/">TranslateThis</a> processes the page right on the page in front of you without redirecting you to Google. Secondly its customisable allowing you to add specific languages to the initial drop down and change the button as well as add your own Google analytics code to track which languages are popular.  You can even disable the cookie that the plugin drops so it only translates one page at a time rather than automatically changing the language to your preferred setting.</p>
<p><img class="alignnone size-full wp-image-1587" title="trans1" src="http://papermashup.com/wp-content/uploads/2010/01/trans1.jpg" alt="trans1" width="583" height="300" /></p>
<p>I think this is a great piece of code that can easily translate your site, the code it both lightweight and optimised and comes in at a little under 19kb&#8217;s in size. It&#8217;s of course compatible with all major browsers including IE6, 7 and 8, FireFox, Safari and Chrome The code will gracefully degrade to any previous browsers. </p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/translate-your-site-in-52-languages/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Highcharts JavaScript Library</title>
		<link>http://papermashup.com/using-highcharts-javascript-library/</link>
		<comments>http://papermashup.com/using-highcharts-javascript-library/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 10:17:12 +0000</pubDate>
		<dc:creator>Ashley</dc:creator>
				<category><![CDATA[API's]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[headline]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MooTools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[graphs]]></category>

		<guid isPermaLink="false">http://papermashup.com/?p=1507</guid>
		<description><![CDATA[There are some great JavaScript graph libraries out there and one that&#8217;s recently come to my attention is Highcharts.com which is compatible with both the jQuery and Mootools frameworks. To get started point your browser here where you can download &#8230; <br/> <a href="http://papermashup.com/using-highcharts-javascript-library/">Continue reading</a>]]></description>
			<content:encoded><![CDATA[<p>There are some great JavaScript graph libraries out there and one that&#8217;s recently come to my attention is <a href="http://highcharts.com">Highcharts.com</a> which is compatible with both the jQuery and Mootools frameworks. To get started point your browser <a href="http://www.highcharts.com/">here</a> where you can download all the files you need including examples.  Highcharts features include slick tooltips to reference points on your charts, it&#8217;s compatible with all standard web browsers, the setup for a graph as demonstrated below is simple and uses the JSON data type, there are also multiple types of graph type, from  line, spline, area, areaspline, column, bar, pie and scatter chart.</p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/01/graph.jpg" alt="graph" title="graph" width="582" height="300" /></p>
<h3>The Code</h3>
<p>Here&#8217;s how to setup  a simple chart. you need to include the jQuery framework as well as the highcharts.js file and excanvas.js file for IE users which you&#8217;ll get in the download from Highcharts. once you&#8217;ve got that setup simply paste this into your document head, and create a div with the id &#8216;graphDiv&#8217;, this is where the graph will render to. Note in the first few lines of setup code at the top of the script we specify this along with the chart type. In this case we&#8217;re using a bar chart. Below that we have the setup title parameter which is the main label for the graph along with the labels for the x and y axis. </p>
<p>You should be left with a graph as shown below.</p>
<p><img src="http://papermashup.com/wp-content/uploads/2010/01/fruit.png" alt="HighCharts Fruit Chart" title="HighCharts Fruit Chart" width="582" height="282"/></p>
<pre class="brush: jscript; title: ;">

   $(document).ready(function() {
      var chart1 = new Highcharts.Chart({
         chart: {
            renderTo: 'graphDiv',
            defaultSeriesType: 'bar'
         },
         title: {
            text: 'Fruit Consumption'
         },
         xAxis: {
            categories: ['Apples', 'Bananas', 'Oranges']
         },
         yAxis: {
            title: {
               text: 'Fruit eaten'
            }
         },
         series: [{
            name: 'Anne',
            data: [1, 0, 4]
         }, {
            name: 'Martin',
            data: [5, 7, 3]
         }]
      });
   });
</pre>
<blockquote><p>NOTE: the demo below is not of the code above. If you want to play around with the code for the demo you can simply copy the source from your web browser whilst viewing the demo</p></blockquote>
<p><a href="http://papermashup.com/demos/highcharts/"><img src="http://papermashup.com/wp-content/uploads/2009/01/demo.png" alt="demo" title="demo" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://papermashup.com/using-highcharts-javascript-library/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/38 queries in 3.249 seconds using disk: basic
Object Caching 918/1015 objects using disk: basic

Served from: papermashup.com @ 2012-02-04 02:59:04 -->
