<?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>Anthony Shapley&#187; Internet Archives  &#8211; Anthony Shapley</title>
	<atom:link href="http://www.anthonyshapley.co.uk/category/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anthonyshapley.co.uk</link>
	<description>Search Engine Optimisation &#38; Pay Per Click</description>
	<lastBuildDate>Wed, 10 Mar 2010 06:49:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixing image paths in Wordpress after moving hosts</title>
		<link>http://www.anthonyshapley.co.uk/fixing-image-paths-in-wordpress-after-moving-hosts/</link>
		<comments>http://www.anthonyshapley.co.uk/fixing-image-paths-in-wordpress-after-moving-hosts/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 08:46:54 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=1698</guid>
		<description><![CDATA[Just a quick post to let people know that moving hosts had screwed up all the image paths in my Photography section, a simple MySQL Query fixed the problem. Incase anyone else has this problem I used the following Query:
UPDATE `wp_postmeta` SET  ]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to let people know that moving hosts had screwed up all the image paths in my Photography section, a simple MySQL Query fixed the problem. Incase anyone else has this problem I used the following Query:<span id="more-1698"></span></p>
<p>UPDATE `wp_postmeta` SET meta_value = replace(meta_value,&#8221;/mounted-storage/home58b/sub007/sc37059-NMKM/anthonyshapley.co.uk/&#8221;,&#8221;") WHERE `meta_key` = &#8216;_wp_attached_file&#8217;</p>
<p>It merely finds and replaces text where files have been attached. Run it through phpMyAdmin or whatever you use for a quick fix. Obvisously change the path to reflect your website!</p>
<p>Cheers and special thanks to Alex Morrision for bringing this to my attention.</p>
<p>If your interested in wordpress and SEO check out this <a href="http://www.youtube.com/watch?v=5dkLgaGykVU">UK SEO</a> video.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/fixing-image-paths-in-wordpress-after-moving-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meta Tags Guide</title>
		<link>http://www.anthonyshapley.co.uk/meta/</link>
		<comments>http://www.anthonyshapley.co.uk/meta/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 07:00:59 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[xHTML]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=1509</guid>
		<description><![CDATA[I&#8217;ve started writing a meta tags guide for those DIY SEO&#8217;s.
All the important ones are already included, I will slowly continue and complete the document though.
Cheers,
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started writing a <a href="http://www.anthonyshapley.co.uk/tools/meta-tags/">meta tags guide</a> for those DIY SEO&#8217;s.</p>
<p>All the important ones are already included, I will slowly continue and complete the document though.</p>
<p>Cheers,</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/meta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Wordpress Plugin: RSS Aggregator</title>
		<link>http://www.anthonyshapley.co.uk/first-wordpress-plugin-rss-aggregator/</link>
		<comments>http://www.anthonyshapley.co.uk/first-wordpress-plugin-rss-aggregator/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 19:35:38 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=1481</guid>
		<description><![CDATA[This last week I&#8217;ve been coding my first Wordpress plugin, hence the lack of posts.
I&#8217;ve really enjoyed writing for wordpress so expect to see some more. I&#8217;d highly recommend learning some of it, I would also recommend
You can download the Wordpress RSS  ]]></description>
			<content:encoded><![CDATA[<p>This last week I&#8217;ve been coding my first Wordpress plugin, hence the lack of posts.</p>
<p>I&#8217;ve really enjoyed writing for wordpress so expect to see some more. I&#8217;d highly recommend learning some of it, I would also recommend</p>
<p>You can download the <a href="http://www.anthonyshapley.co.uk/tools/wordpress-rss-aggregator/">Wordpress RSS Aggregator</a> here.</p>
<p>Please feedback if you like/dislike my plugin so I can make further improvements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/first-wordpress-plugin-rss-aggregator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add Twitter to your Blog</title>
		<link>http://www.anthonyshapley.co.uk/how-to-add-twitter-to-your-blog/</link>
		<comments>http://www.anthonyshapley.co.uk/how-to-add-twitter-to-your-blog/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 22:23:48 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=1452</guid>
		<description><![CDATA[Joost has written an awesome little guide on how to display your last Tweet using the Twitter API.
I&#8217;ve added it to my sidebar, check it out. Its ideal for personal blogs since writing a post isn&#8217;t always practical or neccersary.
Incase your wondering what  ]]></description>
			<content:encoded><![CDATA[<p>Joost has written an awesome little guide on <a rel="nofollow" href="http://yoast.com/display-latest-tweet/" target="_blank">how to display your last Tweet</a> using the Twitter API.</p>
<p>I&#8217;ve added it to my sidebar, check it out. Its ideal for personal blogs since writing a post isn&#8217;t always practical or neccersary.</p>
<p>Incase your wondering what Twitter is, its a social networking site that allows its users to send updates to followers using no more than 140 characters (much like a text message). You can sign up at <a rel="nofollow" href="http://www.twitter.com" target="_blank">www.twitter.com</a>.</p>
<p>Cheers,</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/how-to-add-twitter-to-your-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>8 Ways to get your website right..</title>
		<link>http://www.anthonyshapley.co.uk/8-ways-to-get-your-website-right/</link>
		<comments>http://www.anthonyshapley.co.uk/8-ways-to-get-your-website-right/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 17:09:55 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=780</guid>
		<description><![CDATA[Here are some easy but basic tips to improve conversions and just get any site functioning nicely..

Ensure that its fast loading. We all have fast paced lives, none of us are willing to wait long or you&#8217;ll lose our attention.
Target your Market,  ]]></description>
			<content:encoded><![CDATA[<p>Here are some easy but basic tips to improve conversions and just get any site functioning nicely..</p>
<ol>
<li>Ensure that its fast loading. We all have fast paced lives, none of us are willing to wait long or you&#8217;ll lose our attention.</li>
<li>Target your Market, this needs to be reflected in your advertising, your copy, your imagery, layout, everything.</li>
<li>Focus your website, make your e-book, Product or Service the focus of the whole site, otherwise its diluted and confusing.</li>
<li>Credibility, you&#8217;ve got to convince me your trust worthy, if your not I&#8217;ll look elsewhere.</li>
<li>Ease of Navigation is also crucial, if I can find exactly what I&#8217;m looking for, I will lose interest and go on to something else.</li>
<li>Give your website consistency, without this the novice user will wonder if they&#8217;re still on the same website.</li>
<li>Give interaction, we need lots of ways to get in touch. Everyone is different so the more options you give us the better. However do it in a structured way so its easy to find.</li>
<li>Does your Content sell your product? If not then how am I going to know its what I&#8217;m looking for</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/8-ways-to-get-your-website-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome</title>
		<link>http://www.anthonyshapley.co.uk/google-chrome/</link>
		<comments>http://www.anthonyshapley.co.uk/google-chrome/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 07:05:40 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=564</guid>
		<description><![CDATA[Just downloaded Google&#8217;s new Browser which is currently in beta. It seems pretty polished for a Beta, its easy on memory, faster than FireFox.
Plug-ins are also great, you can install them without even having to reload the browser, that is the kind  ]]></description>
			<content:encoded><![CDATA[<p>Just downloaded Google&#8217;s new Browser which is currently in beta. It seems pretty polished for a Beta, its easy on memory, faster than FireFox.</p>
<p>Plug-ins are also great, you can install them <strong>without </strong>even having to reload the browser, that is the kind of thing that usually gets right on my nerves.</p>
<p>It doesn&#8217;t have countless toolbars, meaning most of the screen is for your web page which is again an awesome. I suspect this will rip through the Mozzila FireFox userbase.</p>
<p>You can download it here: <a href="http://www.google.com/chrome" target="_blank">http://www.google.com/chrome</a></p>
<p>The only unfortunate thing is availability only for Windows XP &amp; Vista at the momment, No Mac!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/google-chrome/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HTTP Referral Spoofing with PHP and cURL</title>
		<link>http://www.anthonyshapley.co.uk/http-referral-spoofing-with-php-and-curl/</link>
		<comments>http://www.anthonyshapley.co.uk/http-referral-spoofing-with-php-and-curl/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 16:41:18 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=545</guid>
		<description><![CDATA[Well I&#8217;m feeling much better, so the other day I was reading a thread on Digital Point, this guy was charging a sh*t load to basically send a shit load of spoofed visitors with a fake Referral header. Therefore I&#8217;ve written a  ]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;m feeling much better, so the other day I was reading a thread on Digital Point, this guy was charging a sh*t load to basically send a shit load of spoofed visitors with a fake Referral header. Therefore I&#8217;ve written a very basic one which you could in theory leave running all night. Unlike this other site I will just release the source code and hopefully cause havok.</p>
<p>All you need is a computer running and a list of proxies in the file &#8220;good-list.txt&#8221;. Put it in a directory (I would keep it private). The source code is as follows:</p>
<p>The code:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#8220;&gt;<br />
&lt;html xmlns=&#8221;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&#8221; lang=&#8221;en&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;HTTP Referrer Spoofing&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;HTTP Referrer Spoofing&lt;/h1&gt;<br />
&lt;p&gt;This will spoof referals in the logs meaning your website will show up as a referrer in the target website statistics.<br />
   It does by using random proxies from a supplied list, to ensure each request is unique.<br />
&lt;/p&gt;&lt;p&gt;<br />
   To allow for large requests (in the thousands) I&#8217;ve added the &#8220;Amount before refresh&#8221; option, this will meta refresh the page ensuring<br />
   the tool does not timeout.&lt;/p&gt;<br />
 <br />
&lt;/p&gt;<br />
&lt;form method=&#8221;post&#8221; action=&#8221;index.php&#8221;&gt;<br />
 &lt;fieldset&gt;<br />
  &lt;label&gt;Website to appear as referrer:&lt;/label&gt;<br />
   &lt;input type=&#8221;text&#8221; name=&#8221;yoursite&#8221; value=&#8221;&lt;? echo $_REQUEST['yoursite']; ?&gt;&#8221;/&gt;<br />
  &lt;label&gt;Target Website:&lt;/label&gt;<br />
   &lt;input type=&#8221;text&#8221; name=&#8221;target&#8221; value=&#8221;&lt;? echo $_REQUEST['target']; ?&gt;&#8221;/&gt;<br />
  &lt;label&gt;Times to Refer&lt;/label&gt;<br />
   &lt;input type=&#8221;text&#8221; name=&#8221;amount&#8221; value=&#8221;&lt;? echo $_REQUEST['amount']; ?&gt;&#8221;/&gt;<br />
  &lt;label&gt;Amount before refresh&lt;/label&gt;<br />
   &lt;?php<br />
   if(empty($_REQUEST['refresh']))<br />
   {<br />
    $refresh = 10;<br />
   }<br />
   ?&gt;<br />
   &lt;input type=&#8221;text&#8221; name=&#8221;refresh&#8221; value=&#8221;&lt;? echo $refresh; ?&gt;&#8221;/&gt;<br />
 &lt;/fieldset&gt;<br />
 &lt;input type=&#8221;Submit&#8221; name=&#8221;Submit&#8221; value=&#8221;Submit&#8221;/&gt;<br />
&lt;/form&gt;</p>
<p> &lt;?php<br />
 /*<br />
 <br />
  Random Proxy Selector<br />
 <br />
 */<br />
  function pc_randomint($max = 1)<br />
  { <br />
   $m = 1000000;<br />
  <br />
  return ((mt_rand(1,$m * $max)-1)/$m);<br />
  }<br />
  function random_proxy()<br />
  {<br />
   $line_number = 0;</p>
<p>   $fh = fopen(&#8216;good-list.txt&#8217;,'r&#8217;) or die($php_errormsg);<br />
   while (! feof($fh))<br />
   {<br />
    if ($s = fgets($fh,1048576))<br />
    {<br />
     $line_number++;<br />
     if (pc_randomint($line_number) &lt; 1)<br />
     {<br />
        <br />
      $line = $s;<br />
     <br />
     }<br />
    }  <br />
   }<br />
 <br />
   fclose($fh) or die($php_errormsg);<br />
  <br />
   return $line;<br />
  <br />
  }<br />
  <br />
  /*<br />
  <br />
   The fake referral.<br />
  <br />
  */<br />
  function do_fake_referer($yoursite,$target,$amount,$refresh,$done)<br />
  {<br />
   // The site to appear in the stats is $yoursite<br />
   // The target site is $target<br />
   // Amount is the total times the referral should be carried out<br />
   // How often to refresh<br />
   // How many have been done<br />
   echo &#8220;&lt;ol&gt;&#8221;;<br />
   $counter_refresh = 0;<br />
   while($refresh &gt; $counter_refresh)<br />
   {<br />
    $counter_refresh++;<br />
    $random_proxy = random_proxy();<br />
    <br />
    // create a new cURL resource<br />
    $ch = curl_init();</p>
<p>    // set URL and other appropriate options<br />
    curl_setopt($ch, CURLOPT_URL, $target);<br />
    curl_setopt($ch, CURLOPT_AUTOREFERER, false);<br />
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,7);<br />
    curl_setopt($ch, CURLOPT_REFERER, $yoursite);<br />
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);<br />
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);<br />
    curl_setopt($ch, CURLOPT_PROXY, $random_proxy);<br />
    <br />
    $data = curl_exec($ch);</p>
<p>    curl_close($ch);<br />
    <br />
    if(empty($data))<br />
    {</p>
<p>     print &#8220;&lt;li&gt;Error, didn&#8217;t work this time. Using proxy &#8220;.$random_proxy.&#8221;.&lt;/li&gt;&#8221;;<br />
    <br />
     flush();</p></blockquote>
<blockquote><p>     <br />
    } else {<br />
     $done++;<br />
     print &#8220;&lt;li&gt;Referred &#8220;.$done.&#8221; times. Using &#8220;.$random_proxy.&#8221;.&lt;/li&gt;&#8221;;<br />
     flush();<br />
    }<br />
   }<br />
   echo &#8220;&lt;/ol&gt;&#8221;;<br />
   if($amount &gt; $done)<br />
   {<br />
   echo &#8220;&lt;meta http-equiv=\&#8221;refresh\&#8221; content=\&#8221;5;url=index.php?yoursite=&#8221;.$yoursite.&#8221;&amp;target=&#8221;.$target.&#8221;&amp;amount=&#8221;.$amount.&#8221;&amp;refresh=&#8221;.$refresh.&#8221;&amp;done=&#8221;.$done.&#8221;&amp;Submit=Submit\&#8221;/&gt;&#8221;;<br />
   echo &#8220;&lt;p&gt;Refreshing in 5 Seconds&lt;/p&gt;&#8221;; <br />
   }<br />
   else<br />
   {<br />
   echo &#8220;&lt;p&gt;Completed &#8220;.$done.&#8221; spoofs made.&#8221;;<br />
   }<br />
  }<br />
  if($_REQUEST['Submit'])<br />
  {<br />
   if($amount &gt; $done)<br />
   {<br />
    do_fake_referer($_REQUEST['yoursite'],$_REQUEST['target'],$_REQUEST['amount'],$_REQUEST['refresh'],$_REQUEST['done']);<br />
   }<br />
  }<br />
?&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Hope this helps, no complaining please.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/http-referral-spoofing-with-php-and-curl/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>123-Reg .info domains for £0.99</title>
		<link>http://www.anthonyshapley.co.uk/123-reg-info-domains-for-099/</link>
		<comments>http://www.anthonyshapley.co.uk/123-reg-info-domains-for-099/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 08:20:12 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Domains]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=498</guid>
		<description><![CDATA[That&#8217;s right &#8211; 123-reg.co.uk is doing .info domain names for under £1.00. Which is pretty awesome if you only want the domain names for a year.
My advice is to be very careful though because I got caught out with something similar last  ]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right &#8211; 123-reg.co.uk is doing .info domain names for under £1.00. Which is pretty awesome if you only want the domain names for a year.</p>
<p>My advice is to be very careful though because I got caught out with something similar last year buying them on GoDaddy. I bought a lot of domains they then whacked me with a enormous auto renewal the following year.</p>
<p>I know from experience that the 123-reg.co.uk auto renewal is easy to cancel, but it can get very expensive if you forget.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/123-reg-info-domains-for-099/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading an XML Sitemap using PHP</title>
		<link>http://www.anthonyshapley.co.uk/reading-an-xml-sitemap-using-php/</link>
		<comments>http://www.anthonyshapley.co.uk/reading-an-xml-sitemap-using-php/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 14:38:18 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=491</guid>
		<description><![CDATA[In this short tutorial I will cover reading a Google/XML Sitemap and grabbing hold of each URL to use as you wish. This is amazingly easy to do:
Firstly we need to pass in the Sitemap URL. In the example we&#8217;re going to  ]]></description>
			<content:encoded><![CDATA[<p>In this short tutorial I will cover reading a Google/XML Sitemap and grabbing hold of each URL to use as you wish. This is amazingly easy to do:</p>
<p>Firstly we need to pass in the Sitemap URL. In the example we&#8217;re going to use GET since this is the most useful in my opinion.</p>
<p>&lt;?php</p>
<p>$sitemap = $_GET['sitemap'];</p>
<p>// Some simple validation<br />
if (!$myxml=simplexml_load_file($sitemap)){<br />
    echo &#8216;Unable to Access the Sitemap&#8217;;<br />
}<br />
// Loop through XML<br />
foreach($myxml as $url)<br />
{<br />
       $webpage_url = $url-&gt;loc;<br />
       // <strong>Do your thing here, store it in a database, run it against a function etc.<br />
</strong>}<br />
?&gt;</p>
<p>This is ideal for reading a sitemap or RSS feed. Give it a try <img src='http://www.anthonyshapley.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/reading-an-xml-sitemap-using-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Validating a website in PHP</title>
		<link>http://www.anthonyshapley.co.uk/validating-a-website-in-php/</link>
		<comments>http://www.anthonyshapley.co.uk/validating-a-website-in-php/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 08:09:02 +0000</pubDate>
		<dc:creator>Anthony</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.anthonyshapley.co.uk/?p=485</guid>
		<description><![CDATA[I found this pretty hard to begin with I was uncertain of how to check whether a website was online without writing a complicated string of Regular Express and even then this didn&#8217;t check if the site was active at that point  ]]></description>
			<content:encoded><![CDATA[<p>I found this pretty hard to begin with I was uncertain of how to check whether a website was online without writing a complicated string of Regular Express and even then this didn&#8217;t check if the site was active at that point in time. The solution was supprisingly simple:</p>
<p>We can use the PHP Function &#8220;fsockopen&#8221; to check that a the port is open on the appropriate hostname (website address).</p>
<p>$urlExists = @fsockopen($siteurl,80);</p>
<p>if($urlExists) {</p>
<p>// do something</p>
<p>} else {</p>
<p>// show an error</p>
<p>}</p>
<p>Simply pass in the Site URL Variable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anthonyshapley.co.uk/validating-a-website-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
