Skip to content

Instantly share code, notes, and snippets.

View whatnickcodes's full-sized avatar
😍

Nicholas Cerminara whatnickcodes

😍
View GitHub Profile
public
@whatnickcodes
whatnickcodes / file1.php
Created November 29, 2012 19:23
description!
this is content for file 1
@whatnickcodes
whatnickcodes / file1.php
Created November 29, 2012 19:45
description!
this is content for file 1
@whatnickcodes
whatnickcodes / file1.php
Created November 30, 2012 15:19
description!
this is content for file 1
@whatnickcodes
whatnickcodes / file1.php
Created November 30, 2012 15:31
description!
this is content for file 1
@whatnickcodes
whatnickcodes / file1.php
Created November 30, 2012 15:31
description!
this is content for file 1
private function curl($uri, $body = NULL, $verb = 'GET')
{
$url = (preg_match('#^www|^http|^//#', $uri)) ? $uri : $this->api_url.$uri.'?access_token='.$this->access_token;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if (!is_null($body))
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
@whatnickcodes
whatnickcodes / lazy.php
Created December 5, 2012 19:55
lazy form
<?php
$form_info = array(
array(
'credit_card_type' => array(
'Credit Card Type',
array(
'visa' => 'VISA',
'mc' => 'Master Card',
'amex' => 'American Express',
'discover' => 'Discover'
@whatnickcodes
whatnickcodes / fdsaf.php
Created December 5, 2012 22:23
alphadash
required|alpha_dash|callback__has_dashes
public function _has_dashes($post)
{
if (preg_match('-', $post))
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, 'WePay v2 PHP SDK v' . self::VERSION);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // 30-second timeout, adjust to taste
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_CAINFO, '/var/www/sites/code.enga.ge/html/cod/wepay/cacert.pem');
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$raw = curl_exec($ch);