I wrote script for register my site to 3 Seach Engines - MSN(Bing),Google and Yahoo.
PHP code:
// The following code is required to properly run Web Human Emulator
require("../../Templates/xweb_human_emulator.php");
// This script submit your site to 3 Search Engines
// Google
// MSN
// Yahoo
// for request more SE please write to humanemulator@gmail.com
// ======================= COMMON INFO =================
$title="title";
$url="http://www.sitebred.com/";
$comments="comments";
$contact_face="name";
$contact_mail="mal@mail.com";
// ======================================================
// ======================= GOOGLE ======================
// goto to add page
$browser->navigate("http://www.google.com/addurl/?continue=/addurl");
$browser->wait(1);
// add reg info
$input->set_value_by_number(1,$url);
$input->set_value_by_number(2,$title);
$captcha=$app->dlg_captcha_from_image_number(7);
$input->set_value_by_name("captcha",$captcha);
$button->click_by_number(1);
$browser->wait(1);
// ======================================================
// ======================= MSN ==========================
// goto to add page
$browser->navigate("http://www.bing.com/docs/submit.aspx");
$browser->wait(1);
// add reg info
$input->set_value_by_name("url",$url);
$captcha=$app->dlg_captcha_from_image_number(0);
$input->set_value_by_name("h",$captcha);
$button->click_by_name("submit_url");
$browser->wait(1);
// ======================================================
// ======================= YAHOO ========================
// goto to add page
$browser->navigate("https://siteexplorer.search.yahoo.com/submit");
$browser->wait_for(10,1);
$anchor->click_by_inner_text("Submit a Website or Webpage","true");
$browser->wait_for(10,1);
// add reg info
$input->set_value_by_name("site_url",$url);
$button->click_by_inner_text("Submit URL");
$browser->wait_for(10,1);
// ======================================================
// Quit
$app->quit();
Object Description from this script:
browser - object for work with WHE browser (navigate to website,wait for load web page etc)
input - object for work with INPUT elements of web page (set value, get value etc)
app - object for manage WHE application and captcha dialogs
button - object for work with INPUT (type button) elements of web page (press button, set focus etc)
anchor - object for work with links (A tag)of web page (click. get text etc)
No comments:
Post a Comment