Created
April 2, 2013 02:25
-
-
Save cccaldas/5289488 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
require_once("deathbycaptcha.php"); | |
require_once("request.php"); | |
require_once("lib/curl.php"); | |
require_once("lib/curl_response.php"); | |
$captcha_link = 'http://www.telexfree.com/plugins/securimage/securimage_show.php?sid=0.6981127592734993'; | |
$auth_link = 'http://www.telexfree.com/bo/app/config/Authentic.php'; | |
$ref_link = 'http://www.telexfree.com/index.php'; | |
$curl = new Curl(); | |
$curl->cookie_file = "curl_cookie.txt"; | |
$response = $curl->get($captcha_link); | |
file_put_contents('captcha.jpg', $response->body); | |
var_dump($response); | |
$client = new DeathByCaptcha_SocketClient('stewones', 'stw112358'); | |
// Put the CAPTCHA file name or handler, and desired timeout (in seconds) here: | |
if ($captcha = $client->decode('captcha.jpg', 30)) | |
$captcha_solved = strtoupper($captcha['text']); | |
$fields = array( | |
'pwd_usuario_sis' => urlencode('laila0100'), | |
'log_usuario_sis' => urlencode('lailamedeiros'), | |
'radio' => urlencode('D'), | |
'security_code' => urlencode($captcha_solved) | |
); | |
//$curl->header($response->headers); | |
$response = $curl->post($auth_link, $fields); | |
var_dump($response); exit(); | |
//file_put_contents('captcha.jpg', file_get_contents($captcha_link)); | |
//$captcha_return = | |
file_put_contents('captcha.jpg', request_post($captcha_link)); | |
// Put your DBC credentials here. | |
// Use DeathByCaptcha_HttpClient class if you want to use HTTP API. | |
$client = new DeathByCaptcha_SocketClient('stewones', 'stw112358'); | |
// Put the CAPTCHA file name or handler, and desired timeout (in seconds) here: | |
if ($captcha = $client->decode('captcha.jpg', 30)) | |
$captcha_solved = strtoupper($captcha['text']); | |
//echo $captcha_solved; exit(); | |
var_dump($fields); | |
$result = request_post($auth_link, $fields); | |
var_dump($result); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eai cara tudo de boa, se possivel posta o codigo do arquivo ("request.php");