Archive for February, 2010

<?php $text = "<p>This is ‘a’ my first paragraph.</p><!– Comments –> sample text text"; echo "String Lenght of HTML chars:".strlen_noHtml($text); // 48 chars function strlen_noHtml($string){ $crs = 0; $charlen = 0; $len = strlen($string); while($crs < $len) { $offset = $crs; $crs = strpos($string, "<", $offset); if($crs === false) { $crs = $len; $charlen += $crs – $offset; } else { $charlen += …

$text = "<p>This is ‘a’ my first paragraph.</p><!– Comments –> sample text text"; echo "String Lenght of HTML chars:".strlen_html($text); // 24 chars function strlen_Html($string){ $crs = 0; $charlen = 0; $len = strlen($string); while($crs < $len) { $scrs = strpos($string, "<", $crs); if($scrs === false) { $crs = $len; } else { $crs = strpos($string, ">", $scrs)+1; if($crs === false) $crs = $len; …

Do you wish to do more than just making phone calls through your mobiles? Well, say it out loud then because as the ‘febtastic’ month comes to an end and the era of social networking takes a completely new turn in Pakistan. Not just a mere turn but also a giant leap towards innovation. From the rich and bright land of LUMS came …

Simply write single line of code and place the file on your Hosting server and access it through browser. <?php echo phpinfo(); ?> You will find a lot of information about your Hosting Provider Machine. Enjoy

ini_set("memory_limit", "16M");

Fly By has been developed by Web Sketchers, a team of individuals who graduated from FAST-NU Lahore in 2009. Web Sketchers is proud to present the first 3D Flash web-based game to be developed in Pakistan on Facebook – Fly By Fly By is a highly enticing game and already, they have registered more than 600 users from throughout the world. As you …

You can increase Maximum Execution Time for PHP Script through following code: ini_set("max_execution_time", "300") //300 seconds

ini_set("session.gc_maxlifetime", $Lifetime); or ini_set("session.gc_divisor", "1"); or ini_set("session.gc_probability", "1"); or ini_set("session.cookie_lifetime", "0"); or ini_set("session.save_path", $DirectoryPath);

Persistent connections are links that do not close when the execution of your script ends. When a persistent connection is requested, PHP checks if there’s already an identical persistent connection (that remained open from earlier) – and if it exists, it uses it. If it does not exist, it creates the link. An ‘identical’ connection is a connection that was opened to the …

Here is some information about $This-> [keyword] This pointer is a pointer accessible only within the member functions of a class, struct, or union type. It points to the object for which the member function is called. Static member functions do not have a this pointer.