How JSON P Works With Library
Having a dynamic website is now the norm when it comes to website design and development. People want the most up to date content, posts, images, and everything else right away without having to refresh their web browser. The method most websites use to provide dynamic content is called AJAX or known as XMLHttpRequest or XHR for short.
XHR has a few limitations though, such as not being able to get content from other domains easily. So if you do want to have dynamic content it has to be from the same domain you have your website on. This is of course a problem when you want to use an external API such as Twitter, Facebook, Twitch, YouTube and others. But there is another client side solution called JSON P. In the steps below I will show you how to create a library to use JSON P and how exactly JSON P works.
JavaScript Request Tweets
If you want to add a Twitter Timeline to your site it is really easy if you don’t want to customize it. If you navigate to https://twitter.com/settings/widgets you can create various widgets and add them to your site.
To create a custom Twitter Timeline for your site, you will need knowledge of JavaScript, HTML and CSS, or just how to copy and paste.
Notice:
Twitter now requires all API Calls to use API 1.1, you can do this by viewing the new updated tutorial over here.
Creating Dynamic PHP RSS Feed
If you have any type of website that updates content fairly often, such as a blog or a forum having a RSS Feed is a good idea. But if your website is custom coded, or uses a CMS that doesn’t have an RSS Feed you may just forget about it because it seems too “difficult” or not worth the time. I have to tell you it is worth the time and only takes a few minutes to get working correctly.
HTML5 Uploading with Progress Bar
With new web technologies such as CSS3, HTML5 and JavaScript updates the new web possibilities are endless. One thing that a lot of sites incorporated now are the ability to drag and drop files to upload them. Below is how to create a simple AJAX file upload with progress bar.
First we have the HTML webpage, this can be nearly everything since we are using the body tag to capture the files.
LocalHost using Nginx PHP MySQL
Building websites that are dynamic require tools and software including but not limited to a Web Server, PHP, MySQL, and all other libraries and tools you may require.
You can of course set this all up using a program such as XAMPP inside of Windows, but doing it manually gives you more control of the settings and lets you move to production easier.
To setup a “localhost” server you need to download the following software.