PHP Developer / Blog

Posts Tagged ‘php’

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…)

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…)

10 more tips to make your PHP application scream - Part 2 of N

Friday, February 29th, 2008

The previous article in this series talked about how to set PHP up so that it’s a lean mean processing machine. Now we get to make sure that our PHP code follows suit.

Also read part 1 of this article.

I’ll cover 10 lesser known PHP functions or methods that can help streamline your PHP code. (more…)

10 tips to make your PHP application scream - Part 1 of N

Thursday, February 28th, 2008

I’ll be the first to state that there is no shortcut to making your PHP applications scream. This series aims to break it down into several steps. The first step will be taking a look at the PHP configuration on the server. We’ll be focusing specifically on PHP this article as a later article will cover 3rd party software which are an essential part of scaling your applications. Comments and suggestions welcome!

Also read part 2 of this article.

PHP.ini, getting your hands dirty
Almost all of the PHP configuration options are available in your php.ini file. PHP ships with several defaults which are suited for compatibility and not for performance. Let’s change that! It’s important to understand your application and what you can and cannot change. In some cases you might want to have allow_url_fopen = On even though I would generally recommend against it. Keep that in mind when reading this list. (more…)

Speed up Apache - how I went from F to A in YSlow

Wednesday, February 27th, 2008

I decided to embark on figuring out how to make my site as fast as possible. There were a few tips I was already aware of but decided to grade myself using YSlow. My initial score was bad, an F. I realized I had to do a few things.

  • Compress text/* files using gzip
  • Decrease HTTP requests by combining multiple JavaScript (and CSS) files into single files
  • Add aggressive caching since the site isn’t updated very often (especially images, JavaScript and CSS files)

Here’s what my original scores looked like. (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…)


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.