Session Timeout Recovery

If you're using Ajax to save data on a page, it can be difficult for the client to know if the session has timed out on the server. This post describes the use of session storage to save and restore the data on a page input when a session times out. L… more »

Variable number of parameters on a prepared statement in PHP

Sometimes, you need to use a different number of parameters for a prepared statement. The call_user_func_array function allows you to call bind_param with a varying number of parameters. PHP// Start by validating your data$so… more »

What Branch am I on Anyway?

Often during web development the code is switching between different branches and it can be difficult to let everyone on a small team know which branch is in use. Adding this line to a PHP script and using CSS to make it easy to see can save time. PHP… more »

One Approach to Complying with a "script-src 'self'" Content Security Policy

I recently encountered this error when working with plugin code on an application: Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". The cause of the e… more »

Twitter Application Auth Sample - PHP

This is a sample PHP code which can be used to get a Twitter OAuth token for use in making API calls. It includes a trends available request that gets the list of countries for which Twitter trends are available. Be sure to read the documentation at t… more »

:: Next >>