<?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>Lair360 Blog &#187; PHP &amp; HTML Script</title>
	<atom:link href="http://lair360.co.uk/blog/category/php-html-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://lair360.co.uk/blog</link>
	<description></description>
	<lastBuildDate>Sun, 25 Jul 2010 14:35:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Repel those mosquito robots and spammers!</title>
		<link>http://lair360.co.uk/blog/814/repel-those-mosquito-robots-and-spammers/</link>
		<comments>http://lair360.co.uk/blog/814/repel-those-mosquito-robots-and-spammers/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 23:03:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=814</guid>
		<description><![CDATA[Version: 13.1 Revision: 13 Build 16 Repel those mosquito robots and spammers! Introduction: last night, I was totally ‘brain-dead’ and I am not in a mood, just to write another article. So, to keep my readers and guest happy, I have to keep going and push my knowledge to the edge! Here is another article [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 13.1<br />
Revision: 13 Build 16<br />
<br />
Repel those mosquito robots and spammers!<br />
<br />
Introduction:</strong> last night, I was totally ‘brain-dead’ and I am not in a mood, just to write another article. So, to keep my readers and guest happy, I have to keep going and push my knowledge to the edge!<br />
<br />
Here is another article for you to filter / block more SPAM, Robots and Comment Junkies (spammers that post the same sentence and acts like robots). However, this code will only work, if you are using “PHP scripting engine” or WordPress.<br />
<br />
<strong>Notes:</strong> if you want to use this source, just to reduce SPAM and other Robots, I would recommend you to make a backup of your ‘Theme’ folder and your SQL database. After that, you can continue with the tutorial.<br />
<br />
1.] Login to your Cpanel and direct yourself to your ‘Theme’ folder.<br />
<br />
2.] Look for this file: ‘function.php’ and add this code into the file.</p>
<pre class="brush: php;">
function check_referrer() {
    if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == &quot;&quot;) {
        wp_die( __('Get away from my blog and stop spamming!') );
    }
}
add_action('check_comment_flood', 'check_referrer');
</pre>
<p>3.] Save your changes and let those crazy spammers deal with their own problem!<br />
<br />
4.] You’re done!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/814/repel-those-mosquito-robots-and-spammers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress &#8211; Change that horrible login screen!</title>
		<link>http://lair360.co.uk/blog/757/wordpress-change-that-horrible-login-screen/</link>
		<comments>http://lair360.co.uk/blog/757/wordpress-change-that-horrible-login-screen/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 22:13:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[login screen image]]></category>
		<category><![CDATA[wp-login modification]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=757</guid>
		<description><![CDATA[Version: 17.2 Revision: 13 Build 11 WordPress &#8211; Change that horrible login screen! WordPress Version: 2.8+ Introduction: On the 17th of November, I had a short reply from my readers. They told me that my previous &#8220;WordPress Login Screen&#8221; tutorials, they are old and outdated. This is because, everyone is now using &#8220;WordPress 2.8+&#8221; for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 17.2<br />
Revision: 13 Build 11<br />
<br />
WordPress &#8211; Change that horrible login screen!<br />
<br />
WordPress Version: 2.8+<br />
<br />
<img src="http://lair360.co.uk/blog/wp-content/uploads/2009/11/Wp-Login-Ex.png" alt="Wp-Login-Ex" title="Wp-Login-Ex" width="200" height="192" class="alignleft size-full wp-image-758" />Introduction:</strong> On the 17th of November, I had a short reply from my readers. They told me that my previous &#8220;WordPress Login Screen&#8221; tutorials, they are old and outdated. This is because, everyone is now using &#8220;WordPress 2.8+&#8221; for their project. So, for those who are using the old version, please click on this link and change your login screen.<br />
<br />
<a href="http://lair360.co.uk/blog/537/">http://lair360.co.uk/blog/537/</a><br />
<br />
For the other readers and publishers who are using the latest version, please read this article. But, don’t forget to create a backup of your SQL database!<br />
<br />
Have fun and be careful with the modification!<br />
<br />
<strong>Warning:</strong> If you’re unsure about this modification, then please stop reading. This article is only provided for advance users. So, if you want to try this out, please create a dummy area and install WordPress under your new directory.<br />
<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1.] Log-in to your Cpanel and click on your FTP server. But, do not download each file and modify them outside the server! It is very unstable and dangerous when you upload your modified version.<br />
<br />
2.] Look for these files and directories.<br />
<br />
…/wp-login.php<br />
…/wp-admin/css/login.css<br />
…/wp-admin/images/<br />
<br />
<strong>Notes:</strong> if you want to change your image, you will need to keep the formats as PNG or GIF and the size must not exceed 400 pixels in width and height.<br />
<br />
3.] Search for your &#8220;wp-login.php&#8221; file and look for these codes.<br />
It’s located at line 73 – 75.<br />
<br />
<strong>Notes:</strong> you will need to replace this phrase: &#8220;Powered by WordPress&#8221; and its default Url: &#8220;http://wordpress.org/&#8221;.</p>
<pre class="brush: php;">
&lt;div id=&quot;login&quot;&gt;&lt;h1&gt;&lt;a href=&quot;&lt;?php echo apply_filters('login_headerurl', 'http://wordpress.org/'); ?&gt;&quot; title=&quot;&lt;?php echo apply_filters('login_headertitle', __('Powered by WordPress')); ?&gt;&quot;&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;
</pre>
<p>4.] Save your changes and look for this file: &#8220;login.css&#8221;.<br />
<br />
…/wp-admin/css/login.css</p>
<pre class="brush: css;">
h1 a {
	background: url(../images/logo-login.gif) no-repeat top center;
	width: 326px;
	height: 67px;
	text-indent: -9999px;
	overflow: hidden;
	padding-bottom: 15px;
	display: block;
}
</pre>
<p>5.] Modify the image’s location and save your changes.<br />
<br />
6.] You are done!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/757/wordpress-change-that-horrible-login-screen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Say NO to SPAM!</title>
		<link>http://lair360.co.uk/blog/753/say-no-to-spam/</link>
		<comments>http://lair360.co.uk/blog/753/say-no-to-spam/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 22:03:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[php ip ban]]></category>
		<category><![CDATA[portable]]></category>
		<category><![CDATA[small]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=753</guid>
		<description><![CDATA[Version: 1.1a Revision: 34 Say NO to SPAM! Introduction: for the passed two days, I was revising my IP – ban &#8211; script. So that it doesn’t comprise your server load and time, especially, when there is high traffic. Nevertheless, this script was created from my previous article. But, I decided to modified it and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 1.1a<br />
Revision: 34<br />
<br />
Say NO to SPAM!<br />
<br />
<img src="http://lair360.co.uk/blog/wp-content/uploads/2009/11/SPAM-BLOCK.jpg" alt="Print" title="Print" width="195" height="194" class="alignleft size-full wp-image-754" />Introduction:</strong> for the passed two days, I was revising my IP – ban &#8211; script. So that it doesn’t comprise your server load and time, especially, when there is high traffic. Nevertheless, this script was created from my previous article. But, I decided to modified it and make it smaller for everyone to use and share.<br />
<br />
On the other hand, this script is everywhere on the search engine. But, please understand, that I had spent a great amount of time, just to refurbish these scripts.<br />
<br />
1.] Login to your Cpanel and click on your FTP server. After that, you’ll need to select one of these scripts and add them into your header tags. But, don’t forget to create a data file or a text file for blocking your offending spammers or hackers.</p>
<pre class="brush: php;">
&lt;?php
$ip = $_SERVER['REMOTE_ADDR'];
$ipArray = preg_replace(&quot;#\r\n?|\n#&quot;,&quot;&quot;,file('IP.dat',FILE_IGNORE_NEW_LINES));
foreach ($ipArray as $ipTest) {
  if (substr_count($ip, $ipTest) != &quot;0&quot;) {
    header('location: http://google.com');  // the banned display page
    die();
  }
} ?&gt;
</pre>
<pre class="brush: php;">
&lt;?php
$ip = $_SERVER['REMOTE_ADDR'];
$ipArray = preg_replace(&quot;#\r\n?|\n#&quot;,&quot;&quot;,file('IP.txt',FILE_IGNORE_NEW_LINES));
foreach ($ipArray as $ipTest) {
  if (substr_count($ip, $ipTest) != &quot;0&quot;) {
    header('location: http://google.com');
    die();
  }
} ?&gt;
</pre>
<p>2.] Save your changes and keep an eye for more spammers!<br />
<br />
3.] Done!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/753/say-no-to-spam/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HTA Script &#8211; Parse HTML files as PHP</title>
		<link>http://lair360.co.uk/blog/731/hta-script-parse-html-files-as-php/</link>
		<comments>http://lair360.co.uk/blog/731/hta-script-parse-html-files-as-php/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 11:25:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[HTA Script]]></category>
		<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[php parse]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=731</guid>
		<description><![CDATA[Version: 13.1 Revision: 23 Build 13 Parse HTML files as PHP Introduction: On the 29th of October, I was trying to get my server to parse php codes from a html / htm file. However, when I tried to define the extension, my server just prompt the user to download a file. But, that is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 13.1<br />
Revision: 23 Build 13<br />
<br />
Parse HTML files as PHP<br />
<br />
<img src="http://lair360.co.uk/blog/wp-content/uploads/2009/11/pickaweb-server-logo.jpg" alt="pickaweb-server-logo" title="pickaweb-server-logo" width="249" height="113" class="alignleft size-full wp-image-732" />Introduction:</strong> On the 29th of October, I was trying to get my server to parse php codes from a html / htm file. However, when I tried to define the extension, my server just prompt the user to download a file. But, that is not what I wanted! So, I asked Pickaweb for assistance. Soon enough, my problem was fixed!<br />
<br />
Here is my tutorial for Pickaweb users. But, please be aware that this article is only for user who is registered with Pickaweb, as their hosting provider.<br />
<br />
<strong>Notes:</strong> by parsing php codes inside your html file, you can implement image &#8211; ads and other sources without touching your main file. This is also useful if you’re adding a big chunk of codes without messing your original html / htm files.<br />
<br />
1.] Login to your FTP server and look for your “.htaccess” file.<br />
<br />
2.] Rename the file and download it to your hard drive.<br />
<br />
3.] Copy one of these codes and paste it to the bottom of your “.htaccess” file.</p>
<pre class="brush: php;">
// For PHP5 Server.
// -----------------------
AddHandler application/x-httpd-php5 .html .htm
AddType x-mapp-php5 .html .htm

// For PHP4 Server.
// ----------------------
AddHandler application/x-httpd-php4 .html .htm
AddType x-mapp-php4 .html .htm
</pre>
<p>4.] Save your changes and delete your old “.htaccess” file (online server).<br />
<br />
5.] Upload your modified file and rename it. After that, you will need to clear your Internet caches and temporary files.<br />
<br />
6.] Check your website and have fun!<br />
 <br />
7.] You are done!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/731/hta-script-parse-html-files-as-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suppress those warning and errors!</title>
		<link>http://lair360.co.uk/blog/727/suppress-those-warning-and-errors/</link>
		<comments>http://lair360.co.uk/blog/727/suppress-those-warning-and-errors/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 21:03:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[ob_start]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=727</guid>
		<description><![CDATA[Version: 11.1 Revision: 23.3 Build 6 Suppress those warning and errors! Introduction: This problem is getting on my nerves and I don’t really like it! It normally triggers when your server is loading a page. But, to clarify this issues, the server must first send the ‘HTTP headers’, before the ‘HTML’ sections and the body [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 11.1<br />
Revision: 23.3 Build 6<br />
<br />
Suppress those warning and errors!<br />
<br />
<img src="http://lair360.co.uk/blog/wp-content/uploads/2009/11/php_logo_v2.png" alt="php_logo_v2" title="php_logo_v2" width="130" height="130" class="alignleft size-full wp-image-728" />Introduction:</strong> This problem is getting on my nerves and I don’t really like it! It normally triggers when your server is loading a page. But, to clarify this issues, the server must first send the ‘HTTP headers’, before the ‘HTML’ sections and the body tags. So, without the buffer commands, you’ll get something that looks like this:  &#8220;Cannot modify header information &#8211; headers already sent by (output started at &#8230;&#8230;&#8230;.)&#8221;<br />
<br />
<strong>Example:</strong> &#8220;Warning: Cannot modify header information &#8211; headers already sent by (output started at /root/file.php:16) in /root/file.php on line 54&#8243;<br />
<br />
This errors happens a lot on WordPress &#038; Drupal. But, there is a way to suppress this problem.<br />
We just add this bit of code &#8211; straight into the top of the page!</p>
<pre class="brush: php;">
&lt;?php  // Enable output buffering
ob_start(); ?&gt;
</pre>
<p>For WordPress users, you’ll need to add this script into your ‘header.php’ file.<br />
After that, just save your changes and the errors should be suppressed!<br />
<br />
<strong>What is &#8220;ob_start&#8221; and what is this little function?</strong><br />
<br />
ob_start() is an output function that holds back any ‘output’ from the script until everything is ready to go. After that, it sends the headers and HTML.<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/727/suppress-those-warning-and-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress – display ADS on your sidebar v5</title>
		<link>http://lair360.co.uk/blog/712/wordpress-%e2%80%93-display-ads-on-your-sidebar-v5/</link>
		<comments>http://lair360.co.uk/blog/712/wordpress-%e2%80%93-display-ads-on-your-sidebar-v5/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 19:12:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[125 pixel ads]]></category>
		<category><![CDATA[php script]]></category>
		<category><![CDATA[Sidebars.php]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=712</guid>
		<description><![CDATA[Version: 4.1 Revision: 34 Build 22 WordPress – display ADS on your sidebar v5 Introduction: this project was driving me to the wall! I have to re-write my entire “125 pixel ADS” &#8211; source code, so that it could find the images from your costume &#8211; template &#8211; files. Also, this version is not JavaScript, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 4.1<br />
Revision: 34 Build 22<br />
<br />
WordPress – display ADS on your sidebar v5<br />
<br />
<img src="http://lair360.co.uk/blog/wp-content/uploads/2009/11/ads_example.jpg" alt="ads_example" title="ads_example" width="125" height="125" class="alignleft size-full wp-image-713" />Introduction:</strong> this project was driving me to the wall! I have to re-write my entire “125 pixel ADS” &#8211; source code, so that it could find the images from your costume &#8211; template &#8211; files. Also, this version is not JavaScript, infact, it was written in PHP with CSS script. So, it’s a little harder for me to build. But, don’t panic! I already did a test run.<br />
<br />
Anyway, all you need to do is follow the instruction, carefully!<br />
<br />
1.] Login to your Cpanel and look for your theme folder.<br />
<br />
<strong>Directory:</strong> /wp-content/themes/* costume – theme – folder/…<br />
<br />
2.] Look for your “header.php” file and add this line.</p>
<pre class="brush: css;">
&lt;script type=&quot;text/javascript&quot; src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/css/blocked_template.css&quot;&gt;&lt;/script&gt;
</pre>
<p>Notes: if you saved the file with a different name, you must modify the CSS directory.<br />
If you don’t, your sidebar will go funny…</p>
<pre class="brush: css;">
/* --- Copy these code into your 'blocked_template.css' --- */

#sidebar li li.ad1 {
  float:left;
  margin: 0 5px 5px 0;
  width:125px;
  }
#sidebar li li.ad2 {
  float:left;
  margin: 0 0 5px 0;
  width:125px;
  }
#sidebar li li.ad3 {
  float:left;
  margin: 0 5px 0 0;
  width:125px;
  }
#sidebar li li.ad4 {
  float:left;
  margin: 0 0 0 0;
  width:125px;
  }

/* --- Copy these code into your 'blocked_template.css' --- */
</pre>
<p>3.] Back into your server, you&#8217;ll need to create a new &#8220;template.php&#8221; file. Just give it a simple name, like: &#8216;ads125.php&#8217;. After that, you&#8217;ll need to edit your file and add these code with your prefered ADS.<br />
<br />
<strong>Notes:</strong> you&#8217;ll need to create a seperate directory (costume stylesheet directory) for your image-banners. The directory is called: &#8216;banner_images&#8217;.</p>
<pre class="brush: php;">
&lt;ul class=&quot;banner125 clearfix&quot;&gt;
  &lt;li class=&quot;ad1&quot;&gt;
    &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/banner_images/ads125.gif&quot; style=&quot;display:block;margin:0;padding:0;&quot; alt=&quot;125x125 banner ad&quot; /&gt;&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&quot;ad2&quot;&gt;
    &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/banner_images/ads125.gif&quot; style=&quot;display:block;margin:0;padding:0;&quot; alt=&quot;125x125 banner ad&quot; /&gt;&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&quot;ad3&quot;&gt;
    &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/banner_images/ads125.gif&quot; style=&quot;display:block;margin:0;padding:0;&quot; alt=&quot;125x125 banner ad&quot; /&gt;&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&quot;ad4&quot;&gt;
    &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php bloginfo('template_directory'); ?&gt;/banner_images/ads125.gif&quot; style=&quot;display:block;margin:0;padding:0;&quot; alt=&quot;125x125 banner ad&quot; /&gt;&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>4.] Save your progress and add this line into yout &#8220;sidebar.php&#8221;. But, you must place this &#8216;ads125.php&#8217; file in the same directory as your &#8220;sidebar.php&#8221;.</p>
<pre class="brush: php;">
&lt;li&gt;
  &lt;?php include (TEMPLATEPATH . '/ads125.php'); ?&gt;
&lt;/li&gt;
</pre>
<p>5.] You&#8217;re good to go!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/712/wordpress-%e2%80%93-display-ads-on-your-sidebar-v5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrap your post revision with SQL shredder!</title>
		<link>http://lair360.co.uk/blog/703/scrap-your-post-revision-with-sql-shredder/</link>
		<comments>http://lair360.co.uk/blog/703/scrap-your-post-revision-with-sql-shredder/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 23:41:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[autosave interval]]></category>
		<category><![CDATA[delete post revisions]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=703</guid>
		<description><![CDATA[Version: 15.1 Revision: 45 Build 13 Scrap your post revision with SQL shredder! Introduction: On Halloween day, I was bored as hell! I am too old for these &#8220;Trick ‘N’ Treat&#8221; sort of things. But, I did have a good time writing my own article and give the other children and the others candies, chocolate [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 15.1<br />
Revision: 45 Build 13<br />
<br />
Scrap your post revision with SQL shredder!<br />
<br />
<img src="http://lair360.co.uk/blog/wp-content/uploads/2009/10/phpmyadmin_logo.jpg" alt="phpmyadmin_logo" title="phpmyadmin_logo" width="204" height="116" class="alignleft size-full wp-image-704" />Introduction:</strong> On Halloween day, I was bored as hell! I am too old for these &#8220;Trick ‘N’ Treat&#8221; sort of things.<br />
But, I did have a good time writing my own article and give the other children and the others candies, chocolate and sweets. So, what about my readers? Don’t worry! Here is a mini – tutorial for you to learn and enjoy.<br />
<br />
This tutorial is about controlling your &#8220;WP &#8211; post revision&#8221; with a little help from &#8220;phpMyAdmin &#8211; Query and by editing your wp-config.php file.&#8221; However, please be careful when you’re modifying your &#8220;wp-config.php&#8221; file.<br />
<br />
<strong>Notes:</strong> The &#8220;config&#8221; file is the hearth of your WordPress database. So, in my own judgment, just make a backup of your &#8220;wp-config.php&#8221; file.<br />
It’s not that hard &#8211; for crying out loud…<br />
<br />
1.] Login to your Cpanel and navigate to your blog’s directory. After that, you’ll need to edit your ‘wp-config.php’ file and add these lines into the top of your file.</p>
<pre class="brush: php;">
define ('WP_POST_REVISIONS', 6); //Defines a maximum of 6 different revisions per post.
define ('AUTOSAVE_INTERVAL', 3600); // Auto-saves on 1 hour interval.
</pre>
<p>2.] Save your changes and exit your ‘config’ file.<br />
<br />
3.] In your Cpanel directory [Home], please scroll down and look for &#8220;phpMyAdmin&#8221; and select it.<br />
<br />
4.] Wait for the control panel to load its settings and click on your &#8220;SQL&#8221; icon.<br />
<br />
<strong>Facts:</strong> this icon is called: SQL query command. It is located on the top – left – corner, which is next to a little house icon (Home).<br />
<br />
5.] Copy this code and paste the following code into the &#8220;SQL command&#8221; window.</p>
<pre class="brush: php;">
DELETE FROM wp_posts WHERE post_type = &quot;revision&quot;;
</pre>
<p>6.] Execute the script and let it erase all of your previous &#8220;post – revision&#8221;.<br />
<br />
7.] You’re Done!<br />
<br />
<em><strong>Alternative for &#8220;WP – AUTOSAVE_INTERVAL&#8221;.</strong></em><br />
<br />
- There is another way to change your &#8220;WordPress autosave interval.&#8221;<br />
But, you’ll need to look for this file: &#8220;wp-settings.php&#8221; and edit these parts which is shown below.<br />
<br />
<strong>Notes:</strong> The actual lines is around 522 – 528. Just scroll down or search for the lines with this phrase: &#8220;AUTOSAVE_INTERVAL.&#8221;</p>
<pre class="brush: php;">
/**
 * It is possible to define this in wp-config.php
 * @since 2.5.0
 */
if ( !defined( 'AUTOSAVE_INTERVAL' ) )
	define( 'AUTOSAVE_INTERVAL', 60 );
</pre>
<p>     <strong>&#8212; Times &#8212;</strong><br />
60     sec = 1 minutes<br />
1800 sec = 30 minutes<br />
1980 sec = 33 minutes<br />
3000 sec = 50 minutes<br />
3600 sec = 60 minutes<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/703/scrap-your-post-revision-with-sql-shredder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assassinate that miserable bullet-points!</title>
		<link>http://lair360.co.uk/blog/694/assassinate-that-miserable-bullet-points/</link>
		<comments>http://lair360.co.uk/blog/694/assassinate-that-miserable-bullet-points/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 21:13:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bullet points]]></category>
		<category><![CDATA[css layout]]></category>
		<category><![CDATA[list-style]]></category>
		<category><![CDATA[sidebar]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=694</guid>
		<description><![CDATA[Version: 11.1 Revision: 43.1 Build 11 Assassinate that miserable bullet-points! Introduction: When I was maintaining my website, one of my friend had a small complaint about his WordPress &#8211; sidebar. The problems is, his blog has &#8216;bullet – points&#8217; all over the place! So, he tried to disable it, but failed miserably without success. After [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 11.1<br />
Revision: 43.1 Build 11<br />
<br />
Assassinate that miserable bullet-points!</strong><br />
<br />
<strong>Introduction:</strong> When I was maintaining my website, one of my friend had a small complaint about his WordPress &#8211; sidebar. The problems is, his blog has &#8216;bullet – points&#8217; all over the place! So, he tried to disable it, but failed miserably without success.<br />
<br />
After his trouble, he phoned me if I can disable these horrible &#8216;bullet – points&#8217; from appearing beside his sidebar. Guess what? I disabled it without wasting my time! It took me only 3 minutes to login, navigate to his directory and modify his CSS Stylesheet.<br />
<br />
That is all &#8211; No big deal!<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<br />
1.] Login to your Cpanel and navigate to your WordPress Theme folder.<br />
<br />
<strong>Normal directory:</strong> /public_html/wp-content/themes/*theme folder/<br />
<strong>Root directory:</strong> /public_html/blog/wp-content/themes/*theme folder/<br />
<br />
2.] Look inside your costume – theme folder and find your “CSS Stylesheet.”<br />
After that, just look for a tag that control your wp-sidebar. Here is an example&#8230;</p>
<pre class="brush: css;">
/* sidebar */
#sidebar {
	float:right;
	width:318px;
}
.widget { margin-bottom:8px; }

.widget-title {
	background:#E8E8E8 url(images/widget-title-bg.gif) no-repeat 0 0;
	font:normal 12px 'Trebuchet MS', Tahoma, Verdana;
	color:#2C2C2C;
	height:27px;
	line-height:27px;
	margin-bottom:5px;
	padding:0 6px;
}
</pre>
<p>3.] Now, you’ll need to paste the following codes into your CSS sidebar.<br />
After that, just save your settings and check your Blog.<br />
</p>
<pre class="brush: css;">list-style: none;</pre>
<p>
- This is the modified example…</p>
<pre class="brush: css;">
/* sidebar */
#sidebar {
           list-style:none;
	float:right;
	width:318px;
}
.widget { margin-bottom:8px; }

.widget-title {
	background:#E8E8E8 url(images/widget-title-bg.gif) no-repeat 0 0;
	font:normal 12px 'Trebuchet MS', Tahoma, Verdana;
	color:#2C2C2C;
	height:27px;
	line-height:27px;
	margin-bottom:5px;
	padding:0 6px;
}
</pre>
<p>4.] Keep a backup of your modified &#8211; CSS Stylesheet and relax!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/694/assassinate-that-miserable-bullet-points/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kick those spammers and give them a red ticket!</title>
		<link>http://lair360.co.uk/blog/692/kick-those-spammers-and-give-them-a-red-ticket/</link>
		<comments>http://lair360.co.uk/blog/692/kick-those-spammers-and-give-them-a-red-ticket/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 00:26:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[block bad ip]]></category>
		<category><![CDATA[block ip address]]></category>
		<category><![CDATA[php script]]></category>
		<category><![CDATA[php security]]></category>
		<category><![CDATA[unix training]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=692</guid>
		<description><![CDATA[Version: 13.1c Revision: 11 Build 31 Kick those spammers and give them a red ticket! Introduction: for the last three days, I was banging my head against the monitor &#8211; trying to create a powerful &#8211; php script that could block a bunch of idiotic spammers, by range. But, here is the good news&#8230; you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 13.1c<br />
Revision: 11 Build 31<br />
<br />
Kick those spammers and give them a red ticket!<br />
<br />
Introduction:</strong> for the last three days, I was banging my head against the monitor &#8211; trying to create a powerful &#8211; php script that could block a bunch of idiotic spammers, by range.<br />
But, here is the good news&#8230; you can use this script without any faults &#8211; from a single directory! This means, your &#8220;IP text file&#8221; can be placed into the same directory without writing its TRUE directory.<br />
<br />
In this script you&#8217;ll only need to modify two lines: the url directory and the warning message for the naughty spammers. Also, if you want to use the &#8220;banned_warning&#8221; strings, you will need to keep the &#8220;banned_url&#8221;, empty.<br />
<br />
Finally, before you use this script, the structure of the &#8220;IP address&#8221; file cannot have white spaces from the beginning, middle and the end. Also, the supported range are limited. It can only recognize these structure&#8230;</p>
<pre class="brush: xml;">
123.
123.56.
123.56.76.
123.56.76.44
255.255.255.255
0.0.0.0
</pre>
<p>1.] Login to your Cpanel and add this to the &#8220;header.php&#8221; file.<br />
<br />
<strong>Notes:</strong> if you want to make this script as an &#8220;Include&#8221; file, then you&#8217;ll need to use this code. Just place this lines into your &#8220;header.php&#8221;. But, you must type the paths, clearly. Or else, there will be errors / faults with your Website.</p>
<pre class="brush: php;">
&lt;?php include ($_SERVER['DOCUMENT_ROOT'].&quot;/diectory-one/banned.php&quot;); ?&gt;
</pre>
<p>- replace the default directory (&#8220;/diectory-one/banned.php&#8221;) with your own directory that has the &#8220;blocking IP script&#8221;.</p>
<pre class="brush: php;">
&lt;?php
// Version: 13.4 Eagle
// Copyrighted By Lair360
// --------------------------------
$filelocation = &quot;ips_blocker.txt&quot;;
$banned_warning = &quot;You're banned from Spamming my website!
&lt;br&gt;If you are blocked by mistake, please contact the admin: [Email Address]&quot;;
// Url redirects ++ leave blank to use banned_warning ++
$banned_url = &quot;&quot;;
// Modifications stops here!
function ShowBan() {global $banned_url, $banned_warning; if ($banned_url == &quot;&quot;) exit($banned_warning);
  else header(&quot;Location: $banned_url&quot;); exit;}
if ($_SESSION_['banned'] == 'TRUE') ShowBan();
// comment out the &quot;Session&quot; if you're using the include function.
	if (!isset($_SESSION)) session_start();
$ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
	$banfile = file($filelocation);
foreach ($banfile as $list)
    {
        $list = rtrim($list); // trim the junk that is killing your website!
        if (strstr($ip, $list) &amp;&amp; strpos($ip, $list)==0)
            { $_SESSION_['banned'] == 'TRUE';
                ShowBan();}
    }?&gt;
</pre>
<p>2.] Save your file and input your offending IP addresses into your text file. But, don&#8217;t be a fool and block yourself from accessing your website, especially, adding the IP range.<br />
<br />
3.] Finish!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/692/kick-those-spammers-and-give-them-a-red-ticket/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kick those &#8220;TRACE &amp; TRACK&#8221; out of your door!</title>
		<link>http://lair360.co.uk/blog/690/kick-those-trace-track-out-of-your-door/</link>
		<comments>http://lair360.co.uk/blog/690/kick-those-trace-track-out-of-your-door/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 22:28:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & HTML Script]]></category>
		<category><![CDATA[disable trace]]></category>
		<category><![CDATA[disable track]]></category>
		<category><![CDATA[trace]]></category>
		<category><![CDATA[web application security]]></category>

		<guid isPermaLink="false">http://lair360.co.uk/blog/?p=690</guid>
		<description><![CDATA[Version: 13.3 Revision: 12 Build 6 Kick those &#8220;TRACE &#038; TRACK&#8221; out of your door! Introduction: When I was testing my &#8220;HTML decode&#8221; script, I was very disappointed. The Javascript and php script didn&#8217;t work as planned and I was forced to make a harsh decision. But, in the end, I have to delete my [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Version: 13.3<br />
Revision: 12 Build 6<br />
<br />
Kick those &#8220;TRACE &#038; TRACK&#8221; out of your door!<br />
<br />
Introduction:</strong> When I was testing my &#8220;HTML decode&#8221; script, I was very disappointed. The Javascript and php script didn&#8217;t work as planned and I was forced to make a harsh decision.<br />
But, in the end, I have to delete my new article and remove it from my database. It&#8217;s for the best and I don&#8217;t want to cause a problem to your server.<br />
That is my concern for all readers&#8230;<br />
<br />
Anyway, this tutorial is about disabling the &#8220;TRACE and TRACK&#8221; from your server. But, don&#8217;t worry, this script is safe to use. But, you must have &#8220;mod_rewrite&#8221; enabled. If not, please consult this problem with your provider.<br />
<br />
According to my research, the &#8220;TRACE and TRACK&#8221; are classified as &#8220;HTTP methods,&#8221; which is used in the debugging of web server &#8211; connections.<br />
These are normally enabled by the hosting &#8211; server. But, they are a risk to the publisher, web-designer and bankers. Nevertheless, they can also compromise the security of your server, by enabling &#8220;cross-site&#8221; scripting attacks. But, there is a chance that an attacker may manipulate the &#8220;TRACE and TRACK&#8221; methods, just to intercept your visitors’ sensitive data.<br />
So, in order to disable this &#8220;TRACE and TRACK&#8221; security attack / vulnerability, we can use HTA script to shut-it-down for the safety of your visitors.<br />
<br />
1.] Execute your &#8220;.htaccess&#8221; file and add these lines. After that, just delete your old HTA script and upload yor modified version.</p>
<pre class="brush: xml;">
# Disable TRACE and TRACK
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
# End of TRACE and TRACK
</pre>
<p>2.] Empty your System caches and your temorary files with CCleaner.<br />
The application can be download, from here: ccleaner.com.<br />
<br />
3.] Done!<br />
<br />
<strong>Copyrighted By Lair360</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://lair360.co.uk/blog/690/kick-those-trace-track-out-of-your-door/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
