Archive for the ‘PHP’ Category
Check Site Loading Speed using CURL curl_getinfo() in PHP.
Monday, June 22, 2009 10:06 2 CommentsWe 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, [...]
How to find duplicate values in array
Tuesday, March 17, 2009 5:11 No Commentssimple 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. //
Parsing XML Feeds in PHP with simplexml
Tuesday, December 30, 2008 13:56 6 CommentsParsing 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 [...]
Some PHP Resource Websites
Tuesday, December 30, 2008 13:00 1 CommentPHP 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 [...]
The file structure of the Zend Framework QuickStart Tutorial
Sunday, November 23, 2008 5:35 2 CommentsI 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 [...]

