X-Scripts

READY-MADE SOLUTIONS FOR YOUR BUSINESS

OUR CONTACTS:
Skype: igor_sev2
Email : order@x-scripts.com

Script Human Emulator automatic posting to Twitter

Many of us lead an active social life and have accounts in several social networks. While trying to keep all your accounts up to date, that takes a lot of time. We present to your attention a script to post to Twitter

The script works as follows: goes to the specified Twitter account. And from your prepared file post after a certain period of time your messages are.

On input, the script takes a file with soobshenia in the format:
And more often in front of them, as simple users stand up routine tasks.
Many problems can be solved with scripts.
The least expensive option is a php script.
... etc.

script:

// account info on Twitter
$str_lg_tw="DmitriyDumanovs";
$str_pass_tw="kuvxplscgQQ4110";
// path to the file with all the tweets
$path_to_tws = "data/twits.txt";
// wait between tweets in seconds
$wt_min="10";
$wt_max="15";

If you have not one but several accounts on Twitter you can easily tweak the script to work with accounts, which will be taken from the file.

The script itself looks like this:

<?php
/* manufacturer: x-scripts 
** product type: script Xweb Human Emulator 
** website: humanemulator.info 
** our site: x-scripts.com 
** for all questions please contact: 
** email: order@x-scripts.com 
** icq: 625657402 
** skype: igor_sev2 
*/

$xhe_host ="127.0.0.1:7010";

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

// //////////////////////// the script settings /////////////////////////
// account info on Twitter
$str_lg_tw="DmitriyDumanovs";
$str_pass_tw="kuvxplscgQQ4110";
// path to the file with all the tweets
$path_to_tws = "data/twits.txt";
// wait between tweets in seconds
$wt_min="10";
$wt_max="15";

// the script works in debug mode
$dbg = true;

// //////////////////////// additional modules ///////////////
// function 
require_once("tools/functions.php");

// /////////////////////// script ///////////////////////////////////////////
debug_mess(" script started");

// navigate to a blank page
$browser->navigate("about:blank");
// we clean up the browser
$browser->clear_address_bar_history();
$browser->clear_cache();
$browser->clear_cookies("");
$browser->clear_history();
// get tweets into an array
$a_tws= file($path_to_tws);

// go on Twitter
$browser->navigate("https://twitter.com");

// login to Twitter
if(!login_tw($str_lg_tw, $str_pass_tw))
{
debug_mess("failed voitel account!! the script finished.");
$app->quit();
}

// gonna post the tweets in a row 
foreach($a_tws as $tweet )
{
// skip empty
if($tweet=="")
continue;
// post
$div->set_inner_text_by_name("tweet-box-mini-home-profile","");
$div->set_focus_by_attribute("id", "tweet-box-mini-home-profile");
$keyboard->send_input($tweet, 10);
sleep(2);
$btn->click_by_attribute("class", "btn primary-btn tweet-action", true);
sleep(rand($wt_min,$wt_max));
}

debug_mess("script finished");
// Quit
$app->quit();
?>



The script is written 2.04.2013 at Human Emulator 4.6.5 Advanced. At the time of publication of the article 04.04.2013 script was working.

download the script
Number of downloads: 3046

<< Other scripts