List of free web storage providers. Save up to 50 GB online.

Get keywords from remote URL

Access to remote pages tutorial


This script may be used to get the list of all words included in a text file. Just copy it to your site.

GetKeywords.asp
<%

' The URL we will work with
RemoteURL = "http://www.yourdomain.com/yourpage.html

' Create the xml object and open connection
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.Open "get", RemoteURL, False
objXML.Send 

' Get Response page
ResponsePage = objXML.responseText

'Set the xml object to nothing
Set objXML = Nothing

response.write ("Lenth of the original file: " & len(ResponsePage) & "<BR>")
 

' Remove non alfanumeric letters
Thetext=lcase(ResponsePage)
for i=0 to 31 
 Thetext=Replace(Thetext,CHR(i)," ") 
next 
for i=33 to 47 
 Thetext=Replace(Thetext,CHR(i)," ") 
next 
for i=58 to 64
  Thetext=Replace(Thetext,CHR(i)," ") 
next 
for i=91 to 96 
  Thetext=Replace(Thetext,CHR(i)," ") 
next 
for i=123 to 255 
  Thetext=Replace(Thetext,CHR(i)," ") 
next 
Thetext=replace(Thetext,"  "," ")

' remove all repited words
public namearray
namearray=split (Thetext," ")
max=ubound(namearray)
Thetext=" "
for counter=0 to max
  if instr (Thetext, namearray(counter))=0 then
   Thetext=Thetext & " " & namearray(counter)
namearray(counter)=""
 end if
namearray(counter)=""
next
 

response.write (Thetext & "<BR>Lenth of keywords: " & len(Thetext))
%>
<HR>
Script provided by <A HREF=http://www.asptutorial.info>AspTutorial.info</a>

Create word search puzzles with your own words



Add Country identification to your site

Tutorial home page

2008@ AspTutorial.info. All rights reserved.