help to
Modify this code so it works for this website
http://mtas.surfcontrol.com/mtas/MTAS.asp
retrieve the category to a column
I will have the website names into the txt file
Script scans each site with "mtas.surfcontrol.com" and lists the category
strInputFile = "input.txt"
strOutputFile = "output.txt"
Set objFSO = CreateObject("Scripting.Fi
leSystemOb
ject")
Set objHTTP = CreateObject("MSXML2.XMLHT
TP")
Set objInput = objFSO.OpenTextFile(strInp
utFile, 1, False)
Set objOutput = objFSO.CreateTextFile(strO
utputFile,
True)
Set objIE = CreateObject("InternetExpl
orer.Appli
cation")
objIE.Visible = True
objIE.Navigate "
http://moonsy.com/pagerank_checker/"
While objIE.busy = True Or objIE.ReadyState <> 4
WScript.Sleep 100
Wend
While Not objInput.AtEndOfStream
strURL = Trim(objInput.ReadLine)
If strURL <> "" Then
objIE.document.form1.domai
n.value = strURL
objIE.document.form1.submi
t.click
While objIE.busy = True Or objIE.ReadyState <> 4
WScript.Sleep 100
Wend
strRank = InStr(1, objIE.Document.body.innerT
ext, "your page rank", vbTextCompare)
If strRank = 0 Then
objOutput.WriteLine strURL & ",NOT FOUND"
'WScript.Echo strURL & ",NOT FOUND"
Else
strRank = Replace(Trim(Mid(objIE.Doc
ument.body
.innerText
, strRank, 21)), "Your Page Rank:", "")
objOutput.WriteLine strURL & "," & strRank
'WScript.Echo strURL & "," & strRank
End If
End If
Wend
objInput.Close
objOutput.Close
Set objHTTP = Nothing
objIE.Quit
ASKER
The current code above places each website name in a site http://moonsy.com/pagerank_checker/ and finds the PR
Now the same code can we change to be placed from txt file each website name into
http://mtas.surfcontrol.com/mtas/MTAS.asp
then find what category the website is from?