SEO | Link Popularity | Search Engine Consulting | SEO Tutorial | SEO Tools | SEO Forum
Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-06-2006, 10:33 PM
BSolveIT's Avatar
BSolveIT BSolveIT is offline
SEO
 
Join Date: May 2005
Location: England, UK
Posts: 621 BSolveIT has a spectacular aura aboutBSolveIT has a spectacular aura about
Send a message via MSN to BSolveIT
Lightbulb ASP solution for Keyword Tool using Yahoo Search Marketing

Hello all!

I've been hard at work writing little bits of code and I thought I would share a handy function I wrote to extract keyword data from Yahoo Search Marketing. It retrieves up to 100 related keyword terms, plus the number of times search on per day in the previous month.

I've configured the URL on this function to get UK based results, but if you want data for different locations, the URL accepts the same parameters as the Yahoo Search API.

e.g.
mkt=us
lang=en_us

I hope some of you will find it useful:

Code:
<%
Function GetKeywords(Term)
URL = "http://inventory.overture.com/d/searchinventory/suggestion/?mkt=uk&lang=en_gb&term=" & server.URLEncode(Term)
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", URL, False
objXMLHTTP.Send
html = objXMLHTTP.responseText
html = lcase(html)
Length = Len(html)

TheStart = InStr(1, html, "<table border=0 cellpadding=1 cellspacing=0 bgcolor=#ffffff width=270>")

	IF TheStart > 0 THEN
		Keywords = mid(html,TheStart,Length - TheStart)
			
		TheStart = InStr(1, Keywords, "<tr bgcolor=#333333>")
		Total = Split(keywords,"<tr")
		TotalSize = Ubound(Total) - 2

		Dim KeyArray
		ReDim KeyArray (TotalSize, 2)

		CountStart = InStr(1, Keywords, ">&nbsp;") + 7
		CountEnd = InStr(CountStart,Keywords, "</td>")
		Keycount = mid(keywords, CountStart, CountEnd - CountStart)
		KeyArray(0, 0) = Keycount

		Keywords = replace(keywords, "e8e8e8>&nbsp;", "#000000>")

		KeyStart = InStr(CountEnd, Keywords, "#000000>") + 8
		KeyEnd = InStr(KeyStart, Keywords, "</a>")
		Keyphrase = Mid(Keywords,KeyStart, KeyEnd - KeyStart) 
		KeyArray(0, 1) = Keyphrase

		FOR x = 1 TO TotalSize - 1
			CountStart = InStr(KeyEnd, Keywords, ">&nbsp;") + 7
			CountEnd = InStr(CountStart,Keywords, "</td>")
			Keycount = mid(keywords, CountStart, CountEnd - CountStart)
			KeyArray(x, 0) = Keycount

			KeyStart = InStr(CountEnd, Keywords, "color=#000000>") + 14
			KeyEnd = InStr(KeyStart, Keywords, "</a>")
			Keyphrase = Mid(Keywords,KeyStart, KeyEnd - KeyStart) 
			KeyArray(x, 1) = Keyphrase
		NEXT
			
		GetKeywords = KeyArray
		exit function
	ELSE
		GetKeywords = False
	END IF
End Function
%>


You can see it in action on our site if you click to use the free meta check from our home page.

Comments and suggestions would be most welcome!

Reply With Quote
  #2  
Old 02-07-2006, 02:47 AM
Mano70's Avatar
Mano70 Mano70 is offline
SEO
 
Join Date: Feb 2005
Location: C:\Norway
Posts: 122 Mano70 will become famous soon enough
Nice, thank's for sharing. BTW, I haven't been messing around with API-stuff, are you running this with your API, or are you running the solution without API?

BTW, if you don't have it, and wan't a Server Header checker like http://www.i-partner.no/tools/sjekk-server-header.asp just let me know. Only drawback with the solution is the need for running through anonymous proxy (if not some pages will throw an error), and I'm running it through some free proxies now (and these ip's lasts only a few days).

Last edited by Mano70 : 02-07-2006 at 02:57 AM.
Reply With Quote
  #3  
Old 02-07-2006, 05:21 AM
BSolveIT's Avatar
BSolveIT BSolveIT is offline
SEO
 
Join Date: May 2005
Location: England, UK
Posts: 621 BSolveIT has a spectacular aura aboutBSolveIT has a spectacular aura about
Send a message via MSN to BSolveIT
Hi Mano70!

Ah well, I do like to share. I have written some really nice rank checking pages with the search APi's of Google, MSN, and Yahoo (and now integrated the a PageRank checker thanks to you!). This solution isn't using the API's though as there's currently no support or access to this information from the API's, although Google and Yahoo are working to offer that very soon.

Did you try out the meta data checker? I've integrated it with the keyword tool. It will extract the title, description and keywords from any url, and turn the keywords into clickable links into the keyword tool so that you can check if you chosen your keywords wisely. It's pretty cool, if I say so myself.

Can I ask a silly question? Whats a server header checker? Um... and what would it be for? Sorry - I've never heard of the term. But I'm keen to have a look if it's likely to be useful.

Reply With Quote
  #4  
Old 02-07-2006, 06:35 AM
Mano70's Avatar
Mano70 Mano70 is offline
SEO
 
Join Date: Feb 2005
Location: C:\Norway
Posts: 122 Mano70 will become famous soon enough
I tried the meta data checker, you are right, it's pretty cool.

Regarding server header checker, my tool is inspired by this tool (and page):
http://www.seoconsultants.com/tools/headers.asp

But they are using SOAP as far as I know, I'm not:
http://www.seoconsultants.com/webservices/main.asmx

I'm using CreateObject("WinHTTP.WinHTTPRequest.5.1") to make my solution work.

Edit:
To be honest, I didn't quite understand how to make your nifty function work.

Last edited by Mano70 : 02-07-2006 at 03:09 PM.
Reply With Quote
  #5  
Old 02-07-2006, 10:50 PM
BSolveIT's Avatar
BSolveIT BSolveIT is offline
SEO
 
Join Date: May 2005
Location: England, UK
Posts: 621 BSolveIT has a spectacular aura aboutBSolveIT has a spectacular aura about
Send a message via MSN to BSolveIT
Ahaaa!

Well, the function basically returns a two dimsional array with 2 values.
The first being the number of searches per keyword term, the other being the related keywordterms.

All you have to do is call the function by passing it the keyword term you want to check first.

e.g.
resultArray = GetKeywords("search engine optimisation")

Now you'll have all the information you want stored in 'resultArray'.
So you could do whatever you want with that - all I do is output it in a table.

Reply With Quote
  #6  
Old 02-07-2006, 11:42 PM
Mano70's Avatar
Mano70 Mano70 is offline
SEO
 
Join Date: Feb 2005
Location: C:\Norway
Posts: 122 Mano70 will become famous soon enough
That was what I thought, but it only throws out the error Response object, ASP 0106 (0x80020005) > An unhandled data type was encountered which is why I had to ask. Sorry to bother you, have only tried it locally for "fun", but do you have any idea about what's causing the error?
Reply With Quote
  #7  
Old 02-08-2006, 04:34 PM
BSolveIT's Avatar
BSolveIT BSolveIT is offline
SEO
 
Join Date: May 2005
Location: England, UK
Posts: 621 BSolveIT has a spectacular aura aboutBSolveIT has a spectacular aura about
Send a message via MSN to BSolveIT
Are you running it on Windows XP with IIS installed? If so - thats why.

You should be able to get around the problem by installing MS XML 3.0 (or later). If you install the .Net framework version 2.0, it should install everything you need.

If you are running it on a windows server, then maybe best if you contact me directly through our website. My direct email is mark@ you know where .com
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Login/Register
User Name
Password
Remember Me?

Forum Links
Forum Home
SEO Forum
Internet Marketing Forum
Web Design Forum
Web Hosting Forum
Programming Forum
SEO Chat

Quick Links
Forum Home
New Posts
Mark Forums Read
Open Buddy List
User Control Panel
Edit Avatar
Edit Profile
Edit Options
Miscellaneous
Subscribed Threads
My Profile

Search Forums

Advanced Search
All times are GMT -8. The time now is 02:19 PM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.