cURL is a library that lets you make HTTP requests in PHP. Everything you need to know about it (and most other extensions) can be found in the PHP manual.
How to use :-
The first Curl script we are going to look at is the simplest Curl script that is actually useful - it will load a web page, retrieve the contents, then print it out. So, keeping the four-step Curl process in mind, this equates to:
the variable $str will hold the value Hello world!
the variable $x will hold the value 10
and the variable $y will hold the value 15.5.
Rules for variable declaration:
A variable starts with the $ sign, followed by the name of the variable
A variable name must start with a letter or the underscore character
A variable name cannot start with a number
A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
Variable names are case-sensitive ($age and $AGE are two different variables)
NOTE : - If there are any connection errors, a PDOException object will be thrown.You may catch the exception if you want to handle the error condition.
<?php
$first_day_this_month = date('Y-m-01');
$last_day_this_month = date('Y-m-t');
echo "First Date Of current Month - ".$first_day_this_month."</br>";
echo "First Date Of current Month - ".$last_day_this_month."</br>";
?>
The PHP Hypertext Preprocessor (PHP) is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.