Q.Suppose that you have to implement a class named Dragonball. This class must have an attribute named ballCount (which starts from 0) and a method iFoundaBall. When iFoundaBall is called, ballCount is increased by one. If the value of ballCount is equal to seven, then the message You can ask your wish is printed, and … Continue reading PHP OOPS


What is meant by PEAR in PHP?

PEAR is an acronym for “PHP Extension and Application Repository” The purpose of PEAR is to provide: A structured library of open-sourced code for PHP users A system for code distribution and package maintenance A standard style for writing code in PHP PHP Foundation Classes (PFC) PHP Extension Community Library (PECL)

How can we increase the execution time of a PHP script?

Default time allowed for the PHP scripts to execute is 30 secs mentioned in the php.ini file. The function used is set_time_limit(int sec). If the value passed is ‘0’, it takes unlimited time. It should be noted that if the default timer is set to 30 sec, and 20 sec is specified in set_time_limit(), the … Continue reading How can we increase the execution time of a PHP script?


$postData = array( "site" => "web technology experts notes", "dailyuser" => "1000", "location" => "India" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, ""); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); $output = curl_exec($ch); curl_close($ch); echo $output;