<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>juust ~ php oddities &#187; serp</title>
	<atom:link href="http://www.juust.org/index.php/category/serp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.juust.org</link>
	<description>Link theory and search engine optimization</description>
	<lastBuildDate>Thu, 19 Jan 2012 09:39:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>how to get bing api search results in MsOffice VBA</title>
		<link>http://www.juust.org/index.php/how-to-get-bing-api-search-results-in-msoffice-vba/2011/12/</link>
		<comments>http://www.juust.org/index.php/how-to-get-bing-api-search-results-in-msoffice-vba/2011/12/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 23:27:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[bing]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[seo tips and tricks]]></category>
		<category><![CDATA[serp]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[vba]]></category>
		<category><![CDATA[xhr]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=1946</guid>
		<description><![CDATA[For the loyal VBA fans a quick snippet to grab search results from Bing in Access or Excel. There are few articles on the web about that, and that is a shame. So lets add some content on it to &#8230; <a href="http://www.juust.org/index.php/how-to-get-bing-api-search-results-in-msoffice-vba/2011/12/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the loyal VBA fans a quick snippet to grab search results from Bing in Access or Excel. There are few articles on the web about that, and that is a shame. So lets add some content on it to the web : first in MsAccess VBA and then in Excel, with a <a href="http://www.juust.org/wp-content/uploads/file/sample_workbook_vba_bing_api.xlsm">sample workbook</a> added.</p>
<p>Working with the BING API requires an Application Id you can get <a href="http://www.bing.com/toolbox/bingdeveloper/">at the Bing website</a>.</p>
<h2>Accessing the Bing Api in MsAccess VBA</h2>
<p>In the the VBA Ide, through the menu <em>T</em>ools <em>R</em>eferences I add a reference to the XML object library that contains the XMLHTTPRequest object, enabling me to make HTTP requests from VBA in the MsAccess database.</p>
<p><a href="http://www.juust.org/wp-content/uploads/2011/12/add-xmlhttprequest-to-vba.png" rel="shadowbox[post-1946];player=img;"><img src="http://www.juust.org/wp-content/uploads/2011/12/add-xmlhttprequest-to-vba.png" alt="" title="add xmlhttprequest to vba" width="779" height="278" class="alignnone size-full wp-image-1947" /></a></p>
<p>The simple part is the http request string : </p>
<div class="geshi no vb">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Dim</span> MyKeyword <span class="kw1">As</span> <span class="kw1">String</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; MyKeyword = <span class="st0">&quot;seo&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Dim</span> requestString <span class="kw1">As</span> <span class="kw1">String</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; requestString = <span class="st0">&quot;http://api.bing.net/xml.aspx?&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Dim</span> AppId <span class="kw1">As</span> <span class="kw1">String</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; AppId = <span class="st0">&quot;(get one at the bing website)&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">&#39; Common request fields (required)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; requestString = requestString &amp; _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;AppId=&quot;</span> &amp; AppId &amp; <span class="st0">&quot;&amp;Query=&quot;</span> &amp; MyKeyword &amp; <span class="st0">&quot;&amp;Sources=Web&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#39; Common request fields (optional)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; requestString = requestString &amp; _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&amp;Version=2.0&quot;</span> _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; <span class="st0">&quot;&amp;Market=en-us&quot;</span> _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; <span class="st0">&quot;&amp;Adult=Moderate&quot;</span> _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; <span class="st0">&quot;&amp;Options=&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#39; Web-specific request fields (optional)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; requestString = requestString &amp; _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&amp;Web.Count=10&quot;</span> _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; <span class="st0">&quot;&amp;Web.Offset=0&quot;</span> _</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &amp; <span class="st0">&quot;&amp;Web.Options=DisableHostCollapsing+DisableQueryAlterations&quot;</span></div>
</li>
</ol>
</div>
<p>Then comes the working part, sending the actual request and receiving the XML response (<strong>objSvrHTTP.responseText</strong>) containing the search data. I use a DomDocument object and XPath to get at the XML data.</p>
<p>First sending the request</p>
<div class="geshi no vb">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; objSvrHTTP.<span class="kw1">Open</span> <span class="st0">&quot;GET&quot;</span>, requestString, <span class="kw1">False</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; objSvrHTTP.<span class="me1">send</span> requestString</div>
</li>
</ol>
</div>
<p>then creating a domdocument and receiving the response in it</p>
<div class="geshi no vb">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">&#39;Create the DomDocument Object</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Dim</span> oDoc <span class="kw1">As</span> MSXML2.<span class="me1">DOMDocument</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Set</span> oDoc = <span class="kw1">CreateObject</span><span class="br0">&#40;</span><span class="st0">&quot;MSXML2.DOMDocument&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; oDoc.<span class="me1">async</span> = <span class="kw1">False</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; oDoc.<span class="me1">validateOnParse</span> = <span class="kw1">False</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">&#39;Load the response in the DomDocument Object</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Dim</span> fSuccess <span class="kw1">As</span> <span class="kw1">Boolean</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; fSuccess = oDoc.<span class="me1">loadXML</span><span class="br0">&#40;</span>objSvrHTTP.<span class="me1">responseText</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">If</span> <span class="kw1">Not</span> fSuccess <span class="kw1">Then</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">MsgBox</span> <span class="st0">&quot;failed&quot;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Exit</span> <span class="kw1">Sub</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span></div>
</li>
</ol>
</div>
<p>The response uses two namespaces and the data we actually want is in the &#8220;web&#8221; namespace, so before we start selecting nodes in the xml-tree we first indicate what namespace we want to access :</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; oDoc<span class="sy0">.</span>SetProperty <span class="st0">&quot;SelectionNamespaces&quot;</span><span class="sy0">,</span> <span class="st0">&quot;xmlns:web=&#39;http://schemas.microsoft.com/LiveSearch/2008/04/XML/web&#39;&quot;</span></div>
</li>
</ol>
</div>
<p>The total search result pages is a top level node in the namespace :</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Set xmlnode <span class="sy0">=</span> oDoc<span class="sy0">.</span>selectSingleNode<span class="br0">&#40;</span><span class="st0">&quot;//web:Total&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Debug<span class="sy0">.</span><span class="kw3">Print</span> xmlnode<span class="sy0">.</span>Text</div>
</li>
</ol>
</div>
<p>&#8230;but the good stuff is in the &#8220;WebResult&#8221; nodes in the xml tree, I can use an XPath reference <strong>//web:Webresult</strong> to access that node-collection and with a simple for-next iterate through the collection, selecting the single nodes containing the actual data.</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; Set oChildren <span class="sy0">=</span> oDoc<span class="sy0">.</span>selectNodes<span class="br0">&#40;</span><span class="st0">&quot;//web:WebResult&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">For</span> <span class="kw3">Each</span> oResult In oChildren</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Debug<span class="sy0">.</span><span class="kw3">Print</span> oResult<span class="sy0">.</span>selectSingleNode<span class="br0">&#40;</span><span class="st0">&quot;./web:Title&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span>Text</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Debug<span class="sy0">.</span><span class="kw3">Print</span> oResult<span class="sy0">.</span>selectSingleNode<span class="br0">&#40;</span><span class="st0">&quot;./web:Description&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span>Text</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Debug<span class="sy0">.</span><span class="kw3">Print</span> oResult<span class="sy0">.</span>selectSingleNode<span class="br0">&#40;</span><span class="st0">&quot;./web:Url&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span>Text</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Debug<span class="sy0">.</span><span class="kw3">Print</span> oResult<span class="sy0">.</span>selectSingleNode<span class="br0">&#40;</span><span class="st0">&quot;./web:DisplayUrl&quot;</span><span class="br0">&#41;</span><span class="sy0">.</span>Text</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; Debug<span class="sy0">.</span><span class="kw3">Print</span> vbCrLf</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">Next</span></div>
</li>
</ol>
</div>
<p>I output to the Immediate window aka Debug (under <em>V</em>iew, <em>I</em>mmediate Window or Ctrl+G)</p>
<p><a href="http://www.juust.org/wp-content/uploads/2011/12/bing-api-in-vba-visual-basic-for-applications-msaccess-and-excel.png" rel="shadowbox[post-1946];player=img;"><img src="http://www.juust.org/wp-content/uploads/2011/12/bing-api-in-vba-visual-basic-for-applications-msaccess-and-excel.png" alt="" title="bing api in vba visual basic for applications msaccess and excel" width="765" height="248" class="alignnone size-full wp-image-1951" /></a></p>
<p>What can we do with it ? Let&#8217;s make a table for date, keyword, url, title, description, position</p>
<p><a href="http://www.juust.org/wp-content/uploads/2011/12/access-nake-table.png" rel="shadowbox[post-1946];player=img;"><img src="http://www.juust.org/wp-content/uploads/2011/12/access-nake-table.png" alt="" title="access nake table" width="866" height="166" class="alignnone size-full wp-image-1954" /></a></p>
<p>and add some code to store the results we retrieve</p>
<div class="geshi no vb">
<ol>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Dim</span> table1 <span class="kw1">As</span> DAO.<span class="kw1">Recordset</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Set</span> table1 = CurrentDb.<span class="me1">OpenRecordset</span><span class="br0">&#40;</span><span class="st0">&quot;Table1&quot;</span>, dbOpenTable<span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">&#39;counter for position &nbsp; &nbsp;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; i = <span class="nu0">0</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Set</span> oChildren = oDoc.<span class="me1">selectNodes</span><span class="br0">&#40;</span><span class="st0">&quot;//web:WebResult&quot;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">For</span> Each oStruct In oChildren</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;i = i + <span class="nu0">1</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">With</span> table1</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span class="me1">AddNew</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#39;data from bing</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !TITLE = oStruct.<span class="me1">selectSingleNode</span><span class="br0">&#40;</span><span class="st0">&quot;./web:Title&quot;</span><span class="br0">&#41;</span>.<span class="me1">Text</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !Description = oStruct.<span class="me1">selectSingleNode</span><span class="br0">&#40;</span><span class="st0">&quot;./web:Description&quot;</span><span class="br0">&#41;</span>.<span class="me1">Text</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !url = oStruct.<span class="me1">selectSingleNode</span><span class="br0">&#40;</span><span class="st0">&quot;./web:Url&quot;</span><span class="br0">&#41;</span>.<span class="me1">Text</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#39;and some additional data</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !MYDATE = <span class="kw1">Now</span><span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !POSITION = i</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !KEYWORD = MyKeyword</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#39;store the record</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<span class="me1">Update</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">With</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">Next</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; table1.<span class="kw1">Close</span></div>
</li>
</ol>
</div>
<p>There now that scratches the seo itch :<br />
<a href="http://www.juust.org/wp-content/uploads/2011/12/bing-api-seo-data-in-msaccess.png" rel="shadowbox[post-1946];player=img;"><img src="http://www.juust.org/wp-content/uploads/2011/12/bing-api-seo-data-in-msaccess.png" alt="" title="bing api seo data in msaccess" width="1071" height="224" class="alignnone size-full wp-image-1957" /></a></p>
<p>MsAccess stuff is a bit hard to put on the web as sample, so I&#8217;ll make a quick one in Excel and put it up for download.</p>
<h2>Accessing the Bing Api in Excel VBA</h2>
<p> <a href="http://www.juust.org/wp-content/uploads/file/sample_workbook_vba_bing_api.xlsm">there you go</a> : on sheet 1 you can fill in your AppID and keyword, click the butt(on&#8230;</p>
<p><a href="http://www.juust.org/wp-content/uploads/2011/12/bing-api-in-excel-vba.png" rel="shadowbox[post-1946];player=img;"><img src="http://www.juust.org/wp-content/uploads/2011/12/bing-api-in-excel-vba.png" alt="" title="bing api in excel vba" width="623" height="236" class="alignnone size-full wp-image-1958" /></a></p>
<p>&#8230;and on sheet 2 you get the top 10 search results</p>
<p><a href="http://www.juust.org/wp-content/uploads/2011/12/bing-api-in-excel-vba-sheet2.png" rel="shadowbox[post-1946];player=img;"><img src="http://www.juust.org/wp-content/uploads/2011/12/bing-api-in-excel-vba-sheet2.png" alt="" title="bing api in excel vba sheet2" width="1247" height="304" class="alignnone size-full wp-image-1959" /></a></p>
<p>It uses the cells B1 and B2 as named ranges for MyKeyword and AppID, and has the code in the enclosed module. It also contains one of my AppId&#8217;s so no querying nasty shit, please.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/how-to-get-bing-api-search-results-in-msoffice-vba/2011/12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>quick note : serp plugin beta</title>
		<link>http://www.juust.org/index.php/wordpress-serp-plugin-beta/2009/09/</link>
		<comments>http://www.juust.org/index.php/wordpress-serp-plugin-beta/2009/09/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 17:47:40 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[juust]]></category>
		<category><![CDATA[serp]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=724</guid>
		<description><![CDATA[I am developing a new google serp plugin for wordpress. I developed it over the weeknd on wp2.8, it should run on anything with a &#8216;shutdown&#8217; hook and jquery. I will be adding some other stuff to it over the &#8230; <a href="http://www.juust.org/index.php/wordpress-serp-plugin-beta/2009/09/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am developing a new <a href="http://www.juust.org/index.php/serp/serp-dashboard-wordpress-plugin/">google serp plugin for wordpress</a>. I developed it over the weeknd on wp2.8, it should run on anything with a &#8216;shutdown&#8217; hook and jquery. I will be adding some other stuff to it over the next few weeks, but I thought I&#8217;d put a beta on the blog. If you try it, I hope it runs, send some feedback. </p>
<p>If you have some ideas about cool features drop me a note, I might put it in there. I was pondering on a rest service to pool sem-data and develop some competitor analysis functionality, but that is just a vague idea.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/wordpress-serp-plugin-beta/2009/09/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>bing</title>
		<link>http://www.juust.org/index.php/bing-serp/2009/08/</link>
		<comments>http://www.juust.org/index.php/bing-serp/2009/08/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 02:46:06 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[serp]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=704</guid>
		<description><![CDATA[for completeness : php bing serp scraping : $query = &#39;serp&#39;; $page = 1; $start = &#40;$page-1&#41;*10; $url = &#39;http://www.bing.com/search?q=&#39;.urlencode&#40;$query&#41;.&#34;&#38;first=&#34;.&#40;$start+1&#41;; &#160; $curl_handle = curl_init&#40;&#41;; curl_setopt&#40;$curl_handle,CURLOPT_URL, $url&#41;; curl_setopt&#40;$curl_handle,CURLOPT_CONNECTTIMEOUT,2&#41;; curl_setopt&#40;$curl_handle, CURLOPT_RETURNTRANSFER, 1&#41;; $return = curl_exec&#40;$curl_handle&#41;; curl_close&#40;$curl_handle&#41;; &#160; $parts = split&#40;&#39;&#60;h3&#62;&#39;, $return&#41;; &#160; &#8230; <a href="http://www.juust.org/index.php/bing-serp/2009/08/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>for completeness : php bing serp scraping :</p>
<div class="geshi no php">
<ol>
<li class="li1">
<div class="de1"><span class="re1">$query</span> <span class="sy0">=</span> <span class="st0">&#39;serp&#39;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$page</span> <span class="sy0">=</span> <span class="nu0">1</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$start</span> <span class="sy0">=</span> <span class="br0">&#40;</span><span class="re1">$page</span><span class="nu0">-1</span><span class="br0">&#41;</span><span class="sy0">*</span><span class="nu0">10</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$url</span> <span class="sy0">=</span> <span class="st0">&#39;http://www.bing.com/search?q=&#39;</span><span class="sy0">.</span><span class="kw3">urlencode</span><span class="br0">&#40;</span><span class="re1">$query</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot;&amp;first=&quot;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="re1">$start</span><span class="nu0">+1</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$curl_handle</span> <span class="sy0">=</span> curl_init<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">curl_setopt<span class="br0">&#40;</span><span class="re1">$curl_handle</span><span class="sy0">,</span>CURLOPT_URL<span class="sy0">,</span> <span class="re1">$url</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">curl_setopt<span class="br0">&#40;</span><span class="re1">$curl_handle</span><span class="sy0">,</span>CURLOPT_CONNECTTIMEOUT<span class="sy0">,</span><span class="nu0">2</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">curl_setopt<span class="br0">&#40;</span><span class="re1">$curl_handle</span><span class="sy0">,</span> CURLOPT_RETURNTRANSFER<span class="sy0">,</span> <span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$return</span> <span class="sy0">=</span> curl_exec<span class="br0">&#40;</span><span class="re1">$curl_handle</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">curl_close<span class="br0">&#40;</span><span class="re1">$curl_handle</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="re1">$parts</span> <span class="sy0">=</span> <span class="kw3">split</span><span class="br0">&#40;</span><span class="st0">&#39;&lt;h3&gt;&#39;</span><span class="sy0">,</span> <span class="re1">$return</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span><span class="br0">&#40;</span><span class="re1">$j</span><span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span><span class="re1">$j</span><span class="sy0">&lt;</span>count <span class="br0">&#40;</span><span class="re1">$parts</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="re1">$j</span><span class="sy0">++</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="re1">$p</span><span class="sy0">=</span><span class="re1">$parts</span><span class="br0">&#91;</span><span class="re1">$j</span><span class="br0">&#93;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">preg_match</span><span class="br0">&#40;</span><span class="st0">&#39;#&lt;a<span class="es0">\s</span>+.*?href=[<span class="es0">\&#39;</span>&quot;]([^<span class="es0">\&#39;</span>&quot;]+)[<span class="es0">\&#39;</span>&quot;]<span class="es0">\s</span>*(?:title=[<span class="es0">\&#39;</span>&quot;]([^<span class="es0">\&#39;</span>&quot;]+)[<span class="es0">\&#39;</span>&quot;])?.*?&gt;((?:(?!).)*)#i&#39;</span><span class="sy0">,</span> <span class="re1">$p</span><span class="sy0">,</span> <span class="re1">$urls</span><span class="br0">&#41;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw3">echo</span> <span class="st0">&quot;position: &quot;</span><span class="sy0">.</span><span class="br0">&#40;</span><span class="re1">$start</span> <span class="sy0">+</span><span class="re1">$j</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot; url: &quot;</span><span class="sy0">.</span><span class="re1">$urls</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="sy0">.</span><span class="st0">&quot; title: &quot;</span><span class="sy0">.</span><span class="re1">$urls</span><span class="br0">&#91;</span><span class="nu0">3</span><span class="br0">&#93;</span><span class="sy0">.</span><span class="st0">&#39;&lt;br /&gt;&#39;</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="sy0">&lt;/</span>count<span class="sy0">&gt;&lt;/</span>h3<span class="sy0">&gt;</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/bing-serp/2009/08/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>serp tool</title>
		<link>http://www.juust.org/index.php/serp-tool/2008/11/</link>
		<comments>http://www.juust.org/index.php/serp-tool/2008/11/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 22:20:49 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[serp]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=208</guid>
		<description><![CDATA[I was putting together a serp tool with a database and an emailer on a cronjob, mainly because I am lazy, I always get cranky when I have to type in these keywords again, I ain&#8217;t a teletubby. I wanted &#8230; <a href="http://www.juust.org/index.php/serp-tool/2008/11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was putting together a <a href="http://www.juust.org/serp/index.php">serp tool</a> with a database and an emailer on a cronjob, mainly because I am <em>lazy</em>, I always get cranky when I have to type in these keywords again, I ain&#8217;t a teletubby. </p>
<p>I wanted an automated one with a history that sends me an email every day, so I started putting on together but I got distracted because the gethost server was shut down and my moms Mary Chapel event blog was on it. My old site was also on it, with my crappy blog, but losing that ain&#8217;t half as bad as losing yer moms Mary Chapel blog, that is bad karma. </p>
<p>So I got her a domain and put it on one of my accounts, installed a new blog and made sure it ranks number one in google again. Apart from that I was putting together a scraper and still needed some cron jobs for the scraper scripts. </p>
<p>I found a nice <a href="http://www.onlinecronjobs.com/" rel="nofollow">free cron job site</a>, standard 5 jobs a day. It&#8217;s free and it works flawless, no hassles. Very nice. </p>
<p>Once I had that I remembered I still had to finish that serp thing as well, so I finished the basic routines today. Still needs some testing, and it could use the yahoo and msn serps. I&#8217;ll grab them from a wordpress widget and add some language options, after that it should be a fine tool. </p>
<p>I&#8217;ll put the scripts up for download in two or three weeks or something.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/serp-tool/2008/11/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>serp tool 2008</title>
		<link>http://www.juust.org/index.php/serp-tool-2008/2008/09/</link>
		<comments>http://www.juust.org/index.php/serp-tool-2008/2008/09/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 23:55:09 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[serp]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=152</guid>
		<description><![CDATA[I never got around to building a serp tool with a mysql backend, one on a cronjob with an email option. This weekend I got an OSWD free template, then it at least looks like a website. I develop a &#8230; <a href="http://www.juust.org/index.php/serp-tool-2008/2008/09/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I never got around to building a serp tool with a mysql backend, one on a cronjob with an email option.<br />
This weekend I got an OSWD free template, then it at least looks like a website. I develop a lot easier when it has a template. Filling in the blanks.</p>
<p>Often if you program a rough sketch, in time it sort of develops itself. If you don&#8217;t start nothing gets done. </p>
<p>I am developing it on <a href="http://www.juust.org/serp/serp.single.php" rel="nofollow">juust.org/serp/</a>, once its finished i&#8217;ll put one on trismegistos.net and put the source up for download. </p>
<p>It&#8217;s flimsy but the idea of a serp minisite with emailer option is commercially attractive.</p>
<p>It&#8217;s also important for the blog to have a &#8216;serp&#8217; page in the menu, and a serp page should have serp tools, in abundance, all kinds of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/serp-tool-2008/2008/09/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress serp widget serpent</title>
		<link>http://www.juust.org/index.php/serpent-wordpress-widget/2008/07/</link>
		<comments>http://www.juust.org/index.php/serpent-wordpress-widget/2008/07/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 03:37:30 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[serp]]></category>
		<category><![CDATA[tool]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=62</guid>
		<description><![CDATA[28-7 the permutation serp creates too much of a load and the results are 90% general so not very usefull per page. replaced it with a straight top-50 serp on the msn, yahoo, google engines using post_tags added a link &#8230; <a href="http://www.juust.org/index.php/serpent-wordpress-widget/2008/07/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>28-7</strong><br />
the permutation serp creates too much of a load and the results are 90% general so not very usefull per page.</p>
<ul>
<li> replaced it with a straight top-50 serp on the msn, yahoo, google engines</li>
<li> using post_tags</li>
<li> added a link to the search engine result pages themselves</li>
<li> added a cache and a timer on 6000seconds, it requeries every 1.5 hours when a page is opened and in the meantime dishes out cached results, to minimize queries and page load times</li>
<li> added before_widget and after_widget</li>
</ul>
<p>it needs</p>
<ul>
<li>specific options per engine (language etc.)</li>
<li>a dig option up to 1000 result</li>
<li>css hooks</li>
<li>max three keywords constraint</li>
<li>page keywords list (currently only posts&#8217; tags are used)</li>
<li>a mysql backend (I don&#8217;t want the nonsense in the wordpress db)</li>
<li>a counter for used queries (otherwise you get &#8216;no result&#8217;)</li>
<li>an archive report to see how the serp results develop</li>
</ul>
<p>but it&#8217;s a start</p>
<hr />
<p>the results are accurate but i need a once a day routine to grab the keyword of the index page and other pages (the &#8216;keywords&#8217; section is often dynamic and changes every day, most sites use plugins to either grab all tags of listed posts and put them in the meta-section as page-keywords, or use headspace to override it with a fixed set.)</p>
<p>querying the wordpress database and for all non-post page use get_meta_tags, put url and tags in a cached list and serp the lot once a day would solve that.</p>
<p>something like that.</p>
<hr />
once I got that fixed i&#8217;ll ask some people to test it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/serpent-wordpress-widget/2008/07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>serp pagerank php seo tool</title>
		<link>http://www.juust.org/index.php/serp-pagerank-php-seo-tool/2008/07/</link>
		<comments>http://www.juust.org/index.php/serp-pagerank-php-seo-tool/2008/07/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 01:23:02 +0000</pubDate>
		<dc:creator>juust</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[serp]]></category>

		<guid isPermaLink="false">http://www.juust.org/?p=33</guid>
		<description><![CDATA[So how did I do with a few days search engine optimisation ? not bad at all, on php+serp nicely on second spot behind shoemoney.com and on serp+php also front page, and on the 5 keys overall 13th. not bad &#8230; <a href="http://www.juust.org/index.php/serp-pagerank-php-seo-tool/2008/07/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So how did I do with a few days search engine optimisation ? not bad at all, on php+serp nicely on second spot behind shoemoney.com and on serp+php also front page, and on the 5 keys overall 13th. not bad for a PR0 domain.</p>
<p>5-key serp : <strong>serp pagerank php seo tool</strong></p>
<table>
<tbody>
<tr>
<td>count</td>
<td>hits</td>
<td><b>domain</b></td>
</tr>
<tr>
<td>7.8</td>
<td>8</td>
<td><b>www.juust.org</b></td>
</tr>
<tr>
<td>16</td>
<td>serp pagerank</td>
<td>http://www.juust.org/</td>
<td>0.2</td>
</tr>
<tr>
<td>8</td>
<td>serp php</td>
<td>http://www.juust.org/</td>
<td>1</td>
</tr>
<tr>
<td>9</td>
<td>serp php</td>
<td>http://www.juust.org/index.php/php-serp-scripts/2008/07/</td>
<td>1</td>
</tr>
<tr>
<td>99</td>
<td>serp tool</td>
<td>http://www.juust.org/</td>
<td>0.2</td>
</tr>
<tr>
<td>42</td>
<td>pagerank serp</td>
<td>http://www.juust.org/</td>
<td>0.2</td>
</tr>
<tr>
<td>3</td>
<td>php serp</td>
<td>http://www.juust.org/</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>php serp</td>
<td>http://www.juust.org/index.php/php-serp-scripts/2008/07/</td>
<td>2</td>
</tr>
<tr>
<td>70</td>
<td>seo serp</td>
<td>http://www.juust.org/</td>
<td>0.2</td>
</tr>
</tbody>
</table>
<p>and who are the competition :</p>
<table>
<tbody>
<tr>
<td>points</td>
<td>results</td>
<td>domain</td>
</tr>
<tr>
<td>20.2</td>
<td>13</td>
<td>www.seochat.com</td>
</tr>
<tr>
<td>16.6</td>
<td>21</td>
<td>www.seocompany.ca</td>
</tr>
<tr>
<td>15.6</td>
<td>13</td>
<td>sitening.com</td>
</tr>
<tr>
<td>14.6</td>
<td>10</td>
<td>www.webconfs.com</td>
</tr>
<tr>
<td>13.4</td>
<td>21</td>
<td>forums.digitalpoint.com</td>
</tr>
<tr>
<td>11.4</td>
<td>11</td>
<td>www.prchecker.info</td>
</tr>
<tr>
<td>11</td>
<td>4</td>
<td>en.wikipedia.org</td>
</tr>
<tr>
<td>10</td>
<td>19</td>
<td>www.webmasterworld.com</td>
</tr>
<tr>
<td>9</td>
<td>4</td>
<td>www.cristiandarie.ro</td>
</tr>
<tr>
<td>8.8</td>
<td>8</td>
<td>www.seroundtable.com</td>
</tr>
<tr>
<td>8.4</td>
<td>5</td>
<td>www.shoemoney.com</td>
</tr>
<tr>
<td>8.4</td>
<td>5</td>
<td>www.google.com</td>
</tr>
<tr>
<td>7.8</td>
<td>8</td>
<td>www.juust.org</td>
</tr>
<tr>
<td>7.6</td>
<td>6</td>
<td>tools.seobook.com</td>
</tr>
<tr>
<td>7.2</td>
<td>9</td>
<td>www.jumptags.com</td>
</tr>
<tr>
<td>7.2</td>
<td>14</td>
<td>www.seomoz.org</td>
</tr>
<tr>
<td>7</td>
<td>7</td>
<td>www.seoserp.com</td>
</tr>
<tr>
<td>6.4</td>
<td>14</td>
<td>forums.seochat.com</td>
</tr>
<tr>
<td>6.4</td>
<td>10</td>
<td>link.ezer.com</td>
</tr>
<tr>
<td>6.4</td>
<td>4</td>
<td>www.ljfind.com</td>
</tr>
<tr>
<td>5.8</td>
<td>7</td>
<td>www.iwebtool.com</td>
</tr>
</tbody>
</table>
<p>Now, for the seo+tool niche&#8230; an online trackback spider&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.juust.org/index.php/serp-pagerank-php-seo-tool/2008/07/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

