You are here
php curl request Basic PHP PHP PHP Coding 

PHP cURL Requests

PHP cURL Requests PHP cURL Requests :  A simple introduction to GET and POST requests over HTTP. The idea behind the cURL functions is to initialize a cURL session using the cURL_init(), then  set all your options for the transfer via the cURL_setopt(), then execute the session with the cURL_exec() and then  finish off the session using the cURL_close(). Example of cURL functions to fetch the example.com homepage into a file: <?php $ch = cURL_init(“http://www.example.com/”); $fp = fopen(“example_homepage.txt”, “w”); cURL_setopt($ch, cURLOPT_FILE, $fp); cURL_setopt($ch, cURLOPT_HEADER, 0); cURL_exec($ch); cURL_close($ch); fclose($fp); ?>   All cURL Functions…

Read More
uploading file with php Basic PHP PHP PHP Coding 

Uploading Files with PHP

Uploading Files with PHP How to upload files on server using a Simple HTML form and PHP. You can upload any type of file like images, videos, ZIP files, Office documents file, PDFs and other supported file types. Crating a HTML form to upload the file : <form method=’post’ enctype=’multipart/form-data’ action=’upload.php’> File: <input type=’file’ name=’file_upload’> <input type=’submit’> </form>   PHP SCRIPT to upload file : <?php // Check for errors if($_FILES[‘file_upload’][‘error’] > 0){ die(‘An error ocurred when uploading.’); } if(!getimagesize($_FILES[‘file_upload’][‘tmp_name’])){ die(‘Please ensure you are uploading an image.’); } // Check…

Read More
php-introduction Basic PHP PHP Tutorial 

Introduction to PHP

What is PHP PHP Stands for HyperText Preprocessor PHP is the web development language written by and for web developers It was originally named as Personal Home Page Tools Other name for PHP is professional home page It is server side script which can be embedded in HTML or used as a standalon binary.   History of PHP Rasmus Lerdrof is the creator of the PHP language The first part of PHP was developed in 1994   Common uses of PHP The PHP allow to web developers and programmers to…

Read More
php-mysql Basic PHP PHP 

What is PHP & Mysql ?

PHP is a server-side scripting language, usually used to create web applications in combination with a web server, such as Apache. PHP can also be used to create command-line scripts akin to Perl or shell scripts, but such use is much less common than PHP’s use as a web language PHP stands for PHP: Hypertext Preprocessor. PHP is case sensitive langauage. A PHP file contains PHP tags and ends with the extension “.php”. and PHP is open source and cross platform. PHP syntax and Hello world example : <?php echo…

Read More