Buffer is a great social media management tool, perfect to scheduling facebook and twitter updates. I recently wanted to integrate Buffer into a website using the Buffer api. Thankfully the documentation for the Buffer api is clean and easy to follow.
Buffer requires OAuth 2.0 authentication they don’t have a php library, but I found a brilliant repo on Github https://github.com/thewebguy/bufferapp-php the buffer class provides a wrapper for integrating with Buffer.Continue Reading
When working with forms it can be incredibly useful to duplicate parts of the form, for instance when creating invoices the line items span multiple lines being able to add new lines as needed.
This tutorial demonstrates taking a div and cloning everything inside.Continue Reading
Quick tip to create a list page that will read the files from a directory and link to them is super easy. Using scandir to scan a folder then loop through the files and create a series of a links that link to the document.Continue Reading
For an upcoming project I need to be able to dynamically get information about a GitHub repository such as the number of stars, watchers, forks and the repo description and url.
Looking at the API I didn’t see a simple way of doing it so I decided to scrape my repo instead.
Using HTML Dom Parser (http://simplehtmldom.sourceforge.net) the process is simple. First include simple_html_dom.php then setup the url to my repo:Continue Reading
PHP's in_array is useful to determine if an item is in an array but when needing to compare multiple values against in_array no results will be found.
A way round this is to loop through the values and compare each one in turn, this function is pefect that that task.....Continue Reading