Braintree payments: first impression

brainI have just finished my first integration of Braintree‘s online payments system into a ticketing and event bookings web app. I’m impressed with the overall experience and with how easy Braintree have made this integration for developers, and certainly expect to use them again. No, this is not a paid advertisement and there are no affiliate links on this page.

Continue reading “Braintree payments: first impression”

A PHP CORS example

Cross Origin Resource Sharing

gearsA webpage makes a cross-origin HTTP request whenever it requests an image, stylesheet or script from a different domain than the one which served itself. A good proportion of websites on the internet rely on the ability to make such requests. However, when a cross-origin HTTP request is initiated from within a script in a webpage, web browsers block the request for security reasons. The best example is Javascript’s XMLHttpRequest function, which follows the same-origin policy. This means that a web application using XMLHttpRequest within a script can only make HTTP requests to resources located within its own domain.

Continue reading “A PHP CORS example”

MySQL database migration

 

gearsI recently upgraded my development laptop to CentOS 7 and while I was at it built a spare laptop running the same operating system. After manually creating a dozen MySQL databases and users and then importing their data from dump files on one laptop, I wasn’t interested in going through exactly the same process again on the second laptop.

Continue reading “MySQL database migration”