May 1, 2012

[iMacros Script + PHP] imacro + php to the keyword.

imacro + php to the keyword.

 The csv result.csv.

seed keyword,"keyword",&start990,intitle:"keyword",inurl:"keyword",inurl:"keyword" intitle:"keyword"


 


 

 ' ------------------------------------------ Start Script ----------------------------------------
VERSION BUILD=7401110 RECORDER=FX
TAB T=1
SET !ERRORIGNORE YES
SET !ERRORCONTINUE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_TAG 2

'INCLUDE SITE
CMDLINE !DATASOURCE C:\csv\google2.csv
SET !DATASOURCE_COLUMNS 2
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
'==============================================================
SET !VAR2 {{!col1}}
TAB T=1
URL GOTO=http://www.google.com/search?hl=en&source=hp&biw=1136&bih=615&q={{!col1}}&aq=f&aqi=g10&aql=&oq=
TAG POS=1 TYPE=DIV ATTR=ID:resultStats&&TXT:About* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAB T=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/gg_res2.php ATTR=NAME:keyword CONTENT={{!VAR1}}
SET !VAR1 NULL
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/gg_res2.php ATTR=NAME:submit&&VALUE:submit
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT
ADD !VAR2 +{{!EXTRACT}}
SET !EXTRACT NULL
'==============================================================
TAB T=1
URL GOTO=http://www.google.com/search?hl=en&source=hp&biw=1136&bih=615&q={{!col1}}&aq=f&aqi=g10&aql=&oq=&start=990
TAG POS=1 TYPE=I ATTR=TXT:In* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAB T=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/gg_res2.php ATTR=NAME:keyword CONTENT={{!VAR1}}
SET !VAR1 NULL
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/gg_res2.php ATTR=NAME:submit&&VALUE:submit
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT
ADD !VAR2 +{{!EXTRACT}}
SET !EXTRACT NULL
'===============================================================
TAB T=1
URL GOTO=http://www.google.com/search?hl=en&source=hp&biw=1136&bih=615&q=intitle:{{!col1}}&aq=f&aqi=g10&aql=&oq=
TAG POS=1 TYPE=DIV ATTR=ID:resultStats&&TXT:About* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAB T=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/gg_res2.php ATTR=NAME:keyword CONTENT={{!VAR1}}
SET !VAR1 NULL
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/gg_res2.php ATTR=NAME:submit&&VALUE:submit
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT
ADD !VAR2 +{{!EXTRACT}}
SET !EXTRACT NULL
'===============================================================
TAB T=1
URL GOTO=http://www.google.com/search?hl=en&source=hp&biw=1136&bih=615&q=inurl:{{!col1}}&aq=f&aqi=g10&aql=&oq=
TAG POS=1 TYPE=DIV ATTR=ID:resultStats&&TXT:About* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAB T=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/gg_res2.php ATTR=NAME:keyword CONTENT={{!VAR1}}
SET !VAR1 NULL
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/gg_res2.php ATTR=NAME:submit&&VALUE:submit
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT
ADD !VAR2 +{{!EXTRACT}}
SET !EXTRACT NULL
'=================================================================
TAB T=1
URL GOTO=http://www.google.com/search?hl=en&source=hp&biw=1136&bih=615&q=intitle:{{!col1}}+inurl:{{!col1}}&aq=f&aqi=g10&aql=&oq=
TAG POS=1 TYPE=DIV ATTR=ID:resultStats&&TXT:About* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL

TAB T=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/gg_res2.php ATTR=NAME:keyword CONTENT={{!VAR1}}
SET !VAR1 NULL
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/gg_res2.php ATTR=NAME:submit&&VALUE:submit
TAG POS=1 TYPE=P ATTR=TXT:* EXTRACT=TXT
ADD !VAR2 +{{!EXTRACT}}
SET !EXTRACT NULL

SET !EXTRACT {{!VAR2}}
SAVEAS TYPE=EXTRACT FOLDER=C:\csv FILE=result2.csv

 ' ------------------------------------------- End Script ----------------------------------------
 php name gg_res2.php.



<html>
<body>
<form method="post" action="<?php echo $PHP_SELF;?>">
keyword : <input type="text" name="keyword" /></br>
<input type="submit" value="submit" name="submit">
</form>
<br/>
<?phpfunction get_string_between($string$start$end){ $string " ".$string; $ini strpos($string,$start); if ($ini == 0) {  return ""; } $ini += strlen($start); $len strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len);
}
function parse_results($result) { $temp get_string_between($result"About "" results"); if($temp == NULL) { $temp get_string_between($result"In order to show you the most relevant results, we have omitted some entries very similar to the "" already"); } $temp str_replace(","""$temp); return $temp;
}// $r = str_replace("\"","",$r);
// $r = str_replace("\\","",$r);
// $q = str_replace(" ", "+", $q);
//start====================$k $_POST["keyword"];
if ($k != ""){$keyword_res1 parse_results($k);
echo "<p>";
echo $keyword_res1;
echo "</p>";
}
else
echo 'no keyword';?>
</body>
</html>


 


How to open it, run it and open the tab 2 imacro gg_res2.php open it.
 Result.csv bad file, then edit with notepad, press ctrl + h to find and replace with: "," Yes.
 I listen, then listen close to open it with excel cell to divide successfully. 

2 comments:

  1. iMacros + php tutorial very helpful

    ReplyDelete
  2. There are 3 critical factors that you must know to get your web site started on the road to ranking on page one of all the major search engines. The backlinks that you want to get are ones that show up on popular web sites having a Google page rank (PR) of 3 or higher. When you have high value Trust flow blog comments to your website, the search engines will see them, and know that what you are saying on your site has value to searchers. This is off page search engine optimization (SEO) at its' best.

    ReplyDelete

iMacros Script