Archive for February, 2010

Count HTML Tags in PHP through strlen() function

Sunday, February 28, 2010 5:51 No Comments

<?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)
{
[...]

This was posted under category: PHP Interview Questions

Count a string with including HTML Tags through strlen()

Saturday, February 27, 2010 1:46 No Comments

$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)
{
[...]

This was posted under category: PHP Interview Questions

Chopaal-Pringit: Social Networking Tide In Pakistan

Friday, February 26, 2010 12:30 2 Comments

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 [...]

This was posted under category: General Knowledge, WWW - Internet

How to find hosting server information / specifications?

Friday, February 26, 2010 1:05 2 Comments

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

This was posted under category: PHP Interview Questions

How to increase Memory Limit in PHP (php.ini)?

Thursday, February 25, 2010 23:03 No Comments

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

This was posted under category: PHP Interview Questions

Fly By – Pakistan’s First Flash Game on Facebook

Wednesday, February 24, 2010 10:54 1 Comment

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 [...]

This was posted under category: WWW - Internet

How to increase Maximum Execution Time of php.ini in PHP?

Wednesday, February 24, 2010 0:56 No Comments

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

This was posted under category: PHP Interview Questions

How to set SESSION COOKIE TIMEOUT in php.ini?

Tuesday, February 23, 2010 15:50 No Comments

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

This was posted under category: PHP Interview Questions

What is meant by Persistent Database Connection?

Tuesday, February 23, 2010 13:14 No Comments

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 [...]

This was posted under category: MySql Interview Questions

What is ‘this’ pointer / keyword in PHP5?

Monday, February 22, 2010 23:00 No Comments

Here is some information about $this-> [keyword]
he 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.

This was posted under category: PHP Interview Questions