PHP Developer / Blog

Posts Tagged ‘programming’

Asynchronous/parallel HTTP requests using PHP multi_curl

Thursday, May 29th, 2008

When working with web services curl quickly becomes your best friend. It gets even better when you dig into PHP’s multi_curl functions. The downside to accessing web services at run time is that HTTP connections can be slow. This problem is multiplied when you have to call multiple web services for a given page. PHP’s multi_curl_* functions help drastically because they allow you to make unblocking asynchronous/parallel requests. This means you can continue processing the request without waiting for a response. (more…)

A faster way to do curl put calls in PHP

Wednesday, April 23rd, 2008

In a previous post I suggested using PHP’s memory stream to pass data along with PUT calls in curl. After doing some benchmarking it turns out that it’s faster to use PHP’s CURLOPT_CUSTOMREQUEST option. This way you can treat PUT and POST calls in the same manner. (more…)

Why everyone should write a framework and never use it

Thursday, April 17th, 2008

I will scream if one more person tells me that I’ve wasted my time by writing a web framework because there are already so many available. The truth of the matter is that they’re right. The part that they’re missing out on is that writing a framework is one of the best exercises you can do as a web developer. So regardless if you plan on using the framework you write is irrelevant though I suggest you do because ironing out the fine details will make you a better programmer. (more…)

How to get started hosting your git repository using GitHub and OSX

Thursday, April 10th, 2008

Hosting remote git repositories using GitHub is completely painless. Assuming you’ve already signed up for an account at GitHub and that you have Git installed on your computer. For OSX you can use macports to easily get Git’s command line tools installed. (more…)

RESTful PUT calls with PHP and Curl

Tuesday, April 8th, 2008

UPDATE: There’s a faster way to do this over here.

Curl quickly becomes your best friend when working with web services. Unfortunately making PUT calls with PHP isn’t completely straight forward. Sure there’s CURLOPT_PUT but how do you attach a file that’s not really a file but a string in memory? Fortunately, PHP 5.2 introduces memory streams which can be treated as file handles. (more…)

The smallest PHP framework you shouldn’t code without

Saturday, February 16th, 2008

This step by step guide will help you get set up with EpiCode (documentation) in under 15 minutes. EpiCode is a framework that maps URLs to static methods. It also has a few utility functions to make templating completely painless. There’s no new templating syntax to learn since PHP does a great job at that already. EpiCode also handles variable scope so you don’t have to worry about mucking up the global namespace. (more…)

Closures - Demystifying Javascript’s secret weapon

Thursday, February 14th, 2008

Per Wikipedia, a closure is defined as “a function that is evaluated in an environment containing one or more bound variables“.

What’s a closure look like? (more…)


About this site:
This is my (Jaisen Mathai) personal site for potential employers who want to see my resume or portfolio. My ideal job would be to work as a PHP developer on a large scale consumer website. My experience is in using PHP, MySQL, Ajax and JSON. I really enjoy creative brainstorming...taking a problem apart and narrowing 100 solutions down to the best one.

Thanks for stopping by. Be sure to drop me a line.