Archive for the ‘PHP’ Category

Check Site Loading Speed using CURL curl_getinfo() in PHP.

Monday, June 22, 2009 10:06 2 Comments

We use curl_getinfo() in to get the information of last transfer that made use of curl functions in PHP.  Using the following code we can get the time taken to load a webpage. $ch = curl_init(‘http://www.inetminds.com/parsing-xml-feeds-in-php-with-simplexml-111/’); // set  cURL to return the contents in a variable instead of giving it to the browser. curl_setopt($ch, CURLOPT_RETURNTRANSFER, [...]

This was posted under category: PHP, Programming Tags: , , , , , ,

How to find duplicate values in array

Tuesday, March 17, 2009 5:11 No Comments

simple way to find the duplicate values in array. function array_duplicates_values($array) { if(!is_array($array)) return false; $duplicates = array(); $unique = array_unique($array); if(count($array) > count($unique)) for($i = 0; $i < count($array); $i++) if(!array_key_exists($i, $unique)) $duplicates[] = $array[$i]; return $duplicates; } above function will return the duplicate values in array. //

This was posted under category: PHP Tags:

Parsing XML Feeds in PHP with simplexml

Tuesday, December 30, 2008 13:56 6 Comments

Parsing XML feeds is always something I’ve wanted to to do with PHP. But I’ve only bothered to learn how to do it. Now, there are different ways to do this, many of which uses different packages/plugins which need to be installed on the server. I am going to use simplexml, since it’s built into [...]

This was posted under category: PHP, Programming Tags: , , , ,

Some PHP Resource Websites

Tuesday, December 30, 2008 13:00 1 Comment

PHP is a very vast language. It’s hard master it.You may know how to crop an image using GD and process web requests with XML-RPC. You may know one of them, but not the both. There are many of resources there that help you learn the basics of PHP Processing forms, security, database interactions and [...]

This was posted under category: PHP Tags: , , ,

The file structure of the Zend Framework QuickStart Tutorial

Sunday, November 23, 2008 5:35 2 Comments

  I started working  through the tutorial for the PHP Zend Framework.  After few pages they  neglected to mention where the  piece of code is supposed to be. Maybe I learnt a lot more, but it did not make for a very ‘quick’ start to work out things go from the error messages. Here’s the [...]

This was posted under category: PHP Tags: , ,