Press enter to see results or esc to cancel.

Abraham Garcia Abraham Garcia in PHP Scripts   Sunday, September 6 2020

Trello API Getting Started - Simple PHP API Wrapper to Get Started

Create a Card With the Trello API. I used this with a webhook with Zapier because I was having issues actually add a card to a copied board.

I was trying to get started with Trello API Integration because something was going on with Zapier and I had to do some actual hard code integration so I decided to look into the trello API and found a nice wrapper to do simple interactions. 

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Monday, March 16 2020

Get IP Details Via API with PHP

ipapi.com is a API for getting IP address details. You can use this to redirect users to different websites depending on the country access.

This is a short tutorial on how to get IP Address details with API ipapi.com  <?php echo file_get_contents('https://ipapi.co/8.8.8.8/json'); ?> Sample Response: { "ip": "8.8.8.8", "city": "Mountain View", "region":

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, October 4 2019

Sample CURL POST PHP Example Code Snippet

A Sample CURL POST PHP Example to Get Started with Simple API Calls.

This is a short snippet to get started with PHP CURL. Use this to call API in GET, POST, ETC... <?php // // A very simple PHP example that sends a HTTP POST to a remote site // $ch = curl_init(); curl_setopt($ch,

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, September 20 2019

Create a Folder if it does not exists in PHP

This is a short snippet on how to create a folder via php when it does not exits.

This is a short snippet on how to create a folder via php when it does not exits.  if (!file_exists('path/to/directory')) { mkdir('path/to/directory', 0777, true); }

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, September 12 2019

Enable CORS on CodeIgniter Controller PHP

How to Enable CORS on CodeIgniter Controller PHP. Learn with a Simple Constructor Method for your PHP Controller.

This is a Short Snippet for Code Igniter to Enable CORS on Controller.    public function __construct() { header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, August 9 2019

Determine if Day is in the Future of Today PHP

Check if Date is in the Future. A Small Snippet to determine if day is bigger than today.

Check if Date is in the Future. A Small Snippet to determine if day is bigger than today. $checkdate = new DateTime($current_store['checkdate']); $current_date = new DateTime(); if ($checkdate > $current_date) { //date is in the future }

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, July 11 2019

Invisible Recaptcha V3 PHP Example

Complete HTML, JS and PHP Sample on How to get Started with Google Recaptcha V3. The New and Improved Recaptcha V3.

This is a short Recaptcha V3 Example on PHP.   Add this on Your Header Before closing </head> <script src="https://www.google.com/recaptcha/api.js?render=siteKeyCode"></script> <script>

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Friday, July 5 2019

Example of PHP Paypal Smart Buttons - How to Integrate Smart PayPal Buttons

A Short tutorial and snippets on how to integrate PHP PayPal Smart Buttons.

This is a snippet code of the integration of PayPal Smart Buttons. I struggled so much in creating this for SandBox so this is the sandbox integration for PayPal Smart Buttons.  First you must include the Script Tag <script

Continue reading
Abraham Garcia Abraham Garcia in PHP Scripts   Thursday, June 27 2019

How to Determine the Last and First Iteration of a For Each Loop PHP

A short snippet to determine the first and last iteration in a foreach loop for PHP.

Use this snippet to figure the Last and First iteration of a foreach loop.  $i = 0; $len = count($array); foreach ($array as $item) { if ($i == 0) { // first } else if ($i == $len - 1) { // last } //

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