littleclown Posted December 18, 2006 Posted December 18, 2006 (edited) Hello. This is my first app. and it is Alpha for now. SEO is from Search Engine Optimization - a couple of technics and actions for optimize some page to be in the first results in search engines when someone search string about the site. (My English is bad - sorry). When you do this you need to check where is your site, and must try with diferent searches. For example - you have site about downloads. You should search "Downloads" "Free downloads", "Free programs", etc, and look where is your site in results list. G-SEO do this for you automaticaly. Because is alpha there is no interface and all settings are in ini file: [default] keywords=download, downloads, free downloads, open source downloads url=download.com lng=en The first var is about keywords. With "," you will be free to separate multiple searches. url is your page. For best results dont use http:// or WWW. Use lng func to search non-English words. G-SEO create a couple of files with results,where you will see the posittion of your site with this keywords. Every new line is new search, and when you run this script every day for example you will see how your site is moving in google results. I will with G-SEO coz for now is so basic, but maybe for some of you will be helpful. When you download ZIP, you must edit your ini file. the results are modified by your google options - if you were set somelanguage for pages, G-SEO will filter the results (use IE to change your google options) Edited December 19, 2006 by littleclown
eitan Posted December 19, 2006 Posted December 19, 2006 good job! a clever and useful script. a few suggestions: add a gui with input and saving options. add a few more functions. please note that their is a big demand for search engine optimization software and you might be on to somthing...
littleclown Posted December 19, 2006 Author Posted December 19, 2006 (edited) This is just the beginning. I just show how to use _google func. I will create gui, exports etc, but for know my work is about debugging (short code with many errors.) See first post for new version 0.6 - many bugs are fixed and lng option is included. Oops this is the source: expandcollapse popup#include <inet.au3> #include <Array.au3> if not FileExists(@ScriptDir & "\results") then DirCreate(@ScriptDir & "\results") Dim $Pages Dim $msg Dim $MatchPagesForWord $keywords=IniRead("settings.ini","default","keywords","XX") $keywords=StringSplit($keywords,",") $url=IniRead("settings.ini","default","url","XX") Dim $result[100] $lng=IniRead("settings.ini","default","lng","XX") Dim $line[1] $i=1 Do $result=_Google($keywords[$i],100,$lng) ;_ArrayDisplay($result,0) TrayTip("Working on:",$keywords[$i],1) ;_ArrayDisplay($result,0) $o=1 _ArrayAdd($line,$keywords[$i] & ": ") Do $match=StringInStr($result[$o],$url) if $match<>0 Then if $result[0]<>$o and $o<>1 then $sep=", " Else $sep="" EndIf $line[$i]=$line[$i] & $o &", " EndIf $o=$o+1 Until $o>$result[0] $o=0 $line[$i] = StringTrimright($line[$i], 2) & "." $fopen=fileopen(@ScriptDir & "\" & "results\" & $url&"-"&$keywords[$i]&".txt",1) FileWriteLine($fopen,@YEAR&"."&@MON&"."&@MDAY&" "&@HOUR&":"&@min&" "&$line[$i]) FileClose($fopen) $msg=$msg&$line[$i]&@CRLF $i=$i+1 Until $keywords[0]=$i-1 TrayTip("Complete!","...",1000) MsgBox(0,0,$msg) Func _Google($s_q, $i_resultnum = 10, $lng="en") If NOT IsInt($i_resultnum) Then SetError(3) Return 0 Endif Local $a_URLS, $s_Source $s_Source = _INetGetSource('http://www.google.com/search?hl='&$lng&'&q=' & StringReplace(StringReplace($s_q, "+", "%2B"), " ", "+") & '&num=' & $i_resultnum) If @ERROR Then SetError(1) Return 0 EndIf $a_URLS = StringRegExp($s_Source, '<(?i)a class=l href="(.*?)">', 3) IF @Error Then SetError(2) Return 0 Endif Local $a_URLSReturn[UBound($a_URLS) + 1] $a_URLSReturn[0] = UBound($a_URLS) Local $i_counter For $i_counter = 1 To UBound($a_URLS) $a_URLSReturn[$i_counter] = $a_URLS[$i_counter - 1] Next Return $a_URLSReturn EndFunc ;==>_Google Edited December 19, 2006 by littleclown
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now