Posts in the "Techniques" Category

  • You’ve read a lot of PHP best practises articles and topics all over the internet and try your best at following them during your development. How about the worst practises in PHP development? There’s a nice article on the PHPDev Blog which tells you about a few practises (which I’m sure most of us haven […]

    Read More...
  • PHP 5.3 & Internationalization

    Stas Malyshev has written a good article over at Zend Developer Zone about the new intl – Internalization extension in PHP 5.3. Internationalization has been a major problem with web developers when developing sites which have to support multiple languages. The new extension eases the developer’s work drastically. Stas mentions in the article that the […]

    Read More...
  • Here’s an excellent article on Yahoo on how to speed up your website.  The points covered in this are: Make Fewer HTTP Requests Use a Content Delivery Network Add an Expires Header Gzip Components Put Stylesheets at the Top Put Scripts at the Bottom Avoid CSS Expressions Make JavaScript and CSS External Reduce DNS Lookups […]

    Read More...
  • Pierre shows you how to get a screen-shot of a site using PHP and GD2 on Windows. The examples he’s presented shows you how to get a screen shot of IE, and goes on to show how to get a site loaded into IE and capture the screen only after the page loads completely on […]

    Read More...
  •   Here’s a great article from Joe Whyte which lists out the possible filters which might be causing your site to go off the search listing at Google.  He also lists out steps on how to get your site off these “filters” and back in the search results again. Some of the filters include: Google […]

    Read More...
  • Justin Silverton shows how to create an Upload Progress meter using PHP 5.2 and Yahoo User Interface. Prior to PHP 5.2, there’s no way a PHP script could monitor the progress of a file upload, causing programmers to look at Perl scripts to provide the same information. For a demo, head over to http://progphp.com/progress.php This […]

    Read More...
  • Did you know that the fastest way to check in PHP to see if you’re running on windows is: $iswindows = DIRECTORY_SEPARATOR == ‘\\\\’; or the fastest way to get the time without even calling a function is: $currenttime= $_SERVER['REQUEST_TIME'] ; These are some of the optimization methods mentioned over the slides by Ilia Alshanetsky […]

    Read More...
  • Another did you know in PHP. < ? function test() { echo "This function can be called dynamically!"; } $function_name = "test"; $function_name(); ?> What is the output of the code show above? If you guessed that the output is “This function can be called dynamically!”, you may be a PHP guru. The code shows […]

    Read More...
  • GROUP_CONCAT(expr) – This function returns a string result with the concatenated non-NULL values from a group. Where it can be useful? For example to get PHP array without looping inside PHP: CREATE TABLE services ( id INT UNSIGNED NOT NULL, client_id INT UNSIGNED NOT NULL, KEY (id)); INSERT INTO services VALUES (1,1),(1,2),(3,5),(3,6),(3,7); SELECT id,client_id FROM […]

    Read More...
  • An interesting read from Peter Zaitsev about optimizing MySQL queries which use ORDER BY with LIMIT. Suboptimal ORDER BY implementation, especially together with LIMIT is often the cause of MySQL Performance problems. Here is what you need to know about ORDER BY … LIMIT optimization to avoid these problems Read on: MySQL Performance Blog » […]

    Read More...