<?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>Hosts Blog</title>
	<atom:link href="http://www.hostsblog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hostsblog.com</link>
	<description></description>
	<lastBuildDate>Thu, 11 Jun 2009 01:46:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL countries</title>
		<link>http://www.hostsblog.com/mysql-countries/</link>
		<comments>http://www.hostsblog.com/mysql-countries/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 10:33:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Web Developing]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=92</guid>
		<description><![CDATA[If you are MySQL developer, you probably would like to add countries in your registration script to track users where are they coming from. This tutorial is ready for mysql insertion.
Open your mysql query browser/editor and create countries table :
CREATE TABLE IF NOT EXISTS country (
iso CHAR(2) NOT NULL PRIMARY KEY,
name VARCHAR(80) NOT NULL,
printable_name VARCHAR(80) NOT NULL,
iso3 CHAR(3),
numcode SMALLINT
);
Now execute insertion query of countries, copy and paste this code :
INSERT INTO country VALUES (&#8217;AF&#8217;,'AFGHANISTAN&#8217;,'Afghanistan&#8217;,'AFG&#8217;,'004&#8242;);
INSERT INTO country VALUES (&#8217;AL&#8217;,'ALBANIA&#8217;,'Albania&#8217;,'ALB&#8217;,'008&#8242;);
INSERT INTO country VALUES (&#8217;DZ&#8217;,'ALGERIA&#8217;,'Algeria&#8217;,'DZA&#8217;,'012&#8242;);
INSERT INTO country VALUES (&#8217;AS&#8217;,'AMERICAN SAMOA&#8217;,'American Samoa&#8217;,'ASM&#8217;,'016&#8242;);
INSERT INTO country ...]]></description>
			<content:encoded><![CDATA[<p>If you are MySQL developer, you probably would like to add countries in your registration script to track users where are they coming from. This tutorial is ready for mysql insertion.<span id="more-92"></span></p>
<p>Open your mysql query browser/editor and create countries table :</p>
<blockquote><p>CREATE TABLE IF NOT EXISTS country (<br />
iso CHAR(2) NOT NULL PRIMARY KEY,<br />
name VARCHAR(80) NOT NULL,<br />
printable_name VARCHAR(80) NOT NULL,<br />
iso3 CHAR(3),<br />
numcode SMALLINT<br />
);</p></blockquote>
<p>Now execute insertion query of countries, copy and paste this code :</p>
<blockquote><p>INSERT INTO country VALUES (&#8217;AF&#8217;,'AFGHANISTAN&#8217;,'Afghanistan&#8217;,'AFG&#8217;,'004&#8242;);<br />
INSERT INTO country VALUES (&#8217;AL&#8217;,'ALBANIA&#8217;,'Albania&#8217;,'ALB&#8217;,'008&#8242;);<br />
INSERT INTO country VALUES (&#8217;DZ&#8217;,'ALGERIA&#8217;,'Algeria&#8217;,'DZA&#8217;,'012&#8242;);<br />
INSERT INTO country VALUES (&#8217;AS&#8217;,'AMERICAN SAMOA&#8217;,'American Samoa&#8217;,'ASM&#8217;,'016&#8242;);<br />
INSERT INTO country VALUES (&#8217;AD&#8217;,'ANDORRA&#8217;,'Andorra&#8217;,'AND&#8217;,'020&#8242;);<br />
INSERT INTO country VALUES (&#8217;AO&#8217;,'ANGOLA&#8217;,'Angola&#8217;,'AGO&#8217;,'024&#8242;);<br />
INSERT INTO country VALUES (&#8217;AI&#8217;,'ANGUILLA&#8217;,'Anguilla&#8217;,'AIA&#8217;,'660&#8242;);<br />
INSERT INTO country VALUES (&#8217;AQ&#8217;,'ANTARCTICA&#8217;,'Antarctica&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;AG&#8217;,'ANTIGUA AND BARBUDA&#8217;,'Antigua and Barbuda&#8217;,'ATG&#8217;,'028&#8242;);<br />
INSERT INTO country VALUES (&#8217;AR&#8217;,'ARGENTINA&#8217;,'Argentina&#8217;,'ARG&#8217;,'032&#8242;);<br />
INSERT INTO country VALUES (&#8217;AM&#8217;,'ARMENIA&#8217;,'Armenia&#8217;,'ARM&#8217;,'051&#8242;);<br />
INSERT INTO country VALUES (&#8217;AW&#8217;,'ARUBA&#8217;,'Aruba&#8217;,'ABW&#8217;,'533&#8242;);<br />
INSERT INTO country VALUES (&#8217;AU&#8217;,'AUSTRALIA&#8217;,'Australia&#8217;,'AUS&#8217;,'036&#8242;);<br />
INSERT INTO country VALUES (&#8217;AT&#8217;,'AUSTRIA&#8217;,'Austria&#8217;,'AUT&#8217;,'040&#8242;);<br />
INSERT INTO country VALUES (&#8217;AZ&#8217;,'AZERBAIJAN&#8217;,'Azerbaijan&#8217;,'AZE&#8217;,'031&#8242;);<br />
INSERT INTO country VALUES (&#8217;BS&#8217;,'BAHAMAS&#8217;,'Bahamas&#8217;,'BHS&#8217;,'044&#8242;);<br />
INSERT INTO country VALUES (&#8217;BH&#8217;,'BAHRAIN&#8217;,'Bahrain&#8217;,'BHR&#8217;,'048&#8242;);<br />
INSERT INTO country VALUES (&#8217;BD&#8217;,'BANGLADESH&#8217;,'Bangladesh&#8217;,'BGD&#8217;,'050&#8242;);<br />
INSERT INTO country VALUES (&#8217;BB&#8217;,'BARBADOS&#8217;,'Barbados&#8217;,'BRB&#8217;,'052&#8242;);<br />
INSERT INTO country VALUES (&#8217;BY&#8217;,'BELARUS&#8217;,'Belarus&#8217;,'BLR&#8217;,'112&#8242;);<br />
INSERT INTO country VALUES (&#8217;BE&#8217;,'BELGIUM&#8217;,'Belgium&#8217;,'BEL&#8217;,'056&#8242;);<br />
INSERT INTO country VALUES (&#8217;BZ&#8217;,'BELIZE&#8217;,'Belize&#8217;,'BLZ&#8217;,'084&#8242;);<br />
INSERT INTO country VALUES (&#8217;BJ&#8217;,'BENIN&#8217;,'Benin&#8217;,'BEN&#8217;,'204&#8242;);<br />
INSERT INTO country VALUES (&#8217;BM&#8217;,'BERMUDA&#8217;,'Bermuda&#8217;,'BMU&#8217;,'060&#8242;);<br />
INSERT INTO country VALUES (&#8217;BT&#8217;,'BHUTAN&#8217;,'Bhutan&#8217;,'BTN&#8217;,'064&#8242;);<br />
INSERT INTO country VALUES (&#8217;BO&#8217;,'BOLIVIA&#8217;,'Bolivia&#8217;,'BOL&#8217;,'068&#8242;);<br />
INSERT INTO country VALUES (&#8217;BA&#8217;,'BOSNIA AND HERZEGOVINA&#8217;,'Bosnia and Herzegovina&#8217;,'BIH&#8217;,'070&#8242;);<br />
INSERT INTO country VALUES (&#8217;BW&#8217;,'BOTSWANA&#8217;,'Botswana&#8217;,'BWA&#8217;,'072&#8242;);<br />
INSERT INTO country VALUES (&#8217;BV&#8217;,'BOUVET ISLAND&#8217;,'Bouvet Island&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;BR&#8217;,'BRAZIL&#8217;,'Brazil&#8217;,'BRA&#8217;,'076&#8242;);<br />
INSERT INTO country VALUES (&#8217;IO&#8217;,'BRITISH INDIAN OCEAN TERRITORY&#8217;,'British Indian Ocean Territory&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;BN&#8217;,'BRUNEI DARUSSALAM&#8217;,'Brunei Darussalam&#8217;,'BRN&#8217;,'096&#8242;);<br />
INSERT INTO country VALUES (&#8217;BG&#8217;,'BULGARIA&#8217;,'Bulgaria&#8217;,'BGR&#8217;,'100&#8242;);<br />
INSERT INTO country VALUES (&#8217;BF&#8217;,'BURKINA FASO&#8217;,'Burkina Faso&#8217;,'BFA&#8217;,'854&#8242;);<br />
INSERT INTO country VALUES (&#8217;BI&#8217;,'BURUNDI&#8217;,'Burundi&#8217;,'BDI&#8217;,'108&#8242;);<br />
INSERT INTO country VALUES (&#8217;KH&#8217;,'CAMBODIA&#8217;,'Cambodia&#8217;,'KHM&#8217;,'116&#8242;);<br />
INSERT INTO country VALUES (&#8217;CM&#8217;,'CAMEROON&#8217;,'Cameroon&#8217;,'CMR&#8217;,'120&#8242;);<br />
INSERT INTO country VALUES (&#8217;CA&#8217;,'CANADA&#8217;,'Canada&#8217;,'CAN&#8217;,'124&#8242;);<br />
INSERT INTO country VALUES (&#8217;CV&#8217;,'CAPE VERDE&#8217;,'Cape Verde&#8217;,'CPV&#8217;,'132&#8242;);<br />
INSERT INTO country VALUES (&#8217;KY&#8217;,'CAYMAN ISLANDS&#8217;,'Cayman Islands&#8217;,'CYM&#8217;,'136&#8242;);<br />
INSERT INTO country VALUES (&#8217;CF&#8217;,'CENTRAL AFRICAN REPUBLIC&#8217;,'Central African Republic&#8217;,'CAF&#8217;,'140&#8242;);<br />
INSERT INTO country VALUES (&#8217;TD&#8217;,'CHAD&#8217;,'Chad&#8217;,'TCD&#8217;,'148&#8242;);<br />
INSERT INTO country VALUES (&#8217;CL&#8217;,'CHILE&#8217;,'Chile&#8217;,'CHL&#8217;,'152&#8242;);<br />
INSERT INTO country VALUES (&#8217;CN&#8217;,'CHINA&#8217;,'China&#8217;,'CHN&#8217;,'156&#8242;);<br />
INSERT INTO country VALUES (&#8217;CX&#8217;,'CHRISTMAS ISLAND&#8217;,'Christmas Island&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;CC&#8217;,'COCOS (KEELING) ISLANDS&#8217;,'Cocos (Keeling) Islands&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;CO&#8217;,'COLOMBIA&#8217;,'Colombia&#8217;,'COL&#8217;,'170&#8242;);<br />
INSERT INTO country VALUES (&#8217;KM&#8217;,'COMOROS&#8217;,'Comoros&#8217;,'COM&#8217;,'174&#8242;);<br />
INSERT INTO country VALUES (&#8217;CG&#8217;,'CONGO&#8217;,'Congo&#8217;,'COG&#8217;,'178&#8242;);<br />
INSERT INTO country VALUES (&#8217;CD&#8217;,'CONGO, THE DEMOCRATIC REPUBLIC OF THE&#8217;,'Congo, the Democratic Republic of the&#8217;,'COD&#8217;,'180&#8242;);<br />
INSERT INTO country VALUES (&#8217;CK&#8217;,'COOK ISLANDS&#8217;,'Cook Islands&#8217;,'COK&#8217;,'184&#8242;);<br />
INSERT INTO country VALUES (&#8217;CR&#8217;,'COSTA RICA&#8217;,'Costa Rica&#8217;,'CRI&#8217;,'188&#8242;);<br />
INSERT INTO country VALUES (&#8217;CI&#8217;,'COTE D\&#8217;IVOIRE&#8217;,'Cote D\&#8217;Ivoire&#8217;,'CIV&#8217;,'384&#8242;);<br />
INSERT INTO country VALUES (&#8217;HR&#8217;,'CROATIA&#8217;,'Croatia&#8217;,'HRV&#8217;,'191&#8242;);<br />
INSERT INTO country VALUES (&#8217;CU&#8217;,'CUBA&#8217;,'Cuba&#8217;,'CUB&#8217;,'192&#8242;);<br />
INSERT INTO country VALUES (&#8217;CY&#8217;,'CYPRUS&#8217;,'Cyprus&#8217;,'CYP&#8217;,'196&#8242;);<br />
INSERT INTO country VALUES (&#8217;CZ&#8217;,'CZECH REPUBLIC&#8217;,'Czech Republic&#8217;,'CZE&#8217;,'203&#8242;);<br />
INSERT INTO country VALUES (&#8217;DK&#8217;,'DENMARK&#8217;,'Denmark&#8217;,'DNK&#8217;,'208&#8242;);<br />
INSERT INTO country VALUES (&#8217;DJ&#8217;,'DJIBOUTI&#8217;,'Djibouti&#8217;,'DJI&#8217;,'262&#8242;);<br />
INSERT INTO country VALUES (&#8217;DM&#8217;,'DOMINICA&#8217;,'Dominica&#8217;,'DMA&#8217;,'212&#8242;);<br />
INSERT INTO country VALUES (&#8217;DO&#8217;,'DOMINICAN REPUBLIC&#8217;,'Dominican Republic&#8217;,'DOM&#8217;,'214&#8242;);<br />
INSERT INTO country VALUES (&#8217;EC&#8217;,'ECUADOR&#8217;,'Ecuador&#8217;,'ECU&#8217;,'218&#8242;);<br />
INSERT INTO country VALUES (&#8217;EG&#8217;,'EGYPT&#8217;,'Egypt&#8217;,'EGY&#8217;,'818&#8242;);<br />
INSERT INTO country VALUES (&#8217;SV&#8217;,'EL SALVADOR&#8217;,'El Salvador&#8217;,'SLV&#8217;,'222&#8242;);<br />
INSERT INTO country VALUES (&#8217;GQ&#8217;,'EQUATORIAL GUINEA&#8217;,'Equatorial Guinea&#8217;,'GNQ&#8217;,'226&#8242;);<br />
INSERT INTO country VALUES (&#8217;ER&#8217;,'ERITREA&#8217;,'Eritrea&#8217;,'ERI&#8217;,'232&#8242;);<br />
INSERT INTO country VALUES (&#8217;EE&#8217;,'ESTONIA&#8217;,'Estonia&#8217;,'EST&#8217;,'233&#8242;);<br />
INSERT INTO country VALUES (&#8217;ET&#8217;,'ETHIOPIA&#8217;,'Ethiopia&#8217;,'ETH&#8217;,'231&#8242;);<br />
INSERT INTO country VALUES (&#8217;FK&#8217;,'FALKLAND ISLANDS (MALVINAS)&#8217;,'Falkland Islands (Malvinas)&#8217;,'FLK&#8217;,'238&#8242;);<br />
INSERT INTO country VALUES (&#8217;FO&#8217;,'FAROE ISLANDS&#8217;,'Faroe Islands&#8217;,'FRO&#8217;,'234&#8242;);<br />
INSERT INTO country VALUES (&#8217;FJ&#8217;,'FIJI&#8217;,'Fiji&#8217;,'FJI&#8217;,'242&#8242;);<br />
INSERT INTO country VALUES (&#8217;FI&#8217;,'FINLAND&#8217;,'Finland&#8217;,'FIN&#8217;,'246&#8242;);<br />
INSERT INTO country VALUES (&#8217;FR&#8217;,'FRANCE&#8217;,'France&#8217;,'FRA&#8217;,'250&#8242;);<br />
INSERT INTO country VALUES (&#8217;GF&#8217;,'FRENCH GUIANA&#8217;,'French Guiana&#8217;,'GUF&#8217;,'254&#8242;);<br />
INSERT INTO country VALUES (&#8217;PF&#8217;,'FRENCH POLYNESIA&#8217;,'French Polynesia&#8217;,'PYF&#8217;,'258&#8242;);<br />
INSERT INTO country VALUES (&#8217;TF&#8217;,'FRENCH SOUTHERN TERRITORIES&#8217;,'French Southern Territories&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;GA&#8217;,'GABON&#8217;,'Gabon&#8217;,'GAB&#8217;,'266&#8242;);<br />
INSERT INTO country VALUES (&#8217;GM&#8217;,'GAMBIA&#8217;,'Gambia&#8217;,'GMB&#8217;,'270&#8242;);<br />
INSERT INTO country VALUES (&#8217;GE&#8217;,'GEORGIA&#8217;,'Georgia&#8217;,'GEO&#8217;,'268&#8242;);<br />
INSERT INTO country VALUES (&#8217;DE&#8217;,'GERMANY&#8217;,'Germany&#8217;,'DEU&#8217;,'276&#8242;);<br />
INSERT INTO country VALUES (&#8217;GH&#8217;,'GHANA&#8217;,'Ghana&#8217;,'GHA&#8217;,'288&#8242;);<br />
INSERT INTO country VALUES (&#8217;GI&#8217;,'GIBRALTAR&#8217;,'Gibraltar&#8217;,'GIB&#8217;,'292&#8242;);<br />
INSERT INTO country VALUES (&#8217;GR&#8217;,'GREECE&#8217;,'Greece&#8217;,'GRC&#8217;,'300&#8242;);<br />
INSERT INTO country VALUES (&#8217;GL&#8217;,'GREENLAND&#8217;,'Greenland&#8217;,'GRL&#8217;,'304&#8242;);<br />
INSERT INTO country VALUES (&#8217;GD&#8217;,'GRENADA&#8217;,'Grenada&#8217;,'GRD&#8217;,'308&#8242;);<br />
INSERT INTO country VALUES (&#8217;GP&#8217;,'GUADELOUPE&#8217;,'Guadeloupe&#8217;,'GLP&#8217;,'312&#8242;);<br />
INSERT INTO country VALUES (&#8217;GU&#8217;,'GUAM&#8217;,'Guam&#8217;,'GUM&#8217;,'316&#8242;);<br />
INSERT INTO country VALUES (&#8217;GT&#8217;,'GUATEMALA&#8217;,'Guatemala&#8217;,'GTM&#8217;,'320&#8242;);<br />
INSERT INTO country VALUES (&#8217;GN&#8217;,'GUINEA&#8217;,'Guinea&#8217;,'GIN&#8217;,'324&#8242;);<br />
INSERT INTO country VALUES (&#8217;GW&#8217;,'GUINEA-BISSAU&#8217;,'Guinea-Bissau&#8217;,'GNB&#8217;,'624&#8242;);<br />
INSERT INTO country VALUES (&#8217;GY&#8217;,'GUYANA&#8217;,'Guyana&#8217;,'GUY&#8217;,'328&#8242;);<br />
INSERT INTO country VALUES (&#8217;HT&#8217;,'HAITI&#8217;,'Haiti&#8217;,'HTI&#8217;,'332&#8242;);<br />
INSERT INTO country VALUES (&#8217;HM&#8217;,'HEARD ISLAND AND MCDONALD ISLANDS&#8217;,'Heard Island and Mcdonald Islands&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;VA&#8217;,'HOLY SEE (VATICAN CITY STATE)&#8217;,'Holy See (Vatican City State)&#8217;,'VAT&#8217;,'336&#8242;);<br />
INSERT INTO country VALUES (&#8217;HN&#8217;,'HONDURAS&#8217;,'Honduras&#8217;,'HND&#8217;,'340&#8242;);<br />
INSERT INTO country VALUES (&#8217;HK&#8217;,'HONG KONG&#8217;,'Hong Kong&#8217;,'HKG&#8217;,'344&#8242;);<br />
INSERT INTO country VALUES (&#8217;HU&#8217;,'HUNGARY&#8217;,'Hungary&#8217;,'HUN&#8217;,'348&#8242;);<br />
INSERT INTO country VALUES (&#8217;IS&#8217;,'ICELAND&#8217;,'Iceland&#8217;,'ISL&#8217;,'352&#8242;);<br />
INSERT INTO country VALUES (&#8217;IN&#8217;,'INDIA&#8217;,'India&#8217;,'IND&#8217;,'356&#8242;);<br />
INSERT INTO country VALUES (&#8217;ID&#8217;,'INDONESIA&#8217;,'Indonesia&#8217;,'IDN&#8217;,'360&#8242;);<br />
INSERT INTO country VALUES (&#8217;IR&#8217;,'IRAN, ISLAMIC REPUBLIC OF&#8217;,'Iran, Islamic Republic of&#8217;,'IRN&#8217;,'364&#8242;);<br />
INSERT INTO country VALUES (&#8217;IQ&#8217;,'IRAQ&#8217;,'Iraq&#8217;,'IRQ&#8217;,'368&#8242;);<br />
INSERT INTO country VALUES (&#8217;IE&#8217;,'IRELAND&#8217;,'Ireland&#8217;,'IRL&#8217;,'372&#8242;);<br />
INSERT INTO country VALUES (&#8217;IL&#8217;,'ISRAEL&#8217;,'Israel&#8217;,'ISR&#8217;,'376&#8242;);<br />
INSERT INTO country VALUES (&#8217;IT&#8217;,'ITALY&#8217;,'Italy&#8217;,'ITA&#8217;,'380&#8242;);<br />
INSERT INTO country VALUES (&#8217;JM&#8217;,'JAMAICA&#8217;,'Jamaica&#8217;,'JAM&#8217;,'388&#8242;);<br />
INSERT INTO country VALUES (&#8217;JP&#8217;,'JAPAN&#8217;,'Japan&#8217;,'JPN&#8217;,'392&#8242;);<br />
INSERT INTO country VALUES (&#8217;JO&#8217;,'JORDAN&#8217;,'Jordan&#8217;,'JOR&#8217;,'400&#8242;);<br />
INSERT INTO country VALUES (&#8217;KZ&#8217;,'KAZAKHSTAN&#8217;,'Kazakhstan&#8217;,'KAZ&#8217;,'398&#8242;);<br />
INSERT INTO country VALUES (&#8217;KE&#8217;,'KENYA&#8217;,'Kenya&#8217;,'KEN&#8217;,'404&#8242;);<br />
INSERT INTO country VALUES (&#8217;KI&#8217;,'KIRIBATI&#8217;,'Kiribati&#8217;,'KIR&#8217;,'296&#8242;);<br />
INSERT INTO country VALUES (&#8217;KP&#8217;,'KOREA, DEMOCRATIC PEOPLE\&#8217;S REPUBLIC OF&#8217;,'Korea, Democratic People\&#8217;s Republic of&#8217;,'PRK&#8217;,'408&#8242;);<br />
INSERT INTO country VALUES (&#8217;KR&#8217;,'KOREA, REPUBLIC OF&#8217;,'Korea, Republic of&#8217;,'KOR&#8217;,'410&#8242;);<br />
INSERT INTO country VALUES (&#8217;KW&#8217;,'KUWAIT&#8217;,'Kuwait&#8217;,'KWT&#8217;,'414&#8242;);<br />
INSERT INTO country VALUES (&#8217;KG&#8217;,'KYRGYZSTAN&#8217;,'Kyrgyzstan&#8217;,'KGZ&#8217;,'417&#8242;);<br />
INSERT INTO country VALUES (&#8217;LA&#8217;,'LAO PEOPLE\&#8217;S DEMOCRATIC REPUBLIC&#8217;,'Lao People\&#8217;s Democratic Republic&#8217;,'LAO&#8217;,'418&#8242;);<br />
INSERT INTO country VALUES (&#8217;LV&#8217;,'LATVIA&#8217;,'Latvia&#8217;,'LVA&#8217;,'428&#8242;);<br />
INSERT INTO country VALUES (&#8217;LB&#8217;,'LEBANON&#8217;,'Lebanon&#8217;,'LBN&#8217;,'422&#8242;);<br />
INSERT INTO country VALUES (&#8217;LS&#8217;,'LESOTHO&#8217;,'Lesotho&#8217;,'LSO&#8217;,'426&#8242;);<br />
INSERT INTO country VALUES (&#8217;LR&#8217;,'LIBERIA&#8217;,'Liberia&#8217;,'LBR&#8217;,'430&#8242;);<br />
INSERT INTO country VALUES (&#8217;LY&#8217;,'LIBYAN ARAB JAMAHIRIYA&#8217;,'Libyan Arab Jamahiriya&#8217;,'LBY&#8217;,'434&#8242;);<br />
INSERT INTO country VALUES (&#8217;LI&#8217;,'LIECHTENSTEIN&#8217;,'Liechtenstein&#8217;,'LIE&#8217;,'438&#8242;);<br />
INSERT INTO country VALUES (&#8217;LT&#8217;,'LITHUANIA&#8217;,'Lithuania&#8217;,'LTU&#8217;,'440&#8242;);<br />
INSERT INTO country VALUES (&#8217;LU&#8217;,'LUXEMBOURG&#8217;,'Luxembourg&#8217;,'LUX&#8217;,'442&#8242;);<br />
INSERT INTO country VALUES (&#8217;MO&#8217;,'MACAO&#8217;,'Macao&#8217;,'MAC&#8217;,'446&#8242;);<br />
INSERT INTO country VALUES (&#8217;MK&#8217;,'MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF&#8217;,'Macedonia, the Former Yugoslav Republic of&#8217;,'MKD&#8217;,'807&#8242;);<br />
INSERT INTO country VALUES (&#8217;MG&#8217;,'MADAGASCAR&#8217;,'Madagascar&#8217;,'MDG&#8217;,'450&#8242;);<br />
INSERT INTO country VALUES (&#8217;MW&#8217;,'MALAWI&#8217;,'Malawi&#8217;,'MWI&#8217;,'454&#8242;);<br />
INSERT INTO country VALUES (&#8217;MY&#8217;,'MALAYSIA&#8217;,'Malaysia&#8217;,'MYS&#8217;,'458&#8242;);<br />
INSERT INTO country VALUES (&#8217;MV&#8217;,'MALDIVES&#8217;,'Maldives&#8217;,'MDV&#8217;,'462&#8242;);<br />
INSERT INTO country VALUES (&#8217;ML&#8217;,'MALI&#8217;,'Mali&#8217;,'MLI&#8217;,'466&#8242;);<br />
INSERT INTO country VALUES (&#8217;MT&#8217;,'MALTA&#8217;,'Malta&#8217;,'MLT&#8217;,'470&#8242;);<br />
INSERT INTO country VALUES (&#8217;MH&#8217;,'MARSHALL ISLANDS&#8217;,'Marshall Islands&#8217;,'MHL&#8217;,'584&#8242;);<br />
INSERT INTO country VALUES (&#8217;MQ&#8217;,'MARTINIQUE&#8217;,'Martinique&#8217;,'MTQ&#8217;,'474&#8242;);<br />
INSERT INTO country VALUES (&#8217;MR&#8217;,'MAURITANIA&#8217;,'Mauritania&#8217;,'MRT&#8217;,'478&#8242;);<br />
INSERT INTO country VALUES (&#8217;MU&#8217;,'MAURITIUS&#8217;,'Mauritius&#8217;,'MUS&#8217;,'480&#8242;);<br />
INSERT INTO country VALUES (&#8217;YT&#8217;,'MAYOTTE&#8217;,'Mayotte&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;MX&#8217;,'MEXICO&#8217;,'Mexico&#8217;,'MEX&#8217;,'484&#8242;);<br />
INSERT INTO country VALUES (&#8217;FM&#8217;,'MICRONESIA, FEDERATED STATES OF&#8217;,'Micronesia, Federated States of&#8217;,'FSM&#8217;,'583&#8242;);<br />
INSERT INTO country VALUES (&#8217;MD&#8217;,'MOLDOVA, REPUBLIC OF&#8217;,'Moldova, Republic of&#8217;,'MDA&#8217;,'498&#8242;);<br />
INSERT INTO country VALUES (&#8217;MC&#8217;,'MONACO&#8217;,'Monaco&#8217;,'MCO&#8217;,'492&#8242;);<br />
INSERT INTO country VALUES (&#8217;MN&#8217;,'MONGOLIA&#8217;,'Mongolia&#8217;,'MNG&#8217;,'496&#8242;);<br />
INSERT INTO country VALUES (&#8217;MS&#8217;,'MONTSERRAT&#8217;,'Montserrat&#8217;,'MSR&#8217;,'500&#8242;);<br />
INSERT INTO country VALUES (&#8217;MA&#8217;,'MOROCCO&#8217;,'Morocco&#8217;,'MAR&#8217;,'504&#8242;);<br />
INSERT INTO country VALUES (&#8217;MZ&#8217;,'MOZAMBIQUE&#8217;,'Mozambique&#8217;,'MOZ&#8217;,'508&#8242;);<br />
INSERT INTO country VALUES (&#8217;MM&#8217;,'MYANMAR&#8217;,'Myanmar&#8217;,'MMR&#8217;,'104&#8242;);<br />
INSERT INTO country VALUES (&#8217;NA&#8217;,'NAMIBIA&#8217;,'Namibia&#8217;,'NAM&#8217;,'516&#8242;);<br />
INSERT INTO country VALUES (&#8217;NR&#8217;,'NAURU&#8217;,'Nauru&#8217;,'NRU&#8217;,'520&#8242;);<br />
INSERT INTO country VALUES (&#8217;NP&#8217;,'NEPAL&#8217;,'Nepal&#8217;,'NPL&#8217;,'524&#8242;);<br />
INSERT INTO country VALUES (&#8217;NL&#8217;,'NETHERLANDS&#8217;,'Netherlands&#8217;,'NLD&#8217;,'528&#8242;);<br />
INSERT INTO country VALUES (&#8217;AN&#8217;,'NETHERLANDS ANTILLES&#8217;,'Netherlands Antilles&#8217;,'ANT&#8217;,'530&#8242;);<br />
INSERT INTO country VALUES (&#8217;NC&#8217;,'NEW CALEDONIA&#8217;,'New Caledonia&#8217;,'NCL&#8217;,'540&#8242;);<br />
INSERT INTO country VALUES (&#8217;NZ&#8217;,'NEW ZEALAND&#8217;,'New Zealand&#8217;,'NZL&#8217;,'554&#8242;);<br />
INSERT INTO country VALUES (&#8217;NI&#8217;,'NICARAGUA&#8217;,'Nicaragua&#8217;,'NIC&#8217;,'558&#8242;);<br />
INSERT INTO country VALUES (&#8217;NE&#8217;,'NIGER&#8217;,'Niger&#8217;,'NER&#8217;,'562&#8242;);<br />
INSERT INTO country VALUES (&#8217;NG&#8217;,'NIGERIA&#8217;,'Nigeria&#8217;,'NGA&#8217;,'566&#8242;);<br />
INSERT INTO country VALUES (&#8217;NU&#8217;,'NIUE&#8217;,'Niue&#8217;,'NIU&#8217;,'570&#8242;);<br />
INSERT INTO country VALUES (&#8217;NF&#8217;,'NORFOLK ISLAND&#8217;,'Norfolk Island&#8217;,'NFK&#8217;,'574&#8242;);<br />
INSERT INTO country VALUES (&#8217;MP&#8217;,'NORTHERN MARIANA ISLANDS&#8217;,'Northern Mariana Islands&#8217;,'MNP&#8217;,'580&#8242;);<br />
INSERT INTO country VALUES (&#8217;NO&#8217;,'NORWAY&#8217;,'Norway&#8217;,'NOR&#8217;,'578&#8242;);<br />
INSERT INTO country VALUES (&#8217;OM&#8217;,'OMAN&#8217;,'Oman&#8217;,'OMN&#8217;,'512&#8242;);<br />
INSERT INTO country VALUES (&#8217;PK&#8217;,'PAKISTAN&#8217;,'Pakistan&#8217;,'PAK&#8217;,'586&#8242;);<br />
INSERT INTO country VALUES (&#8217;PW&#8217;,'PALAU&#8217;,'Palau&#8217;,'PLW&#8217;,'585&#8242;);<br />
INSERT INTO country VALUES (&#8217;PS&#8217;,'PALESTINIAN TERRITORY, OCCUPIED&#8217;,'Palestinian Territory, Occupied&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;PA&#8217;,'PANAMA&#8217;,'Panama&#8217;,'PAN&#8217;,'591&#8242;);<br />
INSERT INTO country VALUES (&#8217;PG&#8217;,'PAPUA NEW GUINEA&#8217;,'Papua New Guinea&#8217;,'PNG&#8217;,'598&#8242;);<br />
INSERT INTO country VALUES (&#8217;PY&#8217;,'PARAGUAY&#8217;,'Paraguay&#8217;,'PRY&#8217;,'600&#8242;);<br />
INSERT INTO country VALUES (&#8217;PE&#8217;,'PERU&#8217;,'Peru&#8217;,'PER&#8217;,'604&#8242;);<br />
INSERT INTO country VALUES (&#8217;PH&#8217;,'PHILIPPINES&#8217;,'Philippines&#8217;,'PHL&#8217;,'608&#8242;);<br />
INSERT INTO country VALUES (&#8217;PN&#8217;,'PITCAIRN&#8217;,'Pitcairn&#8217;,'PCN&#8217;,'612&#8242;);<br />
INSERT INTO country VALUES (&#8217;PL&#8217;,'POLAND&#8217;,'Poland&#8217;,'POL&#8217;,'616&#8242;);<br />
INSERT INTO country VALUES (&#8217;PT&#8217;,'PORTUGAL&#8217;,'Portugal&#8217;,'PRT&#8217;,'620&#8242;);<br />
INSERT INTO country VALUES (&#8217;PR&#8217;,'PUERTO RICO&#8217;,'Puerto Rico&#8217;,'PRI&#8217;,'630&#8242;);<br />
INSERT INTO country VALUES (&#8217;QA&#8217;,'QATAR&#8217;,'Qatar&#8217;,'QAT&#8217;,'634&#8242;);<br />
INSERT INTO country VALUES (&#8217;RE&#8217;,'REUNION&#8217;,'Reunion&#8217;,'REU&#8217;,'638&#8242;);<br />
INSERT INTO country VALUES (&#8217;RO&#8217;,'ROMANIA&#8217;,'Romania&#8217;,'ROM&#8217;,'642&#8242;);<br />
INSERT INTO country VALUES (&#8217;RU&#8217;,'RUSSIAN FEDERATION&#8217;,'Russian Federation&#8217;,'RUS&#8217;,'643&#8242;);<br />
INSERT INTO country VALUES (&#8217;RW&#8217;,'RWANDA&#8217;,'Rwanda&#8217;,'RWA&#8217;,'646&#8242;);<br />
INSERT INTO country VALUES (&#8217;SH&#8217;,'SAINT HELENA&#8217;,'Saint Helena&#8217;,'SHN&#8217;,'654&#8242;);<br />
INSERT INTO country VALUES (&#8217;KN&#8217;,'SAINT KITTS AND NEVIS&#8217;,'Saint Kitts and Nevis&#8217;,'KNA&#8217;,'659&#8242;);<br />
INSERT INTO country VALUES (&#8217;LC&#8217;,'SAINT LUCIA&#8217;,'Saint Lucia&#8217;,'LCA&#8217;,'662&#8242;);<br />
INSERT INTO country VALUES (&#8217;PM&#8217;,'SAINT PIERRE AND MIQUELON&#8217;,'Saint Pierre and Miquelon&#8217;,'SPM&#8217;,'666&#8242;);<br />
INSERT INTO country VALUES (&#8217;VC&#8217;,'SAINT VINCENT AND THE GRENADINES&#8217;,'Saint Vincent and the Grenadines&#8217;,'VCT&#8217;,'670&#8242;);<br />
INSERT INTO country VALUES (&#8217;WS&#8217;,'SAMOA&#8217;,'Samoa&#8217;,'WSM&#8217;,'882&#8242;);<br />
INSERT INTO country VALUES (&#8217;SM&#8217;,'SAN MARINO&#8217;,'San Marino&#8217;,'SMR&#8217;,'674&#8242;);<br />
INSERT INTO country VALUES (&#8217;ST&#8217;,'SAO TOME AND PRINCIPE&#8217;,'Sao Tome and Principe&#8217;,'STP&#8217;,'678&#8242;);<br />
INSERT INTO country VALUES (&#8217;SA&#8217;,'SAUDI ARABIA&#8217;,'Saudi Arabia&#8217;,'SAU&#8217;,'682&#8242;);<br />
INSERT INTO country VALUES (&#8217;SN&#8217;,'SENEGAL&#8217;,'Senegal&#8217;,'SEN&#8217;,'686&#8242;);<br />
INSERT INTO country VALUES (&#8217;CS&#8217;,'SERBIA AND MONTENEGRO&#8217;,'Serbia and Montenegro&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;SC&#8217;,'SEYCHELLES&#8217;,'Seychelles&#8217;,'SYC&#8217;,'690&#8242;);<br />
INSERT INTO country VALUES (&#8217;SL&#8217;,'SIERRA LEONE&#8217;,'Sierra Leone&#8217;,'SLE&#8217;,'694&#8242;);<br />
INSERT INTO country VALUES (&#8217;SG&#8217;,'SINGAPORE&#8217;,'Singapore&#8217;,'SGP&#8217;,'702&#8242;);<br />
INSERT INTO country VALUES (&#8217;SK&#8217;,'SLOVAKIA&#8217;,'Slovakia&#8217;,'SVK&#8217;,'703&#8242;);<br />
INSERT INTO country VALUES (&#8217;SI&#8217;,'SLOVENIA&#8217;,'Slovenia&#8217;,'SVN&#8217;,'705&#8242;);<br />
INSERT INTO country VALUES (&#8217;SB&#8217;,'SOLOMON ISLANDS&#8217;,'Solomon Islands&#8217;,'SLB&#8217;,'090&#8242;);<br />
INSERT INTO country VALUES (&#8217;SO&#8217;,'SOMALIA&#8217;,'Somalia&#8217;,'SOM&#8217;,'706&#8242;);<br />
INSERT INTO country VALUES (&#8217;ZA&#8217;,'SOUTH AFRICA&#8217;,'South Africa&#8217;,'ZAF&#8217;,'710&#8242;);<br />
INSERT INTO country VALUES (&#8217;GS&#8217;,'SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS&#8217;,'South Georgia and the South Sandwich Islands&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;ES&#8217;,'SPAIN&#8217;,'Spain&#8217;,'ESP&#8217;,'724&#8242;);<br />
INSERT INTO country VALUES (&#8217;LK&#8217;,'SRI LANKA&#8217;,'Sri Lanka&#8217;,'LKA&#8217;,'144&#8242;);<br />
INSERT INTO country VALUES (&#8217;SD&#8217;,'SUDAN&#8217;,'Sudan&#8217;,'SDN&#8217;,'736&#8242;);<br />
INSERT INTO country VALUES (&#8217;SR&#8217;,'SURINAME&#8217;,'Suriname&#8217;,'SUR&#8217;,'740&#8242;);<br />
INSERT INTO country VALUES (&#8217;SJ&#8217;,'SVALBARD AND JAN MAYEN&#8217;,'Svalbard and Jan Mayen&#8217;,'SJM&#8217;,'744&#8242;);<br />
INSERT INTO country VALUES (&#8217;SZ&#8217;,'SWAZILAND&#8217;,'Swaziland&#8217;,'SWZ&#8217;,'748&#8242;);<br />
INSERT INTO country VALUES (&#8217;SE&#8217;,'SWEDEN&#8217;,'Sweden&#8217;,'SWE&#8217;,'752&#8242;);<br />
INSERT INTO country VALUES (&#8217;CH&#8217;,'SWITZERLAND&#8217;,'Switzerland&#8217;,'CHE&#8217;,'756&#8242;);<br />
INSERT INTO country VALUES (&#8217;SY&#8217;,'SYRIAN ARAB REPUBLIC&#8217;,'Syrian Arab Republic&#8217;,'SYR&#8217;,'760&#8242;);<br />
INSERT INTO country VALUES (&#8217;TW&#8217;,'TAIWAN, PROVINCE OF CHINA&#8217;,'Taiwan, Province of China&#8217;,'TWN&#8217;,'158&#8242;);<br />
INSERT INTO country VALUES (&#8217;TJ&#8217;,'TAJIKISTAN&#8217;,'Tajikistan&#8217;,'TJK&#8217;,'762&#8242;);<br />
INSERT INTO country VALUES (&#8217;TZ&#8217;,'TANZANIA, UNITED REPUBLIC OF&#8217;,'Tanzania, United Republic of&#8217;,'TZA&#8217;,'834&#8242;);<br />
INSERT INTO country VALUES (&#8217;TH&#8217;,'THAILAND&#8217;,'Thailand&#8217;,'THA&#8217;,'764&#8242;);<br />
INSERT INTO country VALUES (&#8217;TL&#8217;,'TIMOR-LESTE&#8217;,'Timor-Leste&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;TG&#8217;,'TOGO&#8217;,'Togo&#8217;,'TGO&#8217;,'768&#8242;);<br />
INSERT INTO country VALUES (&#8217;TK&#8217;,'TOKELAU&#8217;,'Tokelau&#8217;,'TKL&#8217;,'772&#8242;);<br />
INSERT INTO country VALUES (&#8217;TO&#8217;,'TONGA&#8217;,'Tonga&#8217;,'TON&#8217;,'776&#8242;);<br />
INSERT INTO country VALUES (&#8217;TT&#8217;,'TRINIDAD AND TOBAGO&#8217;,'Trinidad and Tobago&#8217;,'TTO&#8217;,'780&#8242;);<br />
INSERT INTO country VALUES (&#8217;TN&#8217;,'TUNISIA&#8217;,'Tunisia&#8217;,'TUN&#8217;,'788&#8242;);<br />
INSERT INTO country VALUES (&#8217;TR&#8217;,'TURKEY&#8217;,'Turkey&#8217;,'TUR&#8217;,'792&#8242;);<br />
INSERT INTO country VALUES (&#8217;TM&#8217;,'TURKMENISTAN&#8217;,'Turkmenistan&#8217;,'TKM&#8217;,'795&#8242;);<br />
INSERT INTO country VALUES (&#8217;TC&#8217;,'TURKS AND CAICOS ISLANDS&#8217;,'Turks and Caicos Islands&#8217;,'TCA&#8217;,'796&#8242;);<br />
INSERT INTO country VALUES (&#8217;TV&#8217;,'TUVALU&#8217;,'Tuvalu&#8217;,'TUV&#8217;,'798&#8242;);<br />
INSERT INTO country VALUES (&#8217;UG&#8217;,'UGANDA&#8217;,'Uganda&#8217;,'UGA&#8217;,'800&#8242;);<br />
INSERT INTO country VALUES (&#8217;UA&#8217;,'UKRAINE&#8217;,'Ukraine&#8217;,'UKR&#8217;,'804&#8242;);<br />
INSERT INTO country VALUES (&#8217;AE&#8217;,'UNITED ARAB EMIRATES&#8217;,'United Arab Emirates&#8217;,'ARE&#8217;,'784&#8242;);<br />
INSERT INTO country VALUES (&#8217;GB&#8217;,'UNITED KINGDOM&#8217;,'United Kingdom&#8217;,'GBR&#8217;,'826&#8242;);<br />
INSERT INTO country VALUES (&#8217;US&#8217;,'UNITED STATES&#8217;,'United States&#8217;,'USA&#8217;,'840&#8242;);<br />
INSERT INTO country VALUES (&#8217;UM&#8217;,'UNITED STATES MINOR OUTLYING ISLANDS&#8217;,'United States Minor Outlying Islands&#8217;,NULL,NULL);<br />
INSERT INTO country VALUES (&#8217;UY&#8217;,'URUGUAY&#8217;,'Uruguay&#8217;,'URY&#8217;,'858&#8242;);<br />
INSERT INTO country VALUES (&#8217;UZ&#8217;,'UZBEKISTAN&#8217;,'Uzbekistan&#8217;,'UZB&#8217;,'860&#8242;);<br />
INSERT INTO country VALUES (&#8217;VU&#8217;,'VANUATU&#8217;,'Vanuatu&#8217;,'VUT&#8217;,'548&#8242;);<br />
INSERT INTO country VALUES (&#8217;VE&#8217;,'VENEZUELA&#8217;,'Venezuela&#8217;,'VEN&#8217;,'862&#8242;);<br />
INSERT INTO country VALUES (&#8217;VN&#8217;,'VIET NAM&#8217;,'Viet Nam&#8217;,'VNM&#8217;,'704&#8242;);<br />
INSERT INTO country VALUES (&#8217;VG&#8217;,'VIRGIN ISLANDS, BRITISH&#8217;,'Virgin Islands, British&#8217;,'VGB&#8217;,'092&#8242;);<br />
INSERT INTO country VALUES (&#8217;VI&#8217;,'VIRGIN ISLANDS, U.S.&#8217;,'Virgin Islands, U.s.&#8217;,'VIR&#8217;,'850&#8242;);<br />
INSERT INTO country VALUES (&#8217;WF&#8217;,'WALLIS AND FUTUNA&#8217;,'Wallis and Futuna&#8217;,'WLF&#8217;,'876&#8242;);<br />
INSERT INTO country VALUES (&#8217;EH&#8217;,'WESTERN SAHARA&#8217;,'Western Sahara&#8217;,'ESH&#8217;,'732&#8242;);<br />
INSERT INTO country VALUES (&#8217;YE&#8217;,'YEMEN&#8217;,'Yemen&#8217;,'YEM&#8217;,'887&#8242;);<br />
INSERT INTO country VALUES (&#8217;ZM&#8217;,'ZAMBIA&#8217;,'Zambia&#8217;,'ZMB&#8217;,'894&#8242;);<br />
INSERT INTO country VALUES (&#8217;ZW&#8217;,'ZIMBABWE&#8217;,'Zimbabwe&#8217;,'ZWE&#8217;,'716&#8242;);</p></blockquote>
<p>Now your application has a great countries list , good luck !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/mysql-countries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make your life longer with fantastico script</title>
		<link>http://www.hostsblog.com/make-your-life-longer-with-fantastico-script/</link>
		<comments>http://www.hostsblog.com/make-your-life-longer-with-fantastico-script/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 01:38:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[fantastico script]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=87</guid>
		<description><![CDATA[Fantastico is a commercial script that automates the installation of web applications to a website. Fantastico could be accessed from hosting cpanel with just one click. Once you are inside of fantastico cpanel you can easily install applications like forums, online shops, website builders like drupal, php nuke, blog apoplications like wordpress.
Fantastico claims that it was installed on 10000 hosting servers and millions of users are using it.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hostsblog.com/wp-content/uploads/2009/06/fantastico_script.gif"><img class="alignright size-full wp-image-88" title="fantastico_script" src="http://www.hostsblog.com/wp-content/uploads/2009/06/fantastico_script.gif" alt="fantastico_script" width="217" height="122" /></a>Fantastico is a commercial script that automates the installation of web applications to a website. Fantastico could be accessed from hosting cpanel with just one click. Once you are inside of fantastico cpanel you can easily install applications like forums, online shops, website builders like drupal, php nuke, blog apoplications like wordpress.</p>
<p>Fantastico claims that it was installed on 10000 hosting servers and millions of users are using it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/make-your-life-longer-with-fantastico-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awstats review</title>
		<link>http://www.hostsblog.com/awstats-review/</link>
		<comments>http://www.hostsblog.com/awstats-review/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 00:22:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[hosting]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[web statistics]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=84</guid>
		<description><![CDATA[
Awstats is a great free and powerful traffic statistics tool. Awstats works as a cgi script or could be called from a command line. Awstats collects any possible hosting activity. Many linux based hosting companies use Awstats as a default server statistics generating script.  Awstats generates collected result in a graffical view structure.
Hostgator hosting has Awstats as a default statistic tool installed, it easily accessed by clicking on &#8220;Awstats&#8221; icon inside of your hostgator hosting cpanel you don&#8217;t even need to search for additional plugins or install Awstats yourself on ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.hostsblog.com/wp-content/uploads/2009/06/awstats.png"><img class="alignright size-medium wp-image-85" title="awstats" src="http://www.hostsblog.com/wp-content/uploads/2009/06/awstats-300x173.png" alt="awstats" width="300" height="173" /></a></p>
<p>Awstats is a great free and powerful traffic statistics tool. Awstats works as a cgi script or could be called from a command line. Awstats collects any possible hosting activity. Many linux based hosting companies use Awstats as a default server statistics generating script.  Awstats generates collected result in a graffical view structure.</p>
<p><a href="http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=genetrix" target="_blank">Hostgator hosting</a> has Awstats as a default statistic tool installed, it easily accessed by clicking on &#8220;Awstats&#8221; icon inside of your <a href="http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=genetrix" target="_blank">hostgator hosting cpanel</a> you don&#8217;t even need to search for additional plugins or install Awstats yourself on hostgator hosting. Your website statistics generated automatically once first impression was made to your server. It is also collects every single server error in a log file, and also tracked in awstats panel.</p>
<p>Awstats is an another great benefit of linux hosting with cpanel as hostgator hosting and other hostings that support awstats.</p>
<p>You will be better impressed from inside, visit awstats live demo page <a href="http://www.nltechno.com/awstats/awstats.pl?config=destailleur.fr" target="_blank">here </a></p>
<p>You can always share your experience with Awstats in comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/awstats-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu rewrite rule for zend framework</title>
		<link>http://www.hostsblog.com/ubuntu-rewrite-rule-for-zend-framework/</link>
		<comments>http://www.hostsblog.com/ubuntu-rewrite-rule-for-zend-framework/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 14:42:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=62</guid>
		<description><![CDATA[Now it&#8217;s a good time to install ubuntu on your PC and to delete windows forever. It is very easy to develop serious applications with PHP Zend Framework . We suppose you are Ubuntu user, and we have a good tip for you how to create virtual host with your apache and how to point apache to proper zend framework directory.
To create rewrite rule for coding with Zend Framework you will need to configure apache virtual host for your new project, open etc/apache2/sites-enabled directory, you will see file called 000-default, ...]]></description>
			<content:encoded><![CDATA[<p>Now it&#8217;s a good time to install ubuntu on your PC and to delete windows forever. It is very easy to develop serious applications with PHP Zend Framework . We suppose you are Ubuntu user, and we have a good tip for you how to create virtual host with your apache and how to point apache to proper zend framework directory.<span id="more-62"></span></p>
<p>To create rewrite rule for coding with Zend Framework you will need to configure apache virtual host for your new project, open etc/apache2/sites-enabled directory, you will see file called 000-default, this is default apache configuration file you will need to create new file called just like your project directory. For example, in your var/www/  directory you have a folder named /zendtest , created file should be called zendtest</p>
<p>edit this file and insert following lines , in any place I added &#8220;zendtest&#8221;, change it with your project name.</p>
<blockquote><p>Our directory structure is just like mentioned on  Zend Framework Quick start, please visit Zend Framework website for more information.</p>
<p>&lt;VirtualHost zendtest:80&gt;<br />
ServerAdmin webmaster@localhost<br />
ServerName zendtest</p>
<p>DocumentRoot /var/www/zendtest/public<br />
ErrorLog /var/log/apache2/mysite_error.log<br />
CustomLog /var/log/apache2/mysite_access.log combined</p>
<p># this entry is necessary to allow the virtual host to enable mod rewrite using htaccess</p>
<p>&lt;Directory /var/www/zendtest/public&gt;<br />
Options Indexes FollowSymLinks<br />
AllowOverride All<br />
allow from all<br />
&lt;/Directory&gt;<br />
&lt;/VirtualHost&gt;</p></blockquote>
<p>We hope it was helpful to start coding with zend framework, if you have any trouble, post comments, we will help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/ubuntu-rewrite-rule-for-zend-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Photoshop PSD reading class</title>
		<link>http://www.hostsblog.com/php-photoshop-psd-reading-class/</link>
		<comments>http://www.hostsblog.com/php-photoshop-psd-reading-class/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 14:07:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Developing]]></category>
		<category><![CDATA[PHP PSD Class]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=59</guid>
		<description><![CDATA[If you create any website that influenced in uploading and showing PSD files, you can use this PHP class to display adobe photoshop files on your website.
This class uses GD library, it reads PSD file structure and converts it into image file. 
 &#60;?
/* This file is released under the GPL, any version you like
*
*    PHP PSD reader class, v1.3
*
*    By Tim de Koning
*
*    Kingsquare Information Services, 22 jan 2007
*
*    example use:
*    ------------
*    &#60;?php
*    include_once('classPhpPsdReader.php')
*    header("Content-type: image/jpeg");
*    print imagejpeg(imagecreatefrompsd('test.psd'));
*    ?&#62;
*
*    More info, bugs or requests, contact info@kingsquare.nl
*
*    Latest version and demo: http://www.kingsquare.nl/phppsdreader
*
*    TODO
*    ----
*    - read color values for "multichannel data" PSD files
*    - find and implement (hunter)lab to RGB algorithm
*/
class PhpPsdReader {
var $infoArray;
var $fp;
var $fileName;
var $tempFileName;
var $colorBytesLength;
function PhpPsdReader($fileName) {
set_time_limit(0);
$this-&#62;infoArray = array();
$this-&#62;fileName = $fileName;
$this-&#62;fp = fopen($this-&#62;fileName,&#8216;r&#8217;);
if (fread($this-&#62;fp,4)==&#8216;8BPS&#8217;) {
$this-&#62;infoArray['version id'] = $this-&#62;_getInteger(2);
fseek($this-&#62;fp,6,SEEK_CUR); // 6 bytes of 0&#8217;s
$this-&#62;infoArray['channels'] = $this-&#62;_getInteger(2);
$this-&#62;infoArray['rows'] = $this-&#62;_getInteger(4);
$this-&#62;infoArray['columns'] = $this-&#62;_getInteger(4);
$this-&#62;infoArray['colorDepth'] = $this-&#62;_getInteger(2);
$this-&#62;infoArray['colorMode'] = $this-&#62;_getInteger(2);
/* COLOR MODE DATA SECTION */ //4bytes Length The length of the following color data.
$this-&#62;infoArray['colorModeDataSectionLength'] = $this-&#62;_getInteger(4);
fseek($this-&#62;fp,$this-&#62;infoArray['colorModeDataSectionLength'],SEEK_CUR); // ignore this snizzle
/*  IMAGE RESOURCES */
$this-&#62;infoArray['imageResourcesSectionLength'] = $this-&#62;_getInteger(4);
fseek($this-&#62;fp,$this-&#62;infoArray['imageResourcesSectionLength'],SEEK_CUR); // ignore this snizzle
/*  LAYER AND MASK */
$this-&#62;infoArray['layerMaskDataSectionLength'] = $this-&#62;_getInteger(4);
fseek($this-&#62;fp,$this-&#62;infoArray['layerMaskDataSectionLength'],SEEK_CUR); // ignore this snizzle
/*  IMAGE DATA */
$this-&#62;infoArray['compressionType'] = $this-&#62;_getInteger(2);
$this-&#62;infoArray['oneColorChannelPixelBytes'] = $this-&#62;infoArray['colorDepth']/8;
$this-&#62;colorBytesLength = $this-&#62;infoArray['rows']*$this-&#62;infoArray['columns']*$this-&#62;infoArray['oneColorChannelPixelBytes'];
if ($this-&#62;infoArray['colorMode']==2) {
$this-&#62;infoArray['error'] = &#8216;images with indexed colours are not supported yet&#8217;;
return false;
}
} else {
$this-&#62;infoArray['error'] = &#8216;invalid or unsupported psd&#8217;;
return false;
}
}
function getImage() {
// decompress image data if required
switch($this-&#62;infoArray['compressionType']) {
// case 2:, case 3: zip not supported yet..
case 1:
// packed bits
$this-&#62;infoArray['scanLinesByteCounts'] = array();
for ($i=0; $i&#60;($this-&#62;infoArray['rows']*$this-&#62;infoArray['channels']); $i++) $this-&#62;infoArray['scanLinesByteCounts'][] = $this-&#62;_getInteger(2);
$this-&#62;tempFileName = tempnam(realpath(&#8216;/tmp&#8217;),&#8216;decompressedImageData&#8217;);
$tfp = fopen($this-&#62;tempFileName,&#8216;wb&#8217;);
foreach ($this-&#62;infoArray['scanLinesByteCounts'] as $scanLinesByteCount) {
fwrite($tfp,$this-&#62;_getPackedBitsDecoded(fread($this-&#62;fp,$scanLinesByteCount)));
}
fclose($tfp);
fclose($this-&#62;fp);
$this-&#62;fp = ...]]></description>
			<content:encoded><![CDATA[<p>If you create any website that influenced in uploading and showing PSD files, you can use this PHP class to display adobe photoshop files on your website.</p>
<p>This class uses GD library, it reads PSD file structure and converts it into image file. <span id="more-59"></span></p>
<blockquote><p><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;?<br />
</span><span style="color: #808080;">/* This file is released under the GPL, any version you like<br />
*<br />
*    PHP PSD reader class, v1.3<br />
*<br />
*    By Tim de Koning<br />
*<br />
*    Kingsquare Information Services, 22 jan 2007<br />
*<br />
*    example use:<br />
*    ------------<br />
*    &lt;?php<br />
*    include_once('classPhpPsdReader.php')<br />
*    header("Content-type: image/jpeg");<br />
*    print imagejpeg(imagecreatefrompsd('test.psd'));<br />
*    ?&gt;<br />
*<br />
*    More info, bugs or requests, contact info@kingsquare.nl<br />
*<br />
*    Latest version and demo: http://www.kingsquare.nl/phppsdreader<br />
*<br />
*    TODO<br />
*    ----<br />
*    - read color values for "multichannel data" PSD files<br />
*    - find and implement (hunter)lab to RGB algorithm</span></span></code></p>
<p>*/</p>
<p><span style="color: #004000;">class </span><span style="color: #0000bb;">PhpPsdReader </span><span style="color: #004000;">{<br />
var </span><span style="color: #0000bb;">$infoArray</span><span style="color: #004000;">;<br />
var </span><span style="color: #0000bb;">$fp</span><span style="color: #004000;">;<br />
var </span><span style="color: #0000bb;">$fileName</span><span style="color: #004000;">;<br />
var </span><span style="color: #0000bb;">$tempFileName</span><span style="color: #004000;">;<br />
var </span><span style="color: #0000bb;">$colorBytesLength</span><span style="color: #004000;">;</span></p>
<p>function <span style="color: #0000bb;">PhpPsdReader</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$fileName</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">set_time_limit</span><span style="color: #004000;">(</span><span style="color: #0000bb;">0</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray </span><span style="color: #004000;">= array();<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fileName </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$fileName</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp </span><span style="color: #004000;">= </span><span style="color: #0000bb;">fopen</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fileName</span><span style="color: #004000;">,</span><span style="color: #c00000;">&#8216;r&#8217;</span><span style="color: #004000;">);</span></p>
<p>if (<span style="color: #0000bb;">fread</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">4</span><span style="color: #004000;">)==</span><span style="color: #c00000;">&#8216;8BPS&#8217;</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'version id'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">6</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">); </span><span style="color: #808080;">// 6 bytes of 0&#8217;s<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'channels'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'rows'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">4</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'columns'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">4</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorDepth'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorMode'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);</span></p>
<p><span style="color: #808080;">/* COLOR MODE DATA SECTION */ //4bytes Length The length of the following color data.<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorModeDataSectionLength'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">4</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorModeDataSectionLength'</span><span style="color: #004000;">],</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">); </span><span style="color: #808080;">// ignore this snizzle</span></p>
<p>/*  IMAGE RESOURCES */<br />
<span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'imageResourcesSectionLength'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">4</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'imageResourcesSectionLength'</span><span style="color: #004000;">],</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">); </span><span style="color: #808080;">// ignore this snizzle</span></p>
<p>/*  LAYER AND MASK */<br />
<span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'layerMaskDataSectionLength'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">4</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'layerMaskDataSectionLength'</span><span style="color: #004000;">],</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">); </span><span style="color: #808080;">// ignore this snizzle</span></p>
<p>/*  IMAGE DATA */<br />
<span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'compressionType'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorDepth'</span><span style="color: #004000;">]/</span><span style="color: #0000bb;">8</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'rows'</span><span style="color: #004000;">]*</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'columns'</span><span style="color: #004000;">]*</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">];</span></p>
<p>if (<span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorMode'</span><span style="color: #004000;">]==</span><span style="color: #0000bb;">2</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'error'</span><span style="color: #004000;">] = </span><span style="color: #c00000;">&#8216;images with indexed colours are not supported yet&#8217;</span><span style="color: #004000;">;<br />
return </span><span style="color: #0000bb;">false</span><span style="color: #004000;">;<br />
}<br />
} else {<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'error'</span><span style="color: #004000;">] = </span><span style="color: #c00000;">&#8216;invalid or unsupported psd&#8217;</span><span style="color: #004000;">;<br />
return </span><span style="color: #0000bb;">false</span><span style="color: #004000;">;<br />
}<br />
}</span></p>
<p>function <span style="color: #0000bb;">getImage</span><span style="color: #004000;">() {<br />
</span><span style="color: #808080;">// decompress image data if required<br />
</span><span style="color: #004000;">switch(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'compressionType'</span><span style="color: #004000;">]) {<br />
</span><span style="color: #808080;">// case 2:, case 3: zip not supported yet..<br />
</span><span style="color: #004000;">case </span><span style="color: #0000bb;">1</span><span style="color: #004000;">:<br />
</span><span style="color: #808080;">// packed bits<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'scanLinesByteCounts'</span><span style="color: #004000;">] = array();<br />
for (</span><span style="color: #0000bb;">$i</span><span style="color: #004000;">=</span><span style="color: #0000bb;">0</span><span style="color: #004000;">; </span><span style="color: #0000bb;">$i</span><span style="color: #004000;">&lt;(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'rows'</span><span style="color: #004000;">]*</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'channels'</span><span style="color: #004000;">]); </span><span style="color: #0000bb;">$i</span><span style="color: #004000;">++) </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'scanLinesByteCounts'</span><span style="color: #004000;">][] = </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">tempFileName </span><span style="color: #004000;">= </span><span style="color: #0000bb;">tempnam</span><span style="color: #004000;">(</span><span style="color: #0000bb;">realpath</span><span style="color: #004000;">(</span><span style="color: #c00000;">&#8216;/tmp&#8217;</span><span style="color: #004000;">),</span><span style="color: #c00000;">&#8216;decompressedImageData&#8217;</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$tfp </span><span style="color: #004000;">= </span><span style="color: #0000bb;">fopen</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">tempFileName</span><span style="color: #004000;">,</span><span style="color: #c00000;">&#8216;wb&#8217;</span><span style="color: #004000;">);<br />
foreach (</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'scanLinesByteCounts'</span><span style="color: #004000;">] as </span><span style="color: #0000bb;">$scanLinesByteCount</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">fwrite</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$tfp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getPackedBitsDecoded</span><span style="color: #004000;">(</span><span style="color: #0000bb;">fread</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$scanLinesByteCount</span><span style="color: #004000;">)));<br />
}<br />
</span><span style="color: #0000bb;">fclose</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$tfp</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fclose</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp </span><span style="color: #004000;">= </span><span style="color: #0000bb;">fopen</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">tempFileName</span><span style="color: #004000;">,</span><span style="color: #c00000;">&#8216;r&#8217;</span><span style="color: #004000;">);<br />
default:<br />
</span><span style="color: #808080;">// continue with current file handle;<br />
</span><span style="color: #004000;">break;<br />
}</span></p>
<p><span style="color: #808080;">// let&#8217;s write pixel by pixel&#8230;.<br />
</span><span style="color: #0000bb;">$image </span><span style="color: #004000;">= </span><span style="color: #0000bb;">imagecreatetruecolor</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'columns'</span><span style="color: #004000;">],</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'rows'</span><span style="color: #004000;">]);</span></p>
<p>for (<span style="color: #0000bb;">$rowPointer </span><span style="color: #004000;">= </span><span style="color: #0000bb;">0</span><span style="color: #004000;">; (</span><span style="color: #0000bb;">$rowPointer </span><span style="color: #004000;">&lt; </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'rows'</span><span style="color: #004000;">]); </span><span style="color: #0000bb;">$rowPointer</span><span style="color: #004000;">++) {<br />
for (</span><span style="color: #0000bb;">$columnPointer </span><span style="color: #004000;">= </span><span style="color: #0000bb;">0</span><span style="color: #004000;">; (</span><span style="color: #0000bb;">$columnPointer </span><span style="color: #004000;">&lt; </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'columns'</span><span style="color: #004000;">]); </span><span style="color: #0000bb;">$columnPointer</span><span style="color: #004000;">++) {<br />
</span><span style="color: #808080;">/*     The color mode of the file. Supported values are: Bitmap=0;<br />
Grayscale=1; Indexed=2; RGB=3; CMYK=4; Multichannel=7;<br />
Duotone=8; Lab=9.<br />
*/<br />
</span><span style="color: #004000;">switch (</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorMode'</span><span style="color: #004000;">]) {<br />
case </span><span style="color: #0000bb;">2</span><span style="color: #004000;">: </span><span style="color: #808080;">// indexed&#8230; info should be able to extract from color mode data section. not implemented yet, so is grayscale<br />
</span><span style="color: #004000;">exit;<br />
break;<br />
case </span><span style="color: #0000bb;">0</span><span style="color: #004000;">:<br />
</span><span style="color: #808080;">// bit by bit<br />
</span><span style="color: #004000;">if (</span><span style="color: #0000bb;">$columnPointer </span><span style="color: #004000;">== </span><span style="color: #0000bb;">0</span><span style="color: #004000;">) </span><span style="color: #0000bb;">$bitPointer </span><span style="color: #004000;">= </span><span style="color: #0000bb;">0</span><span style="color: #004000;">;<br />
if (</span><span style="color: #0000bb;">$bitPointer</span><span style="color: #004000;">==</span><span style="color: #0000bb;">0</span><span style="color: #004000;">) </span><span style="color: #0000bb;">$currentByteBits </span><span style="color: #004000;">= </span><span style="color: #0000bb;">str_pad</span><span style="color: #004000;">(</span><span style="color: #0000bb;">base_convert</span><span style="color: #004000;">(</span><span style="color: #0000bb;">bin2hex</span><span style="color: #004000;">(</span><span style="color: #0000bb;">fread</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">1</span><span style="color: #004000;">)), </span><span style="color: #0000bb;">16</span><span style="color: #004000;">, </span><span style="color: #0000bb;">2</span><span style="color: #004000;">),</span><span style="color: #0000bb;">8</span><span style="color: #004000;">,</span><span style="color: #c00000;">&#8216;0&#8242;</span><span style="color: #004000;">,</span><span style="color: #0000bb;">STR_PAD_LEFT</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= ((</span><span style="color: #0000bb;">$currentByteBits</span><span style="color: #004000;">[</span><span style="color: #0000bb;">$bitPointer</span><span style="color: #004000;">]==</span><span style="color: #c00000;">&#8216;1&#8242;</span><span style="color: #004000;">)?</span><span style="color: #0000bb;">0</span><span style="color: #004000;">:</span><span style="color: #0000bb;">255</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$bitPointer</span><span style="color: #004000;">++;<br />
if (</span><span style="color: #0000bb;">$bitPointer</span><span style="color: #004000;">==</span><span style="color: #0000bb;">8</span><span style="color: #004000;">) </span><span style="color: #0000bb;">$bitPointer </span><span style="color: #004000;">= </span><span style="color: #0000bb;">0</span><span style="color: #004000;">;<br />
break;</span></p>
<p>case <span style="color: #0000bb;">1</span><span style="color: #004000;">:<br />
case </span><span style="color: #0000bb;">8</span><span style="color: #004000;">: </span><span style="color: #808080;">// 8 is indexed with 1 color&#8230;, so grayscale<br />
</span><span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
break;</span></p>
<p>case <span style="color: #0000bb;">4</span><span style="color: #004000;">: </span><span style="color: #808080;">// CMYK<br />
</span><span style="color: #0000bb;">$c </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">$currentPointerPos </span><span style="color: #004000;">= </span><span style="color: #0000bb;">ftell</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$m </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$y </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$k </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$currentPointerPos</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">round</span><span style="color: #004000;">((</span><span style="color: #0000bb;">$c </span><span style="color: #004000;">* </span><span style="color: #0000bb;">$k</span><span style="color: #004000;">) / (</span><span style="color: #0000bb;">pow</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorDepth'</span><span style="color: #004000;">])-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">));<br />
</span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">round</span><span style="color: #004000;">((</span><span style="color: #0000bb;">$m </span><span style="color: #004000;">* </span><span style="color: #0000bb;">$k</span><span style="color: #004000;">) / (</span><span style="color: #0000bb;">pow</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorDepth'</span><span style="color: #004000;">])-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">));<br />
</span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">round</span><span style="color: #004000;">((</span><span style="color: #0000bb;">$y </span><span style="color: #004000;">* </span><span style="color: #0000bb;">$k</span><span style="color: #004000;">) / (</span><span style="color: #0000bb;">pow</span><span style="color: #004000;">(</span><span style="color: #0000bb;">2</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'colorDepth'</span><span style="color: #004000;">])-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">));</span></p>
<p>break;</p>
<p>case <span style="color: #0000bb;">9</span><span style="color: #004000;">: </span><span style="color: #808080;">// hunter Lab<br />
// i still need an understandable lab2rgb convert algorithm&#8230; if you have one, please let me know!<br />
</span><span style="color: #0000bb;">$l </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">$currentPointerPos </span><span style="color: #004000;">= </span><span style="color: #0000bb;">ftell</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$a </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$currentPointerPos</span><span style="color: #004000;">);</span></p>
<p><span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$l</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$a</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$b</span><span style="color: #004000;">;</span></p>
<p>break;<br />
default:<br />
<span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">$currentPointerPos </span><span style="color: #004000;">= </span><span style="color: #0000bb;">ftell</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">colorBytesLength</span><span style="color: #004000;">-</span><span style="color: #0000bb;">1</span><span style="color: #004000;">,</span><span style="color: #0000bb;">SEEK_CUR</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]);<br />
</span><span style="color: #0000bb;">fseek</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$currentPointerPos</span><span style="color: #004000;">);<br />
break;</span></p>
<p>}</p>
<p>if ((<span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]==</span><span style="color: #0000bb;">2</span><span style="color: #004000;">)) {<br />
</span><span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$r </span><span style="color: #004000;">&gt;&gt; </span><span style="color: #0000bb;">8</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$g </span><span style="color: #004000;">&gt;&gt; </span><span style="color: #0000bb;">8</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$b </span><span style="color: #004000;">&gt;&gt; </span><span style="color: #0000bb;">8</span><span style="color: #004000;">;<br />
} elseif ((</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'oneColorChannelPixelBytes'</span><span style="color: #004000;">]==</span><span style="color: #0000bb;">4</span><span style="color: #004000;">)) {<br />
</span><span style="color: #0000bb;">$r </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$r </span><span style="color: #004000;">&gt;&gt; </span><span style="color: #0000bb;">24</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$g </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$g </span><span style="color: #004000;">&gt;&gt; </span><span style="color: #0000bb;">24</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$b </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$b </span><span style="color: #004000;">&gt;&gt; </span><span style="color: #0000bb;">24</span><span style="color: #004000;">;<br />
}</span></p>
<p><span style="color: #0000bb;">$pixelColor </span><span style="color: #004000;">= </span><span style="color: #0000bb;">imagecolorallocate</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$image</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$r</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$g</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$b</span><span style="color: #004000;">);<br />
</span><span style="color: #0000bb;">imagesetpixel</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$image</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$columnPointer</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$rowPointer</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$pixelColor</span><span style="color: #004000;">);<br />
}<br />
}<br />
</span><span style="color: #0000bb;">fclose</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">);<br />
if (isset(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">tempFileName</span><span style="color: #004000;">)) </span><span style="color: #0000bb;">unlink</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">tempFileName</span><span style="color: #004000;">);<br />
return </span><span style="color: #0000bb;">$image</span><span style="color: #004000;">;<br />
}</span></p>
<p><span style="color: #808080;">/**<br />
*<br />
* PRIVATE FUNCTIONS<br />
*<br />
*/</span></p>
<p><span style="color: #004000;">function </span><span style="color: #0000bb;">_getPackedBitsDecoded</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$string</span><span style="color: #004000;">) {<br />
</span><span style="color: #808080;">/*<br />
The PackBits algorithm will precede a block of data with a one byte header n, where n is interpreted as follows:<br />
n Meaning<br />
0 to 127 Copy the next n + 1 symbols verbatim<br />
-127 to -1 Repeat the next symbol 1 - n times<br />
-128 Do nothing</span></p>
<p>Decoding:<br />
Step 1. Read the block header (n).<br />
Step 2. If the header is an EOF exit.<br />
Step 3. If n is non-negative, copy the next n + 1 symbols to the output stream and go to step 1.<br />
Step 4. If n is negative, write 1 - n copies of the next symbol to the output stream and go to step 1.</p>
<p>*/</p>
<p><span style="color: #0000bb;">$stringPointer </span><span style="color: #004000;">= </span><span style="color: #0000bb;">0</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$returnString </span><span style="color: #004000;">= </span><span style="color: #c00000;">&#8221;</span><span style="color: #004000;">;</span></p>
<p>while (<span style="color: #0000bb;">1</span><span style="color: #004000;">) {<br />
if (isset(</span><span style="color: #0000bb;">$string</span><span style="color: #004000;">[</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">])) </span><span style="color: #0000bb;">$headerByteValue </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_unsignedToSigned</span><span style="color: #004000;">(</span><span style="color: #0000bb;">hexdec</span><span style="color: #004000;">(</span><span style="color: #0000bb;">bin2hex</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$string</span><span style="color: #004000;">[</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">])),</span><span style="color: #0000bb;">1</span><span style="color: #004000;">);<br />
else return </span><span style="color: #0000bb;">$returnString</span><span style="color: #004000;">;<br />
</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">++;</span></p>
<p>if (<span style="color: #0000bb;">$headerByteValue </span><span style="color: #004000;">&gt;= </span><span style="color: #0000bb;">0</span><span style="color: #004000;">) {<br />
for (</span><span style="color: #0000bb;">$i</span><span style="color: #004000;">=</span><span style="color: #0000bb;">0</span><span style="color: #004000;">; </span><span style="color: #0000bb;">$i </span><span style="color: #004000;">&lt;= </span><span style="color: #0000bb;">$headerByteValue</span><span style="color: #004000;">; </span><span style="color: #0000bb;">$i</span><span style="color: #004000;">++) {<br />
</span><span style="color: #0000bb;">$returnString </span><span style="color: #004000;">.= </span><span style="color: #0000bb;">$string</span><span style="color: #004000;">[</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">];<br />
</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">++;<br />
}<br />
} else {<br />
if (</span><span style="color: #0000bb;">$headerByteValue </span><span style="color: #004000;">!= -</span><span style="color: #0000bb;">128</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">$copyByte </span><span style="color: #004000;">= </span><span style="color: #0000bb;">$string</span><span style="color: #004000;">[</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">];<br />
</span><span style="color: #0000bb;">$stringPointer</span><span style="color: #004000;">++;</span></p>
<p>for (<span style="color: #0000bb;">$i</span><span style="color: #004000;">=</span><span style="color: #0000bb;">0</span><span style="color: #004000;">; </span><span style="color: #0000bb;">$i </span><span style="color: #004000;">&lt; (</span><span style="color: #0000bb;">1</span><span style="color: #004000;">-</span><span style="color: #0000bb;">$headerByteValue</span><span style="color: #004000;">); </span><span style="color: #0000bb;">$i</span><span style="color: #004000;">++) {<br />
</span><span style="color: #0000bb;">$returnString </span><span style="color: #004000;">.= </span><span style="color: #0000bb;">$copyByte</span><span style="color: #004000;">;<br />
}<br />
}<br />
}<br />
}<br />
}</span></p>
<p>function <span style="color: #0000bb;">_unsignedToSigned</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$byteSize</span><span style="color: #004000;">=</span><span style="color: #0000bb;">1</span><span style="color: #004000;">) {<br />
switch(</span><span style="color: #0000bb;">$byteSize</span><span style="color: #004000;">) {<br />
case </span><span style="color: #0000bb;">1</span><span style="color: #004000;">:<br />
if (</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">&lt;</span><span style="color: #0000bb;">128</span><span style="color: #004000;">) return </span><span style="color: #0000bb;">$int</span><span style="color: #004000;">;<br />
else return -</span><span style="color: #0000bb;">256</span><span style="color: #004000;">+</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">;<br />
break;</span></p>
<p>case <span style="color: #0000bb;">2</span><span style="color: #004000;">:<br />
if (</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">&lt;</span><span style="color: #0000bb;">32768</span><span style="color: #004000;">) return </span><span style="color: #0000bb;">$int</span><span style="color: #004000;">;<br />
else return -</span><span style="color: #0000bb;">65536</span><span style="color: #004000;">+</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">;</span></p>
<p>case <span style="color: #0000bb;">4</span><span style="color: #004000;">:<br />
if (</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">&lt;</span><span style="color: #0000bb;">2147483648</span><span style="color: #004000;">) return </span><span style="color: #0000bb;">$int</span><span style="color: #004000;">;<br />
else return -</span><span style="color: #0000bb;">4294967296</span><span style="color: #004000;">+</span><span style="color: #0000bb;">$int</span><span style="color: #004000;">;</span></p>
<p>default:<br />
return <span style="color: #0000bb;">$int</span><span style="color: #004000;">;<br />
}<br />
}</span></p>
<p>function <span style="color: #0000bb;">_hexReverse</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$hex</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">$output </span><span style="color: #004000;">= </span><span style="color: #c00000;">&#8221;</span><span style="color: #004000;">;<br />
if (</span><span style="color: #0000bb;">strlen</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$hex</span><span style="color: #004000;">)%</span><span style="color: #0000bb;">2</span><span style="color: #004000;">) return </span><span style="color: #0000bb;">false</span><span style="color: #004000;">;<br />
for (</span><span style="color: #0000bb;">$pointer </span><span style="color: #004000;">= </span><span style="color: #0000bb;">strlen</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$hex</span><span style="color: #004000;">);</span><span style="color: #0000bb;">$pointer</span><span style="color: #004000;">&gt;=</span><span style="color: #0000bb;">0</span><span style="color: #004000;">;</span><span style="color: #0000bb;">$pointer</span><span style="color: #004000;">-=</span><span style="color: #0000bb;">2</span><span style="color: #004000;">) </span><span style="color: #0000bb;">$output </span><span style="color: #004000;">.= </span><span style="color: #0000bb;">substr</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$hex</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$pointer</span><span style="color: #004000;">,</span><span style="color: #0000bb;">2</span><span style="color: #004000;">);<br />
return </span><span style="color: #0000bb;">$output</span><span style="color: #004000;">;<br />
}</span></p>
<p>function <span style="color: #0000bb;">_getInteger</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$byteCount</span><span style="color: #004000;">=</span><span style="color: #0000bb;">1</span><span style="color: #004000;">) {<br />
switch (</span><span style="color: #0000bb;">$byteCount</span><span style="color: #004000;">) {<br />
case </span><span style="color: #0000bb;">4</span><span style="color: #004000;">:<br />
</span><span style="color: #808080;">// for some strange reason this is still broken&#8230;<br />
</span><span style="color: #004000;">return @</span><span style="color: #0000bb;">reset</span><span style="color: #004000;">(</span><span style="color: #0000bb;">unpack</span><span style="color: #004000;">(</span><span style="color: #c00000;">&#8216;N&#8217;</span><span style="color: #004000;">,</span><span style="color: #0000bb;">fread</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">4</span><span style="color: #004000;">)));<br />
break;</span></p>
<p>case <span style="color: #0000bb;">2</span><span style="color: #004000;">:<br />
return @</span><span style="color: #0000bb;">reset</span><span style="color: #004000;">(</span><span style="color: #0000bb;">unpack</span><span style="color: #004000;">(</span><span style="color: #c00000;">&#8216;n&#8217;</span><span style="color: #004000;">,</span><span style="color: #0000bb;">fread</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">2</span><span style="color: #004000;">)));<br />
break;</span></p>
<p>default:<br />
return <span style="color: #0000bb;">hexdec</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">_hexReverse</span><span style="color: #004000;">(</span><span style="color: #0000bb;">bin2hex</span><span style="color: #004000;">(</span><span style="color: #0000bb;">fread</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$this</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">fp</span><span style="color: #004000;">,</span><span style="color: #0000bb;">$byteCount</span><span style="color: #004000;">))));<br />
}<br />
}<br />
}</span></p>
<p><span style="color: #808080;">/**<br />
* Returns an image identifier representing the image obtained from the given filename, using only GD, returns an empty string on failure<br />
*<br />
* @param string $fileName<br />
* @return image identifier<br />
*/</span></p>
<p><span style="color: #004000;">function </span><span style="color: #0000bb;">imagecreatefrompsd</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$fileName</span><span style="color: #004000;">) {<br />
</span><span style="color: #0000bb;">$psdReader </span><span style="color: #004000;">= new </span><span style="color: #0000bb;">PhpPsdReader</span><span style="color: #004000;">(</span><span style="color: #0000bb;">$fileName</span><span style="color: #004000;">);<br />
if (isset(</span><span style="color: #0000bb;">$psdReader</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">infoArray</span><span style="color: #004000;">[</span><span style="color: #c00000;">'error'</span><span style="color: #004000;">])) return </span><span style="color: #c00000;">&#8221;</span><span style="color: #004000;">;<br />
else return </span><span style="color: #0000bb;">$psdReader</span><span style="color: #004000;">-&gt;</span><span style="color: #0000bb;">getImage</span><span style="color: #004000;">();<br />
}<br />
</span><span style="color: #0000bb;">?&gt;</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/php-photoshop-psd-reading-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS middle float div tutorial</title>
		<link>http://www.hostsblog.com/css-middle-float-div-tutorial/</link>
		<comments>http://www.hostsblog.com/css-middle-float-div-tutorial/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 13:43:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=56</guid>
		<description><![CDATA[We will demonstrate today how to create middle floated div with CSS and html. This method is competable with all known browsers and you don&#8217;t need any annoying table anymore. You most likely familiar with including layout.css file in your html head code.
Middle float div css code, open yoiur layout css file and insert this code :
#wrapper {
width:960px;
margin:0px auto;
}
You can add borders, background and other properties in wrapper div :
#wrapper {
width:960px;
margin:0px auto;
border:1px solid #cccccc;
background:#f6f6f6;
}
Your html code should look like this :
&#60;div id=&#8221;wrapper&#8221;&#62;
Some content here
&#60;/div&#62;
That&#8217;s it, we hope this method helped ...]]></description>
			<content:encoded><![CDATA[<p>We will demonstrate today how to create middle floated div with CSS and html. This method is competable with all known browsers and you don&#8217;t need any annoying table anymore. You most likely familiar with including layout.css file in your html head code.<span id="more-56"></span></p>
<p>Middle float div css code, open yoiur layout css file and insert this code :</p>
<blockquote><p>#wrapper {</p>
<p>width:960px;</p>
<p>margin:0px auto;</p>
<p>}</p></blockquote>
<p>You can add borders, background and other properties in wrapper div :</p>
<blockquote><p>#wrapper {</p>
<p>width:960px;</p>
<p>margin:0px auto;</p>
<p>border:1px solid #cccccc;</p>
<p>background:#f6f6f6;</p>
<p>}</p></blockquote>
<p>Your html code should look like this :</p>
<blockquote><p>&lt;div id=&#8221;wrapper&#8221;&gt;</p>
<p>Some content here</p>
<p>&lt;/div&gt;</p></blockquote>
<p>That&#8217;s it, we hope this method helped you in designing good looking website template.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/css-middle-float-div-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux hosting or Windows hosting ?</title>
		<link>http://www.hostsblog.com/linux-hosting-or-windows-hosting/</link>
		<comments>http://www.hostsblog.com/linux-hosting-or-windows-hosting/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 12:41:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WebHosts]]></category>
		<category><![CDATA[linux hosting]]></category>
		<category><![CDATA[windows hosting]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=53</guid>
		<description><![CDATA[It is often really hard for hosting newbies to choose between Linux hosting and Windows hosting, and a question is always the same. There are some myths and misleading complaints on Linux hosting from users lever heard about linux and everything related to linux hosting.
Newbies usually think that if they will choose their hosting on linux Server and if their visitors using windows operating system will not be able to see their site. But the truth is that your website is independent platform, there is no difference which hosting will ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-54" title="linux_hosting_vs_windows_hosting" src="http://www.hostsblog.com/wp-content/uploads/2009/06/linux_hosting_vs_windows_hosting-226x300.jpg" alt="linux_hosting_vs_windows_hosting" width="226" height="300" />It is often really hard for hosting newbies to choose between Linux hosting and Windows hosting, and a question is always the same. There are some myths and misleading complaints on Linux hosting from users lever heard about linux and everything related to linux hosting.</p>
<p>Newbies usually think that if they will choose their hosting on linux Server and if their visitors using windows operating system will not be able to see their site. But the truth is that your website is independent platform, there is no difference which hosting will you choose, your visitor&#8217;s browser will read it in the same way. There are strict programming standards used to create network platforms. Your visitors will be able to browse your website with any operating system. There are some slight differences between programming languages used to maintain windows hosting and linux hosting. This issue important only to webmasters and software application developers.</p>
<p><strong>Now the questions comes which hosting platform shall I choose ?</strong></p>
<p>The answer for this is simple, and it depends on your website requirements.</p>
<p>1.<strong> It&#8217;s always  depends on your requirements.</strong> Most of the windows hosting company will provide you support for programming langauage like ASP and database like MsSql and you will be able to install ASP based applications only whereas most of the linux hosting companies will provide you support forprogramming language like PHP and database like MySql.<br />
So if you want to use ASP than choose windows server whereas if you want to use PHP than use linux server.</p>
<p>You can use html, dhtml, javascript, flash, real audio, video, cgi, pop mail ids, ftp, frontpage etc on both servers.</p>
<p>2. <strong>Security and reference guides </strong>-  Windows hosting  ASP programming platform has much less documentation and sometimes their documentations are paid.  We prefer Linux hosting also because security reasons and stability. Windows hosting security usually fails in seconds when it is infected with troyan horse or viruses.</p>
<p>3.  <strong>Budget</strong> &#8211; Linux hosting is always cheaper as compared to windows hosting because  most of the sofwtares used on linux servers are open source that is free whereas on windows server most of the softwares are paid and need to be licensed by Microsoft.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/linux-hosting-or-windows-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Money Promoting Your Hosting Company</title>
		<link>http://www.hostsblog.com/making-money-promoting-your-hosting-company/</link>
		<comments>http://www.hostsblog.com/making-money-promoting-your-hosting-company/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 00:17:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WebHosts]]></category>
		<category><![CDATA[hostgator affiliate]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Hosting affiliates]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=40</guid>
		<description><![CDATA[If you own a website, more than likely you pay a hosting company each month -unless you have a private server. If you are paying a company for hosting, then it would be fair to say that a lot of other people would be looking for a hosting company as well.
So how can you benefit from this?
At the bottom of your website, you most likely have a link that says, website design by:(website company name). They are usually in the right hand side of your websites footer. Well what if ...]]></description>
			<content:encoded><![CDATA[<p>If you own a website, more than likely you pay a hosting company each month -unless you have a private server. If you are paying a company for hosting, then it would be fair to say that a lot of other people would be looking for a hosting company as well.</p>
<h3>So how can you benefit from this?</h3>
<p>At the bottom of your website, you most likely have a link that says, website design by:(website company name). They are usually in the right hand side of your websites footer. Well what if you inserted a link saying&#8217;Hosted By: (Hosting Company Name) and link to their websites.</p>
<p>Almost every website hosting company has  an affilaite company. For example, my host (<a href="http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=genetrix" target="_blank">Host Gator</a>) pays me $50 for each new person that signs up as a result of one of my links. What if you could make an extra $50-$100 a month. That would be nice wouldn&#8217;t it?</p>
<p>Well all you have to do, is sign up for their affiliate program. There is usually a link to it from their home page, but if you have trouble, just shoot them a quick email. And they will give you a website link that will include your personall affiliate code. This lets them know that it was you who sent them the new customer &#8211; so they know to pay you!</p>
<p>All you have to do know, is change the link in your footer from your web hosts url, to the url that they gave you, and everyone who clicks on that link will have a &#8216;cookie&#8217; attached to them, and if they buy hosting &#8211; you get paid. Sounds like fun doesn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/making-money-promoting-your-hosting-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is It To Late To Start A Profitable Hosting Company?</title>
		<link>http://www.hostsblog.com/is-it-to-late-to-start-a-profitable-hosting-company/</link>
		<comments>http://www.hostsblog.com/is-it-to-late-to-start-a-profitable-hosting-company/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 00:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WebHosts]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=38</guid>
		<description><![CDATA[A couple of years ago it seemed that every young man and his dog were starting a hosting company. It is a little bit like blogging at the moment &#8211; if you were looking to get rich online then the first thing every seemed to start was a hosting company. I am not sure how successful they all were, but I am guessing the majority failed &#8211; as a lot no longer seem to still be around.
Today the hosting business seems to have matured a lot, weeding out a lot ...]]></description>
			<content:encoded><![CDATA[<p>A couple of years ago it seemed that every young man and his dog were starting a hosting company. It is a little bit like blogging at the moment &#8211; if you were looking to get rich online then the first thing every seemed to start was a hosting company. I am not sure how successful they all were, but I am guessing the majority failed &#8211; as a lot no longer seem to still be around.</p>
<p>Today the hosting business seems to have matured a lot, weeding out a lot of unprofessional, small-time hosts. Does this mean that you can no long make money starting a hosting company? Not at all. With the amount of new people starting websites everyday and the rate the internet is growing, this is definately an industry to watch. Here are a few tips if you are looking at starting a profitable hosting company</p>
<h2>Be Unique</h2>
<p>You need to have a point of difference. If you are just like all the big hosting companies, why would people use you over someone else? Think about what sets your company apart from everyone else.  One point of difference I would never target is price. You will always find someone who can charge less then you, so make your point of difference an expertise &#8211; and charge more. Here are a few ideas to get you thinking.<span id="more-38"></span></p>
<ul>
<li><strong>Church Hosting</strong><br />
A lot of churches are starting to make their way online. What if your website hosting company focused specifically on hosting church websites? The benefit is, since they are offline organisations, you are not competing with the rediculously low priced hosting companies.</li>
<li><strong>Local Hosting</strong><br />
Be a hosting company that only hosts companies websites from your city? Market by flyers or align yourself with a couple of website design firms in your area.</li>
<li><strong>Add Value</strong><br />
Include special bonuses with your hosting packages. Instead of focusing on lowering your price, focus on adding more value. Whether it be a discount for SEO, or a free ebook on how to get a flood of traffic to your site. The more value you can add to your hosting package, the less people will want a discounted rate.</li>
<li><strong>Niche Hosting</strong><br />
This could be either topical niche, or product niche. How about targetting only blog hosting. Or Arcade sites? What benefits could you offer to add value to that a generic host couldn&#8217;t?</li>
</ul>
<p><em>It is all about thinking creatively, instead of generic, low cost. People pay for value, and if they believe that you can give them a better service they will pay for it.</em></p>
<p><a href="http://www.hostsblog.com/1cent/"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/is-it-to-late-to-start-a-profitable-hosting-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Select A Website Host</title>
		<link>http://www.hostsblog.com/how-to-select-a-website-host/</link>
		<comments>http://www.hostsblog.com/how-to-select-a-website-host/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 23:33:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WebHosts]]></category>

		<guid isPermaLink="false">http://www.hostsblog.com/?p=34</guid>
		<description><![CDATA[If are are anything like me, then you will have spent a lot of time hoping from cheap website host to cheap website host &#8211; getting more frustrated each time with the constant downtime and lack of service. Do you have to spend more money to get decent hosting or is it possible to get quality hosting for a great price?
I have been with my current host for over 18months now, and while they are not $1 or $2 a months, they are still very well priced, but they have ...]]></description>
			<content:encoded><![CDATA[<p>If are are anything like me, then you will have spent a lot of time hoping from cheap website host to cheap website host &#8211; getting more frustrated each time with the constant downtime and lack of service. Do you have to spend more money to get decent hosting or is it possible to get quality hosting for a great price?</p>
<p>I have been with my current host for over 18months now, and while they are not $1 or $2 a months, they are still very well priced, but they have been well worth the money. If you are looking at changing website hosts, then here are a few things to look for:</p>
<ol>
<li> <strong>Uptime Guarantee</strong>
<p>Any website host can say that they have 99% uptime, but make them put their money where their mouth is. Only choose website hosts that have some form of guarantee if they do not meet their promised uptime. Most will either refund all or part of that months hosting cost.</p>
<p><span id="more-34"></span></li>
<li> <strong>24hr Instant Customer Service</strong>
<p>There is nothing worse than your website being down, or some other type of problem, only to find that you have to submit a tick &#8211; and may get a response in 24 hours. This may have been good enough before, but a lot of hosts now have chat support -where you can get instant support for your problem. Isn&#8217;t that in itself worth an extra couple of dollars a month?</li>
<li> <strong>A Large Quantity Of Positive Customer Reviews</strong>
<p>It is easy for hosting companies to write nice things about themselves, but it takes a lot more to get other people to write posititive things. There is power in testimonials, and before I would even consider moving to a new website host I would do a google search of &#8216;Host Name Reviews&#8217; or &#8216;Host Name Testimonial&#8217;. This will give you pages of Google results of exactly what people think about that company. The good, the bad and the ugly.</li>
</ol>
<p><em>If you use these simple tips, you are sure to find a quality website host, that you will host with for a long period of time. </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hostsblog.com/how-to-select-a-website-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
