Press enter to see results or esc to cancel.

Abraham Garcia Abraham Garcia in PHP Scripts   Friday, June 14 2019

How to Add A Class to a Form Submit in CodeIgniter PHP

Want to add a class to the form_submit function in CodeIgniter. I found this and it has helped me modify my buttons on the fly.

Want to add a class to the form_submit function in CodeIgniter. I found this and it has helped me modify my buttons on the fly.  echo form_submit('loginSubmit', 'Login',"class='btn btn-danger'");    

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, May 23 2019

How to Remove index.php on URL in CodeIgniter

Remove the index.php in the URL for CodeIgniter. Simple and Fast Tutorial for all PHP Developers.

Short instructions on how to remove the CodeIgniter index.php with .htaccess 1. Create .htaccess File RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] 2. Update

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, May 17 2019

How to Convert UNIX timestamp to Format Date String

Easy way to convert unix timestamp to nice date format in PHP.

Use this to convert unix timestamp to format php date <?php $timestamp=1333699439; echo gmdate("Y-m-dTH:i:sZ", $timestamp); ?>  

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, May 9 2019

Clean Phone PHP Remove Parentheses and Dashes

A Short Snippet to Clean Phone from Special Characters. Remove Parentheses and Dashes.

This is a short snippet on how to clean a phone number from Dashes and Paranteses. Use this to clean phones on the fly.  $ph_number = '(619) 584-5555'; $phone = preg_replace('/[^dxX]/', '', $ph_number);    

Continue reading
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