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

<channel>
	<title>Ruben Sargsyan &#187; links</title>
	<atom:link href="http://rubensargsyan.com/tag/links/feed/" rel="self" type="application/rss+xml" />
	<link>http://rubensargsyan.com</link>
	<description>Personal Website</description>
	<lastBuildDate>Thu, 03 May 2012 21:02:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Retrieve links and sort them by follow or nofollow</title>
		<link>http://rubensargsyan.com/retrieve-links-and-sort-them-by-follow-or-nofollow/</link>
		<comments>http://rubensargsyan.com/retrieve-links-and-sort-them-by-follow-or-nofollow/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 11:50:14 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[follow links]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[nofollow links]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=475</guid>
		<description><![CDATA[This PHP example is used to retrieve all links from a file content or a url content, then sort by the follow links or nofollow links and show them: &#60;?php $file = &#34;http://example.com&#34;; &#160; $content = file_get_contents&#40;$file&#41;; $links = array&#40;&#34;follow&#34;=&#62;array&#40;&#41;,&#34;nofollow&#34;=&#62;array&#40;&#41;&#41;; &#160; preg_match_all&#40;&#34;/(&#60;a.*&#62;)(.*)(&#60;\/a&#62;)/ismU&#34;,$content,$matches,PREG_SET_ORDER&#41;; &#160; if&#40;empty&#40;$matches&#41;&#41;&#123; echo&#40;&#34;There is no link in the file &#34;.$file.&#34;.&#34;&#41;; &#125;else&#123; foreach&#40;$matches as [...]]]></description>
			<content:encoded><![CDATA[<p>This PHP example is used to retrieve all links from a file content or a url content, then sort by the follow links or nofollow links and show them<span id="more-475"></span>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;http://example.com&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$links</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;follow&quot;</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;nofollow&quot;</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">preg_match_all</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/(&lt;a.*&gt;)(.*)(&lt;\/a&gt;)/ismU&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #339933;">,</span><span style="color: #000088;">$matches</span><span style="color: #339933;">,</span>PREG_SET_ORDER<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There is no link in the file &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$file</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$matches</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$match</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/href\s*=\s*[\'|<span style="color: #000099; font-weight: bold;">\&quot;</span>]\s*([^<span style="color: #000099; font-weight: bold;">\&quot;</span>|\']*)\s*[\'|<span style="color: #000099; font-weight: bold;">\&quot;</span>]/i&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #000088;">$href</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/rel\s*=\s*[\'|<span style="color: #000099; font-weight: bold;">\&quot;</span>]\s*nofollow\s*[\'|<span style="color: #000099; font-weight: bold;">\&quot;</span>]/i&quot;</span><span style="color: #339933;">,</span><span style="color: #000088;">$match</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;nofollow&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$href</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;follow&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$href</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;h1&gt;Nofollow links&lt;/h1&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;nofollow&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;There is no nofollow link.&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;ol type='1'&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;nofollow&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;li&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/ol&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;h1&gt;Follow links&lt;/h1&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;follow&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;There is no follow link.&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;ol type='1'&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;follow&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;li&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/li&gt;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        <span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/ol&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$output</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/retrieve-links-and-sort-them-by-follow-or-nofollow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Last Visited Pages</title>
		<link>http://rubensargsyan.com/the-last-visited-pages/</link>
		<comments>http://rubensargsyan.com/the-last-visited-pages/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 08:28:57 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[the last visited pages]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=239</guid>
		<description><![CDATA[Setting this script on your website will give your visitors the great opportunity to see their last visited pages of your website. The visited pages links are created by using DOM and JavaScript. Script is working by the Cookies (the visited pages are kept for example about a month &#8211; the period is decided by [...]]]></description>
			<content:encoded><![CDATA[<p>Setting this script on your website will give your visitors the great opportunity to see their last visited pages of your website. The visited pages links are created by using DOM and JavaScript. Script is working by the Cookies (the visited pages are kept for example about a month &#8211; the period is decided by you). The quantity of the shown links are set by you. So, this is a very effective and comfortable script, that will be very pleasant for the visitors of your website.<span id="more-239"></span></p>
<h2>How To Use:</h2>
<p>1. Copy the <a href="http://rubensargsyan.com/downloads/the_last_visited_pages/the_last_visited_pages.js">the_last_visited_pages.js</a> and <a href="http://rubensargsyan.com/downloads/the_last_visited_pages/the_last_visited_pages.css">the_last_visited_pages.css</a> into your website directory.</p>
<p>2. Write in the &lt;head&gt;&lt;/head&gt;<br />
<span style="color: #993300;">&lt;link rel=&#8221;stylesheet&#8221; href=&#8221;the_last_visited_pages.css&#8221; type=&#8221;text/css&#8221; /&gt;<br />
&lt;script src=&#8221;the_last_visited_pages.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;</span></p>
<p>3. Set <span style="color: #993300;">&lt;div id=&#8221;the_last_visited_pages&#8221;&gt;&lt;/div&gt;</span> where you want to show the last visited pages of the visitor.</p>
<p>4. Add <span style="color: #993300;">&lt;script type=&#8221;text/javascript&#8221;&gt;start_the_last_visited_pages();&lt;/script&gt;</span> just after &lt;/body&gt;</p>
<h2>How To Customize:</h2>
<p>You can use CSS to style it. Edit the code in the_last_visited_pages.css</p>
<h2>Version:</h2>
<p>1.0</p>
<h2>License:</h2>
<p><a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by/3.0/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" property="dc:title">The Last Visited Pages</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://rubensargsyan.com/" property="cc:attributionName" rel="cc:attributionURL">Ruben Sargsyan</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://rubensargsyan.com/the-last-visited-pages/" rel="dc:source">rubensargsyan.com</a>.</p>
<h2>Donate:</h2>
<p>If you find this plugin useful to you, please consider making a small donation to help contribute to further development. Thanks for your kind support!<br />
<a href="http://rubensargsyan.com/donate/"><img src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" alt="Donate" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/the-last-visited-pages/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable all links by javascript</title>
		<link>http://rubensargsyan.com/disable-all-links-by-javascript/</link>
		<comments>http://rubensargsyan.com/disable-all-links-by-javascript/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 16:45:25 +0000</pubDate>
		<dc:creator>Ruben Sargsyan</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://rubensargsyan.com/?p=232</guid>
		<description><![CDATA[To disable all links of a web page add the script bellow just after &#60;/body&#62; &#60;script type=&#34;text/javascript&#34;&#62; var all_links = document.getElementsByTagName&#40;&#34;a&#34;&#41;; &#160; for&#40;var i=0; i&#60;all_links.length; i++&#41;&#123; all_links&#91;i&#93;.removeAttribute&#40;&#34;href&#34;&#41;; &#125; &#60;/script&#62;]]></description>
			<content:encoded><![CDATA[<p>To disable all links of a web page add the script bellow just after &lt;/body&gt;<span id="more-232"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
    <span style="color: #003366; font-weight: bold;">var</span> all_links <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">&lt;</span>all_links.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        all_links<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">removeAttribute</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://rubensargsyan.com/disable-all-links-by-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

