Welcome to the PHP Knowledge Base and Tutorial
How to identify server IP address in PHP
How to identify server IP address in PHP or the server ip: $_SERVER['SERVER_ADDR']; and this for the port $_SERVER['SERVER_PORT'];Read More »
Saving a curl response into a php variable
Saving a curl response into a php variable Here is example to save a curl resonse into a variable inRead More »
get the last 7 characters of a PHP string
get the last 7 characters of a PHP string Use substr() with a negative number for the 2nd argument. $newstring = substr($dynamicstring,Read More »
refresh an iframe in php page
refresh an iframe in php page <script type=”text/javascript”> var timer; function refreshIframe(){ if(timer) clearInterval(timer) timer = setTimeout(refreshIframe,5000) var iframeRead More »
Curl in html forms : Use of curl
Curl in html forms : Use of curl Forms are the general way for the user to enter data in,Read More »
curl to automate HTTP jobs : Working with Curl command
Curl is a command line tool for doing all sorts of URL manipulations and transfers. Curl is not written toRead More »
curl api using variable post/get method
HI every one there are lot of confusion about curl may be you understand easily … $url= “phone=$phone&leadid=$leadid”; //initializedRead More »
convert backslash to forward slash vice versa
Hi Guys, this is very easy method to replace the special character with in string . Example $var = “/var/xyz/html/uploaddata/xyz.html”; “/”replace withRead More »
Convert datetime to specific formats in PHP
There are many way to use date time with specific combination with format in PHP.. dd/mm/yyyy 18/04/2016 $userdefine = date("d/m/Y", $datetime); echo $userdefine;Read More »
PHP Video File Upload in Server
Configure The “php.ini” File in local server or Linux ,Centos.for In your “php.ini” file, search for the file_uploads directive, andRead More »
PHP MySQL Database Connection
PHP 5 and later can work with a MySQL database using: MySQLi extension (the “i” stands for improved) PDO (PHPRead More »
PHP Cron Job: How to Execute PHP file Using Crontab in Linux
There are various method to execute php file via crontab in linux. Here is the details of all the method:Read More »
php ltrim function : php remove left string
Remove characters from the left side of a string: Example <?php $str = “Hello World!”; echo $str . “<br>”; echoRead More »