Example with checking if a file exist

<?php     if (isset($_POST["submit"])) // check if a file has been submitted and if it is an image     {         $dir = &...

Example of checking a file's size

<?php     if (isset($_POST["submit"])) // check if a file has been submitted and if it is an image     {         $dir = &...

Example of image resizing

<?php     $image_orig = "sample_image.png";     $resize = 0.4; // Resize factor     header("Content-Type: image/jpeg");

Example of using exif_read_data() function

<?php     $image_meta = exif_read_data("path/image.jpg", "IFD0");     echo $image_meta===false ? "No meta found." : "Image...

Example of creating a JPG (JPEG) image with PHP

<?php     function createJPEG($imagename)     {         $image = @imagecreatefromjpeg($imagename);        ...

Example with id3_get_version() in PHP

<?php     $version = id3_get_version("path/audio_file.mp3");          if($version & ID3_V1_0)     {...

Example how to establish connection with MySQLi database server

<?php     $server = "server IP address";     $uname = "username";     $passw = "password";    ...

Example how to create MySQLi database with PHP

<?php     // create connection     $server = "server IP address";     $uname = "username";     $passw = &...

Example how to create MySQLi table with PHP

<?php     // create connection     $server = "server IP address";     $uname = "username";     $passw = &...

Example how to insert, update and delete records in MySQLi with PHP

<?php     // create connection     $server = "server IP address";     $uname = "username";     $passw = &...