Skip to content

Instantly share code, notes, and snippets.

View rafaelgou's full-sized avatar

Rafael Goulart rafaelgou

View GitHub Profile
@rafaelgou
rafaelgou / StringUtil.php
Last active December 22, 2015 05:18
PHP Slug generator class/method
/**
* Description of StringUtil
*
* @author <rafaelgou@gmail.com> Rafael Goulart
*/
class StringUtil {
/**
* Slugify a text and remove accents
*
@rafaelgou
rafaelgou / pagseguro_notifications_proxy.php
Created May 30, 2013 02:51
Proxy para notificações do PagSeguro Permite configurar apenas uma conta do PagSeguro que repassa notificações para várias lojas
<?php
$logfile = '/var/log/pagseguro/notifications.log';
$handler = fopen($logfile, 'a');
$message = $_SERVER['REMOTE_ADDR'] . ' - ' . date('Y-m-d H:i:s') . ' - ' .
serialize($_REQUEST) . PHP_EOL;
fwrite($handler, $message);
fclose($handler);
$urls = array(
'http://loja1.dominio.com.br/customer/pagseguro_notification.php',