Press enter to see results or esc to cancel.

Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, February 8 2018

How to Fetch all Channel Youtube Videos with PHP

How to retrieve all youtube videos from a youtube channel. Get the latest and all videos from a youtube channel via php youtube api.

This is a short tutorial snippet on how to fetch via YouTube API's a channels videos. You first have to create an API Key in order to be granted into YouTube API Data.  Getting Started on YouTube

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, January 19 2018

How to Enable Emoji on MySQL with PHP

This is a short tutorial on how to enable Emojis with MySQL and PHP. Simple 5 Steps to get started with Emojis MySQL.

I struggled so much getting iOS and Android Emoji's to work with my Cordova Application. The Server Side of my application is in PHP and Runs a MySQL Database.  After reading and trying i finally figured out the steps to get your Emoji

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, November 10 2017

How to Send Push Notification Via CURL PHP PushWoosh

Send Push Notification via PHP cURL API. A simple API call to create message pushwoosh.

This is a code snippet to send a message via PHP cURL through the PushWoosh API.  define('PW_AUTH', 'TOKEN'); define('PW_APPLICATION', 'APP_ID'); define('PW_DEBUG', false); function pwCall($method, $data) { $url =

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Wednesday, November 8 2017

How to Download Multiple S3 File and Zip them together

This is a simple tutorial on how to get AWS S3 object and zip them together.

This snippet will allow you to download multiple S3 files and Zip them together for an easy one download file.  $files_to_zip = array(); $files = array('aws_file_key1.pdf', 'aws_file_key2.pdf', 'aws_file_key3.pdf'); foreach ($files as $f) {

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Monday, November 6 2017

Delete Files Older than 7 Days Via Cron PHP Job

A tutorial on how to delete files from a specific folder that are older than 7 days via a CRON Job. This is in PHP Language.

This will show you how to delete files from a certain folder that are older than 7 days.  $files = glob("folder/*"); if($files){ $now = time(); foreach ($files as $file) { if (is_file($file)) { if ($now -

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Monday, October 16 2017

Presigned URL for AWS S3 Object with PHP

This is a tutorial on how to generate a presigned url for Amazon AWS S3 Object with PHP.

This is a short tutorial on how to create a presigned url for an amazon S3 object. require('./aws/aws-autoloader.php'); use Aws\S3\S3Client; $bucket = 'mybucketname'; $s3 = S3Client::factory(array( 'region' => 'us-west-2',

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, October 5 2017

How to get POST Variables from Multiple Checkbox Values

A short example on how to get the values of multiple checkbox in a form.

In order to get multiple post variables from checkboxes in your form. You can use the following login in your forms.  <form action="test.php" method="post"> <input type="checkbox" name="check_list[]" value="value 1"> <input

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Tuesday, September 12 2017

Upload a File to AWS S3 Bucket with PHP SDK

This is a sample PHP script on how to upload a file to AWS S3 using PHP SDK

This is a sample script on how to upload a file via the PHP AWS SDK.  require('./aws/aws-autoloader.php'); use Aws\S3\S3Client; $bucket = 'mybucketname'; $s3 = S3Client::factory(array( 'region' => 'us-west-2', 'version'

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Wednesday, August 2 2017

PHP Function to Get Client IP Address

A small function to retrieve the ip address of the user. This uses the PHP Server Method.

This is a function on how to retrieve users ip address. Use this for you projects. function get_client_ip() { $ipaddress = ''; if (isset($_SERVER['HTTP_CLIENT_IP'])) $ipaddress = $_SERVER['HTTP_CLIENT_IP']; else

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Tuesday, April 25 2017

How to Download Most Recent FTP Files Via PHP

A simple PHP script that allows you to download the most recent FTP files from your server.

Want to download your latest FTP files via PHP? Using this php script can help you download the most recent FTP files using plain PHP.  // connect $conn = ftp_connect('ftp.addr.com'); ftp_login($conn, 'user', 'pass'); // get list of files

Continue reading