Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Script for twitter.com regstration.

It is a simple Script-regestrator for Twitter.com.The script automatically fill data fields and shows a dialog input captcha. If you have access to whatever service recognition CAPTCHA, then this service can be connected to this script.

PHP code:

?php
// The following code is required to properly run Web Human Emulator
require("../Templates/xweb_human_emulator.php");

//////////////////////// settings for scripts
// name
$usr_name ="name";
// login
$usr_login = "login";
// password
$usr_pwd = "password";
// mail
$usr_mail = "mail";
// message
$usr_message = "message";
//////////////////////////////////////////////////////////
// go to twitter
$browser->navigate('twitter.com');
$browser->wait_for(240,1);

// go to registration
$anchor->click_by_inner_text('Sign up now','true');
$browser->wait_for(240,1);
// set name
$input->set_value_by_name('user[name]',$usr_name);
// set login
$input->set_value_by_name('user[screen_name]',$usr_login);
// set password
$input->set_value_by_name('user[user_password]',$usr_pwd);
// set mail
$input->set_value_by_name('user[email]',$usr_mail);

////////////////////////////////////// recognize recatcha

$pref ="src=\"https://api-secure.recaptcha.net/image?c=";
$pref1 ="\" width=";
$text = $webpage->get_body();

$ind = strpos($text,$pref);
$ind1 = strpos($text,$pref1,$ind);

$cod = substr($text,$ind+strlen($pref),$ind1-$ind-strlen($pref));

$url_captcha = "https://api-secure.recaptcha.net/image?c=".$cod;

$captcha = $app->dlg_captcha_from_url_exactly($url_captcha,"false");
// set captcha
$input->set_value_by_name("recaptcha_response_field",$captcha);

//////////////////////////////////////////////////////////////////////////////////////

// register
$button->click_by_name('commit');
$browser->wait_for(240,1);
// skip next step
$anchor->click_by_inner_text('Skip this step','true');
$browser->wait_for(240,1);
// apply all
$button->click_by_name('commit');
$browser->wait_for(240,1);
// set message
$textarea->set_value_by_name('status',$usr_message);
// update message on twitter
$button->click_by_name('update');
$browser->wait_for(240,1);

// Quit
$app->quit();
?>



This post first appeared on Web Human Emulator Scripts, please read the originial post: here

Share the post

Script for twitter.com regstration.

×

Subscribe to Web Human Emulator Scripts

Get updates delivered right to your inbox!

Thank you for your subscription

×