home *** CD-ROM | disk | FTP | other *** search
- ##########################################################
- # GDIdb demo script (c) 1999 Global Data Industries
- # This Web Site search engine URL submission script
- # will submit a database of web URL's to a number of
- # the main web search engines. Some search engines
- # require the submission URL and an e-mail address,
- # both of these are stored in the database table.
- ##########################################################
-
-
-
- &datasource("Driver={Microsoft Access Driver (*.mdb)};DBQ=examples.mdb")
-
-
-
- &defvar(?header?,?content?,?URLencoded?,?emailencoded?,?errorcode?)
-
-
-
- &getdata("SELECT * FROM tblSubmitURLs")
- {
-
- ##########################################################
- # URL encode e-mail address and submission URL
- &replace(?URLencoded?,"?URL?"," ","+")
- &pack(?URLencoded?,"?URLencoded?")
- &replace(?emailencoded?,"?email?"," ","+")
- &pack(?emailencoded?,"?emailencoded?")
-
-
- ##########################################################
- # Submit URL to search engines
-
- # whatuseek
- &http(?header?,?content?,
- "http://www.whatuseek.com/cgi-bin/addurl-shock",
- "POST",80,
- "url=?URLencoded?\&email=?emailencoded?")
- &print_msg
-
- # AOL
- &http(?header?,?content?,
- "http://netfind.aol.com/cgi/nfadd_url.cgi",
- "POST",80,
- "url=?URLencoded?\&email=?emailencoded?\&look=netfind")
- &if("nfthanks.html",in,"?header?") { &print("?URL? Added to AOL..") }
-
- # Excite
- &http(?header?,?content?,
- "http://www.excite.com/cgi/add_url_new.cgi",
- "POST",80,
- "url=?URLencoded?\&email=?emailencoded?\&Service=excite\&language=English\&country=UK\&channel=Computers/Internet")
- &if("/info/add_url/thanks/",in,"?header?") { &print("?URL? Added to Excite..") }
-
- # AltaVista
- &http(?header?,?content?,
- "http://add-url.altavista.digital.com/cgi-bin/newurl\?ad=1\&q=?URLencoded?",
- "GET")
- &print_msg
-
- # lycos
- &http(?header?,?content?,
- "http://www-english.lycos.com/cgi-bin/spider_now.pl\?query=?URLencoded?\&email=?emailencoded?",
- "GET")
- &print_msg
-
- # hotbot
- &http(?header?,?content?,
- "http://www.hotbot.com/addurl.asp\?newurl=?URLencoded?\&email=?emailencoded?",
- "GET")
- &print_msg
-
- # webcrawler (uses POST, & returns a location: rather than a "thanks!" page)
- &http(?header?,?content?,
- "http://www.webcrawler.com/cgi-bin/add_url_new.cgi",
- "POST",80,
- "Service=webcrawler\&url=?URLencoded?\&email=?emailencoded?\&language=English\&country=UK\&channel=Computers/Internet\&look=excite")
- &if("/info/add_url/thanks/",in,"?header?") { &print("?URL? Added to webcrawler..") }
-
- # send URL to infoseek in an e-mail
- &sendmail("mail.mydomain.com","?email?","www-request@infoseek.com",formatnone)
- {
- HEADER:
- From: ?email?
- To: www-request@infoseek.com
- Subject: URL Submission
- Date: ?gdidbdate.dn?, ?gdidbdate.d? ?gdidbdate.mn? ?gdidbdate.y? ?gdidbtime?
- BODY:
- ?URL?
-
- }
-
- }
-
-
-
-
-
- ##########################################################
- # this sub strips the html tags off the returned page &
- # prints the text on the screen
-
- &defsub("print_msg")
- {
- &replace(?content?,"?content?","\r\n"," ")
- &striphtml(?content?,"?content?")
- &print("?content?")
- &cls
- }
-
-
-
-
-
- ##########################################################
- # catch and ignore HTTP errors
-
- &defsub("on_error")
- {
- &geterror(?errorcode?,FALSE)
- &if((?errorcode?==119)||(?errorcode?==106))
- {
- &ignore
- }
- }