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?

CURL

$postData = array( "site" => "web technology experts notes", "dailyuser" => "1000", "location" => "India" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://www.example.com"); 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;

Mysqli Database Connection Procedural Vs Object-Oriented Way

Procedural Method $host = "localhost"; $username = "root"; $password = ""; $conn = mysqli_connect($host, $username, $password); //connect to server if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } echo "Connected successfully"; Object-Oriented Method $host = "localhost"; $username = "root"; $password = ""; $conn = new mysqli($host, $username, $password); //connect to server if ($conn->connect_error) { die("Connection … Continue reading Mysqli Database Connection Procedural Vs Object-Oriented Way