This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/**************************************************************************** | |
PHP CURL functions for getting data or asytnchronously saving it to file. | |
It is header redirect tolerant. like the 302 http status. | |
Save data to file with cURL: save_data_to_file_w_curl($url,$pathToFile); | |
Get data with cURL get_data_w_curl($url); | |
/** | |
* MIT License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get API KEY: https://core.telegram.org/bots#botfather | |
// get chad id: http://stackoverflow.com/questions/31078710/how-to-obtain-telegram-chat-id-for-a-specific-user | |
$api_key = 'FAKE1234'; | |
$chat_id = '7850602' | |
$url = "https://api.telegram.org/bot".$api_key."/"; | |
// UNCOMMENT desired method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: Rodrigo Brandão | |
* Date: 21/03/2016 | |
* Time: 11:07 | |
*/ | |
class Extenso | |
{ | |
public static function removerFormatacaoNumero( $strNumero ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Create a Mask in an email address | |
This function create a mask using a valid email address. | |
This is usefull when someone need to confirm the email used in a system | |
Author: Gabriel Froes - https://gist.github.com/gabrielfroes | |
*/ | |
function emailMask(email) { | |
var maskedEmail = email.replace(/([^@\.])/g, "*").split(''); | |
var previous = ""; | |
for(i=0;i<maskedEmail.length;i++){ |