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 | |
class RdStation{ | |
public static $instance; | |
private static $max_requests_per_minute = 60; | |
private static $base_url = "https://api.rd.services"; | |
public $requests_count = null; | |
private $client_id; | |
private $client_secret; |
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 | |
$emailsList = News::giveMeNumberAvaiableEmailsAndMarkAsSending($numberOfEmails); | |
foreach ($emailsList as $email) { | |
try { | |
//This task delay seconds and this is bad | |
$send = $email->send(); | |
$email->markAsSend(); | |
} catch (\Exception $e) { | |
$email->markAsFailure($e->getMessage()); | |
} |
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 | |
/* | |
------------------------------------ | |
HOW TO USE | |
------------------------------------ | |
IN YOUR PHP FILE, INCLUDE THE CRAWLER FILE AND DO AS EXAMPLE BELOW: | |
$crawler = new crawler(); | |
$crawler->setDomainInitial('http://www.ufsj.edu.br'); |
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 | |
/* | |
* @author carvs | |
*/ | |
$cpf = "12345678912"; | |
$url = "http://transparencia.gov.br/servidores/Servidor-ListaServidores.asp?bogus=1&Pagina=1&TextoPesquisa=".$cpf; | |
$opts = array('http' => | |
array( | |
'method' => 'GET', | |
'timeout' => 20 |
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 | |
/* | |
@Author: carvs | |
----- | |
@HOW TO USE | |
----- | |
OBS: Necessary to use mysql user with permission in information_schema database and in database witch you would like to change defined word. | |
> php ./mysql_all_text_update.php [host] [database] [mysqluser] [mysqlpassword] [oldword] [newword] | |
Example: php ./mysql_all_text_update.php localhost website root mypass website_logo.jpg new_logo.png |