<?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>Rocky Rasonable &#187; PHP</title>
	<atom:link href="http://www.rockyrasonable.com/category/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rockyrasonable.com</link>
	<description>Skills Beyond Papers: Senior php programmer, web developer and webmaster based in Davao, Philippines</description>
	<lastBuildDate>Sat, 04 Sep 2010 14:24:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Host File for Web Development</title>
		<link>http://www.rockyrasonable.com/websites/host-file-for-web-development</link>
		<comments>http://www.rockyrasonable.com/websites/host-file-for-web-development#comments</comments>
		<pubDate>Sat, 03 Jul 2010 11:41:30 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Issues]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Host File]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=604</guid>
		<description><![CDATA[Our goal We’re going to edit the hosts file on our PC to make our servers IP address (e.g. 174.120.31.21) resolve to rockyrasonable.com, just like what a DNS server does when example.com’s name servers have been changed to point to the new hosting. Configuring the server All server configurations are different but the principle is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fhost-file-for-web-development"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fhost-file-for-web-development&amp;source=rockyford1000&amp;style=normal&amp;hashtags=Host+File,Server,Web+Development" height="61" width="50" /><br />
			</a>
		</div>
<h4>Our goal</h4>
<p>We’re going to edit the hosts file on our PC to make our servers IP  address (e.g. 174.120.31.21) resolve to rockyrasonable.com, just like what a DNS  server does when example.com’s name servers have been changed to point  to the new hosting.</p>
<p><strong>Configuring the server</strong></p>
<p>All server configurations are different but the principle is generally the same, we need to find out/set our example.com to appear in the web browser when we visit our example IP of 174.120.31.219. For this example I’m going to explain the process on a Cpanel driven server (from this you should be able to get an idea of how this would be achieved through other management software packages).</p>
<ul>
<li>Configure your web space for rockyrasonable.com and      upload all your files to it</li>
<li>Login to Cpanel</li>
<li>Select <strong>Server</strong> from the left-hand menu</li>
<li>Go to the <strong>IP Addresses</strong> – This should present you      with a list of IP addresses assigned to your server, when you configured      the hosting for example.com you will have selected one of these IP      addresses (you may even only have one IP address in this list)</li>
<li>For each IP address there’s a column titled <strong>Hosting</strong> with a link showing the number of domains assigned to that IP address,      click the link that corresponds with the IP address you selected for the      web space</li>
<li>Select <strong>rockyrasonable.com</strong> and click<strong> Set As      Default </strong>- You can only select one default domain to be displayed if      you visit that IP address in a browser</li>
<li>Make a note of the IP address (e.g. 174.120.31.219)</li>
<li>Visit 174.120.31.219 in a web browser – You should be      presented with your newly uploaded site for rockyrasonable.com</li>
</ul>
<p><strong>Editing the hosts file<a href="http://www.rockyrasonable.com/wp-content/uploads/2010/07/runbox.jpg"><img class="alignright size-full wp-image-613" title="runbox" src="http://www.rockyrasonable.com/wp-content/uploads/2010/07/runbox.jpg" alt="" width="200" height="107" /></a></strong></p>
<p>PC’s have a hosts file that we can edit to make 174.120.31.219 resolve to rockyrasonable.com just as if the name servers for rockyrasonable.com had already been changed.</p>
<ul>
<li><strong>Open the hosts file</strong></li>
<li><strong>Edit and save the hosts file</strong></li>
</ul>
<ol>
<li>Go to the Start menu and choose <em>Run</em>. <em>Type</em> the following in the Run dialog box:
<ol>
<li>For Windows NT and Windows 2000
<ol>
<li>C:\winnt\system32\drivers\etc</li>
</ol>
</li>
<li>Windows XP, Windows Vista or Windows 7
<ol>
<li>C:\Windows\System32\drivers\etc</li>
</ol>
</li>
</ol>
</li>
<li><em>Click</em> the OK button (This should open a window with      several files in it.)</li>
<li>Find the file called ‘hosts’ and <em>double–click</em> it. If prompted, specify that you would like to <em>choose a program to      open the file with</em> from a list of programs.
<ol>
<li><em>Choose</em> ‘Notepad’ from the list of available programs.</li>
</ol>
</li>
</ol>
<ol>
<li><em>Start typing </em>on      a new line at the bottom of the file.
<ol>
<li>To do so, place your cursor at the very end of the       last line and <em>hit ‘Enter’</em> to start a new line.</li>
</ol>
</li>
<li><em>Type </em>these      two lines of text like this example:<br />
(use your server IP address and      your site domain in–place of the defaults below)</p>
<pre class="brush: plain;">174.120.31.219  rockyrasonable.com</pre>
<pre class="brush: plain;">174.120.31.219  www.rockyrasonable.com
</pre>
</li>
<li><em>Close</em> the hosts file and <em>save</em> it when prompted.</li>
</ol>
<p><strong>PLEASE NOTE:</strong> At this point you should be able to view and publish to your web site using your domain name. After 3–4 days, you will want to undo this change to your hosts file so that you can check to see that your domain name is now resolving without assistance over the internet.</p>
<ul>
<li><strong>Undo the Hosts file change</strong> (after you have confirmed that it is resolving properly)</li>
</ul>
<ol>
<li><em>Open</em> the hosts file as described above.</li>
<li><em>Delete</em> the information that you added previously and close the file.</li>
<li>Choose to <em>save</em> the changes to the hosts file      when asked.</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/host-file-for-web-development/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Programming Languages – Your Options</title>
		<link>http://www.rockyrasonable.com/websites/web-programming-languages-%e2%80%93-your-options</link>
		<comments>http://www.rockyrasonable.com/websites/web-programming-languages-%e2%80%93-your-options#comments</comments>
		<pubDate>Sat, 03 Jul 2010 11:28:00 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Issues]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[COBOL]]></category>
		<category><![CDATA[Cold Fusion]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Microsoft .Net]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[VB]]></category>
		<category><![CDATA[VB.net]]></category>
		<category><![CDATA[VC++]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=598</guid>
		<description><![CDATA[Over the years several programming languages have appeared on the scene and some have stayed the course. The first programming language to hit it big commercially with business applications was COBOL in the Mainframe days. This was followed by C and C++; when the client server era came briefly, Microsoft launched VB, VC++. The arrival [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fweb-programming-languages-%25e2%2580%2593-your-options"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fweb-programming-languages-%25e2%2580%2593-your-options&amp;source=rockyford1000&amp;style=normal&amp;hashtags=ASP,C%2B%2B,COBOL,Cold+Fusion,Java,Microsoft+.Net,Perl,PHP,Ruby,VB,VB.net,VC%2B%2B" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://www.rockyrasonable.com/wp-content/uploads/2010/07/2662210806_c7bbc90786.jpg"><img class="alignright size-medium wp-image-599" title="2662210806_c7bbc90786" src="http://www.rockyrasonable.com/wp-content/uploads/2010/07/2662210806_c7bbc90786-299x300.jpg" alt="" width="299" height="300" /></a>Over the years several programming languages have appeared on the scene and some have stayed the course. The first programming language to hit it big commercially with business applications was <strong>COBOL </strong>in the Mainframe days. This was followed by<strong> C</strong> and<strong> C++</strong>; when the client server era came briefly, Microsoft launched <strong>VB</strong>, <strong>VC++</strong>. The arrival of the web spawned several new languages such as <strong>ASP</strong>, <strong>Perl</strong>, <strong>Java</strong>, <strong>Cold Fusio</strong>n, <strong>Ruby</strong>,<strong> C#</strong>.</p>
<p>COBOL still has its forte thanks to legacy applications and IBM.<strong> C/C++</strong> has always retained its stronghold – engineering and embedded systems.</p>
<p>On the web front, which has seen enormous applications and innovation, a few languages stand out in terms of popularity – Java, Microsoft .Net (C#/VB.net), <strong>PHP</strong>, <strong>Ruby </strong>(on Rails).</p>
<p>How does one decide which language to use? A lot of factors come into play, some of the key ones being:</p>
<ul>
<li>Legacy</li>
<li>Cost – development, tools, products</li>
<li>Community – popularity, size of user base, developer      base</li>
<li>Support – product vendors, user groups,      proprietary/open source</li>
<li>Development – speed, simplicity, ease</li>
<li>Performance</li>
<li>Platform – Enterprise, Internet, Mobile, Device etc..</li>
<li>Application type – Content, Transactional,      Collaboration….</li>
</ul>
<p>If you are an established enterprise, a lot of times this is dictated by existing environment, if you are an IBM/Sun/Oracle shop you are probably going the Java/J2EE way. Most large enterprises have chosen to go the J2EE route mainly because of its non-proprietary nature, the support from several vendors and its first mover advantage as a robust enterprise platform for the web. If you have been a Microsoft factory, the choice is obvious. Microsoft does particularly well with mid sized companies and in several non-US markets. PHP and Ruby seem to be going head-on and competing in similar segments. Startups and newer companies do not have legacy overheads and hence are free to choose any platform. Also when the hunt is for the best fit COTS product or solution rather than a bespoke application, programming language becomes secondary and more a consequence than choice.</p>
<p>In summary, the field has narrowed down to a few languages, each of which has its niche and application areas. The consumer now has some stable choices to pick from; it is a good time and setting to be in!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/web-programming-languages-%e2%80%93-your-options/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Web Trends for 2010</title>
		<link>http://www.rockyrasonable.com/websites/top-web-trends-for-2010</link>
		<comments>http://www.rockyrasonable.com/websites/top-web-trends-for-2010#comments</comments>
		<pubDate>Thu, 22 Apr 2010 15:48:14 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Flash Apps]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[NET Framework]]></category>
		<category><![CDATA[Trends 2010]]></category>
		<category><![CDATA[web developer]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=328</guid>
		<description><![CDATA[10 Top Programming Trends for 2010 More Control over Flash Apps Anyone that knows a little bit of SEO will surely tell you that Flash is not a search engine&#8217;s best friend. Often, Flash sites and applications are built in one big compiled block, impenetrable to any indexing script or web spider. Hence their low [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Ftop-web-trends-for-2010"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Ftop-web-trends-for-2010&amp;source=rockyford1000&amp;style=normal&amp;hashtags=AJAX,Flash+Apps,JavaScript,NET+Framework,Trends+2010,web+developer,web+services,Wordpress" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>10 Top Programming Trends for 2010</strong></p>
<p><strong><span style="text-decoration: underline;"><em>More Control over Flash Apps</em></span></strong></p>
<p><a href="http://www.rockyrasonable.com/wp-content/uploads/2010/04/images.jpg"><img class="alignleft size-full wp-image-331" style="margin: 4px;" title="images" src="http://www.rockyrasonable.com/wp-content/uploads/2010/04/images.jpg" alt="" width="116" height="116" /></a>Anyone that knows a little bit of SEO will surely tell you that Flash is not a search engine&#8217;s best friend. Often, Flash sites and applications are built in one big compiled block, impenetrable to any indexing script or web spider. Hence their low ranking on all search engine results pages.</p>
<p>While this limited Flash in the past, in recent years, Flash CMS (content management systems) have been under constant development to help regular users and developers alike in building modular websites, with lots of SEO-friendly content.</p>
<p>This is also possible because of the ever more present interaction between ActionScript and other scripting languages. There are many scripts and AS3 classes out there especially built to facilitate the interaction between JavaScript and Flash. Doing so, it indirectly provides access between the Flash app and other content on the web; here including the search crawlers as well. Not being offered anymore in a single block of binary data, Flash websites are moving away from niche and brand sectors and into a category of deep and searchable content authoring tools.<br />
Flash applications will evolve with the release of Adobe Flash Player 10<br />
Enlarge picture</p>
<p>Besides some successful programs like F<strong>lashMoto CMS, SILEX, fCMSPro, FlashNuke, XOT Flash CMS </strong>and others, <strong>Flash </strong>in general has some big events coming up this year too. Already released in a beta version, Adobe Flash Player 10.1 has included <strong>NVIDIA </strong>support, delivering enhanced rich Web content to <strong>NVIDIA GPU</strong> owners.</p>
<p>Alongside NVIDIA support, Flash 10 will also bring support for multi-touch and mobile devices, expanding its horizons to more than the average PCs.</p>
<p>Aside from Flash Player, another beta version of a piece of software revolving around Flash has sparked some genuine interest in the world of Flash developers as well. Adobe AIR 2.0 will surely capitalize on the success of its predecessor, AIR 1, with a much hyped release. The newer version will bring some exciting features such as API for accessing microphone raw data, HTML5 support, CSS3 support, global error handling, very much improved cross-platform printing, UDP support, secure sockets, socket listening capabilities, mass storage device detection, native code integration, multi-touch and gesture support, the ability to open a file with its native program, etc.</p>
<p><strong><span style="text-decoration: underline;"><em>HTML5 &amp; CSS3 Tutorials Will Flood the  Web</em></span></strong></p>
<p>While an official date for HTML5 or CSS3 hasn&#8217;t been announced, developers have already jumped on the available standard drafts, and are constantly pouring tutorials and articles about the soon to be released languages.</p>
<p>HTML coders and slicers should be more than happy this year, with lots of tutorials and tips &amp; tricks articles being published on any respectable tutorial-content website network. Actually, I think I&#8217;m one of those editors that couldn&#8217;t wait for the official version and got ahead of myself in this article here.</p>
<p>These newer versions of HTML and CSS will be better adopted and accepted much faster compared to the fiasco with the previous release of ActionScript 3, which saw many programmers stick to AS2 because of hard to read documentation and the lack of online tutorials. The Internet is full of them now, but at the time of AS3&#8242;s release, they were kind of scarce, denting the success and features of AS3.</p>
<p>Compared to the huge mass of HTML5 and CSS3 tutorials currently available on major search engines, we surely are in a better position to transition to the new standard pretty fast.</p>
<p><strong><span style="text-decoration: underline;"><em>Touch Technology</em></span></strong></p>
<p><a href="http://www.rockyrasonable.com/wp-content/uploads/2010/04/TouchScreen.png"><img class="alignleft size-thumbnail wp-image-333" style="margin: 3px;" title="TouchScreen" src="http://www.rockyrasonable.com/wp-content/uploads/2010/04/TouchScreen-150x150.png" alt="" width="150" height="150" /></a>As mentioned above, touch technology has been on  the rise since the iPhone made it available outside security departments  and high-tech gadgets. Now, it is the number one topic of development  and integration at Microsoft, but the Redmond-based giant is not the  only one leading the way on this wave. Through Flash10, Adobe has joined  the current alongside Apple, Microsoft and Google.</p>
<p>Look no  further than a couple of years when this will be standard in any newly  released hardware gadget or software.</p>
<p><strong><span style="text-decoration: underline;"><em>Do-it-yourself Applications</em></span></strong></p>
<p>eople with no programming knowledge that use “coded” products generally do not want to know how their product basically works. This is why WYSIWYG editors, CMSs and GUIs have been so successful. These do-it-yourself (DIY) applications will continue to grow, expand and conquer new markets, changing the way general purpose applications need not only to be operated, but built.</p>
<p>These days, programmers have not only to bullet-proof a website against hackers and virus attacks, they have to also “dumb it down” for their administrators and users. While frameworks basically build other applications, CMS have entered the common day-to-day vocabulary, being considered a must in any coding project.</p>
<p>People want to build their own website, create their own blogs, put together their own form validation process, manage their own user pool, create and administrate their own ad campaigns, and the list goes on. For an application to have success in 2010, it must allow the user to do everything and not depend on any company support or complicated FAQ page. In other words, programmers should not alienate form the KISS rules and the proper success will follow. If you don&#8217;t believe me, just take a look at the most successful tools out there: <strong>WordPress, Joomla, Drupal, Coppermine, LimeSurvey, XOOPS, etc.</strong></p>
<p><strong><span style="text-decoration: underline;"><em>Ruby Closing the Gap on PHP</em></span></strong></p>
<p>While PHP was still dominant  on the Elance Online Work Index, that didn&#8217;t mean anything on the quality and performances of the two scripting languages. While PHP owes its #1 spot to its widely spread community, Ruby has managed to go under the radar and insert itself through various Ruby-powered platforms like Rails and Sinatra on very big and popular websites.</p>
<p>Currently, if someone is tempted to build a social network, any big consulting agency will recommend using Ruby as its code base. Just take a look at some sites running Ruby these days and see how much it has spread, shadowing PHP in performance and code re-usability. Some examples of sites running Ruby code are: <strong>Twitter, Google, Justin.TV, YellowPages, Scribd, Hulu, Github, BaseCamp, Jobster, CrunchBase, Identi.ca, Shopify, Urban Dictionary, Lighthouse, XING, Campfire, Odeo, iLike</strong> and many more.</p>
<p>Also, besides Ruby, look out for Python and other scripting languages to emerge from the pack and bite from PHP&#8217;s market share.</p>
<p><strong><span style="text-decoration: underline;"><em>More JavaScript, AJAX and Flash than Ever</em></span></strong></p>
<p>Imagination levels are at an all-time high on the web. The ones to blame for this aren&#8217;t designers, project managers or art directors. The guilty ones are only code developers. While earlier versions of JavaScript, AJAX and Flash were doing some basic animations (move slow or fast from here to here), these days, the same languages have become standards in the hiring process. What do I mean by that? Well, if a developer or designer wants to get a job, they must know all of them, or at least have a clue of what they can do.</p>
<p>With the rise of JavaScript libraries like <strong>jQuery, MooTools, YUI, Dojo, Prototype </strong>and many more, developers were given a tool not only to write faster and more intelligible JS code, but powerful tools to go after the user interactivity and design that only Flash applications were providing. With a plugin database as big as <strong>Joomla</strong>&#8216;s module repositories, <strong>jQuery </strong>is surely the leader of the pack, influencing every part of the web. Its success is so great that, recently, W3Schools, a very famous tutorial website for learning programming and scripting languages has included a course for learning jQuery, something it did not do in the past for other similar JS libraries.</p>
<p>At the same pace with<strong> jQuery, AJAX </strong>has been keeping up with the rhythm of modern day designs, being more and more used to animate and load remote and local content. Just check out the AJAX-based scripts indexed on Softpedia or other resources like <strong>Ajax Rain, Solutoire, MiniAjax, AjaxDaddy and DZone Snippets</strong>.</p>
<p><strong><span style="text-decoration: underline;"><em>Online Work Gets More Profitable</em></span></strong></p>
<p>We  have already talked about this trend in Part I of this editorial, and  wanted to advise all the developers and programmers still reading this  editorial to take advantage of the recent trend in companies and  businesses around the world that choose to give freelancers more work  opportunities on their projects hoping to achieve lower total costs in  code developing. We recommend online work marketplaces like <strong>Jobster,  Guru, Elance, Rent-A-Coder, ODesk, GetAFreelancer </strong>and much more.</p>
<p><strong><span style="text-decoration: underline;"><em>Cloud  Computing</em></span></strong></p>
<p>The 2009 success of this topic has been built  mainly on the quality provided by companies like Amazon, RackSpace and  GoGrid. While it still has its naysayers, cloud computing seems to have  at least slid a foot in the door for later discussions.</p>
<p><span style="text-decoration: underline;"><em><br />
<strong>Silverlight  Continues Growth</strong></em></span></p>
<p>Still not as known and used as Flash,  Silverlight has been quietly building a user base by slowly getting  itself installed on as many computers as possible. While the biggest web  user of Silverlight (besides Microsoft sites) remains NBC, developers  taking a look into Silverlight apps have been praising it for its fast  development pace.</p>
<p>Personally, I think it artificially considered  the stage of evolution it&#8217;s in. Also, I heard many opinions on the web  from much more Silverlight and Flash knowledgeable personas stating that  Microsoft&#8217;s Flash-clone had surpassed Adobe&#8217;s product in many areas,  while still implementing new features at a rapid pace. Even so,  Silverlight has a long way to go, being still behind Adobe in terms of  reachability.</p>
<p><strong><span style="text-decoration: underline;"><em>.NET 4</em></span></strong></p>
<p>Microsoft&#8217;s  new product will be released alongside <strong>Visual Studio 2010 </strong>in the coming  months, but the buzz surrounding the event is getting as big in the  programming world as the Windows 7 release had on regular PC users.</p>
<p>With  the new versions of these products come fresh features like after  install ready-to-use <strong>ASP.NET MVC</strong>, inclusion of F# in the <strong>.NET Framework</strong>,  <strong>C#</strong> and <strong>VB.NET</strong> feature improvements, Visual Studio 2010 to fully support  all of .NET 4 environments, and much more.</p>
<p><strong>From <a href="http://news.softpedia.com/news/Top-Web-Trends-for-2010-Part-III-Programming-Trends-132714.shtml">Softpedia.com</a></strong></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/top-web-trends-for-2010/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: ShopperPress</title>
		<link>http://www.rockyrasonable.com/websites/wordpress-shopperpress</link>
		<comments>http://www.rockyrasonable.com/websites/wordpress-shopperpress#comments</comments>
		<pubDate>Fri, 25 Dec 2009 18:44:07 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[Oscommerce]]></category>
		<category><![CDATA[shopperpress]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=316</guid>
		<description><![CDATA[WordPress + ShopperPress = Secure Online Stores with Extra Affiliate Features! ShopperPress is a wordpress theme that turns a standard wordpress blog into a feature rich shopping cart website used by thousands of people worldwide for many purposes; Stores selling your own products or services. Affiliate websites selling clickbank, CJ and other affiliate products. Shops [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fwordpress-shopperpress"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fwordpress-shopperpress&amp;source=rockyford1000&amp;style=normal&amp;hashtags=e-commerce,Oscommerce,shopperpress,web+services,Wordpress" height="61" width="50" /><br />
			</a>
		</div>
<h4><a href="http://www.rockyrasonable.com/wp-content/uploads/2009/12/box.gif"><img class="alignleft size-full wp-image-317" style="margin: 5px 10px;" title="box" src="http://www.rockyrasonable.com/wp-content/uploads/2009/12/box.gif" alt="" width="163" height="210" /></a>WordPress + ShopperPress = Secure Online Stores with Extra Affiliate Features!</h4>
<p>ShopperPress is a wordpress theme that turns a standard wordpress blog into a feature rich shopping cart website used by thousands of people worldwide for many purposes;</p>
<div>
<ul>
<li>Stores selling your <strong>own products or services.</strong></li>
<li>Affiliate websites selling <strong>clickbank, CJ</strong> and other <strong>affiliate products.</strong></li>
<li>Shops selling <strong>drop shipping products</strong>.</li>
<li>Online <strong>product catalog</strong> or <strong>showcase websites</strong>.</li>
<li><strong>Software download websites</strong>,ebook/ images / PDF&#8217;s / files downloads.</li>
</ul>
<p>Visit <a href="http://www.shopperpress.com" target="_blank">shopperpress.com</a><a href="http://www.shopperpress.com"> </a>for more info..</p>
</div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/wordpress-shopperpress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Change wp-admin folder name</title>
		<link>http://www.rockyrasonable.com/websites/wordpress-change-wp-admin-folder-name</link>
		<comments>http://www.rockyrasonable.com/websites/wordpress-change-wp-admin-folder-name#comments</comments>
		<pubDate>Thu, 26 Nov 2009 16:17:42 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[world wide web]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=294</guid>
		<description><![CDATA[Compiled from http://wp123.info WordPress is great! It’s no doubt. But unfortunately it still doesn’t have many quite necessary features. One of them is the ability to change wp-admin folder name, which is the admin directory as you probably already now. After searching for several hours on the internet without any success I started thinking of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fwordpress-change-wp-admin-folder-name"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fwordpress-change-wp-admin-folder-name&amp;source=rockyford1000&amp;style=normal&amp;hashtags=CMS,hackers,web+services,Wordpress,world+wide+web" height="61" width="50" /><br />
			</a>
		</div>
<p>Compiled from http://wp123.info</p>
<p><strong>WordPress </strong>is great! It’s no doubt. But unfortunately it still doesn’t have many quite necessary features. One of them is the ability to change <strong>wp-admin</strong> folder name, which is the admin directory as you probably already now. After searching for several hours on the internet without any success I started thinking of ways how to change my <strong>wordpress </strong>admin directory name. In this small tutorial I’ll show how to do it. Before starting the tutorial I have to say that this is rather complicated way and there may occurred some bugs. Anyway I have tested it and didn’t found any. So let’s start.</p>
<p>All we have to do is to search “<strong>wp-admin</strong>” in all <strong>wordpress </strong>files and change it to what we need to use as a admin directory name. Let’s name it for example “profile”. There are over 50 files to change. It’s practically impossible to find all these files manually so we need this great software called “<strong>grepWin</strong>” (<a href="http://code.google.com/p/grepwin/downloads/list" target="_blank">Download</a>). After installing this software right click on your wordpress folder and then choose “<strong>grepWin</strong>…” (see image below)</p>
<p><img class="alignleft size-medium wp-image-295" title="wpadmin" src="http://www.rockyrasonable.com/wp-content/uploads/2009/11/wpadmin-300x134.png" alt="wpadmin" width="300" height="134" /></p>
<p>Then type “wp-admin” in “Search for:” box and “profile” (or anything you wish) in “Replace with:” and click “Replace”. This software will find every “wp-admin” and replace it with “profile”.</p>
<p>Now we are almost done. There is one file in /wp-admin/ directory called wp-admin.css. You have to change it’s name to “profile.css” (your_admin_directory_name.css).</p>
<p>Please note that some plugins and themes may also use the “wp-admin” name somewhere, so before you upload any theme or plugin don’t forget to scan it using <strong>grepWin </strong>and change every “<strong>wp-admin</strong>” to your chosen directory name.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/wordpress-change-wp-admin-folder-name/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Featured Joomla Theme: Design Crusher 3D</title>
		<link>http://www.rockyrasonable.com/websites/featured-joomla-theme-design-crusher-3d</link>
		<comments>http://www.rockyrasonable.com/websites/featured-joomla-theme-design-crusher-3d#comments</comments>
		<pubDate>Fri, 18 Sep 2009 07:54:21 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=271</guid>
		<description><![CDATA[This layout comes with a detailed 3d animation sequence, in a particle crushed 3d layout. If you like switch off the right navigation and change from three column to a two column layout. Via parameter you can change title, description and the footer part in the backend. View Demo Download]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Ffeatured-joomla-theme-design-crusher-3d"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Ffeatured-joomla-theme-design-crusher-3d&amp;source=rockyford1000&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignleft size-medium wp-image-272" style="margin: 2px 4px;" title="design-crusher-3d" src="http://www.rockyrasonable.com/wp-content/uploads/2009/09/design-crusher-3d-234x300.jpg" alt="design-crusher-3d" width="234" height="300" />This layout comes with a detailed <strong>3d animation</strong> sequence, in a particle crushed <strong>3d layout.</strong> If you like switch off the right navigation and change from three column to a two column layout. Via parameter you can change title, description and the footer part in the backend.</p>
<h3><a href="http://www.joomlademos.de/home?template=crushfinal" target="_blank">View Demo</a></h3>
<h3><a href="http://www.joomla24.com/remository/Download/Templates_for_Joomla_1.5/General_Joomla_1.5_Templates/Design_Crusher_3D.html" target="_blank">Download</a></h3>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/featured-joomla-theme-design-crusher-3d/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install WordPress In Cpanel</title>
		<link>http://www.rockyrasonable.com/websites/install-wordpress-in-cpanel</link>
		<comments>http://www.rockyrasonable.com/websites/install-wordpress-in-cpanel#comments</comments>
		<pubDate>Sun, 13 Sep 2009 04:41:29 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=256</guid>
		<description><![CDATA[This tutorial is intended for domains hosted by Cpanel If your hosting uses CPanel, chance is you will also have Fantastico installed and you may consider yourself lucky. This combination allows you to install a new WordPress blog in a matter of seconds. Click the &#8220;Fantastico De Luxe &#8221; Icon In the Fantastico Page,  click [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Finstall-wordpress-in-cpanel"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Finstall-wordpress-in-cpanel&amp;source=rockyford1000&amp;style=normal&amp;hashtags=cpanel,Wordpress" height="61" width="50" /><br />
			</a>
		</div>
<p>This tutorial is intended for domains hosted by Cpanel</p>
<p>If your hosting uses CPanel, chance is you will also have Fantastico installed and you may consider yourself lucky. This combination allows you to install a new WordPress blog in a matter of seconds.</p>
<p style="text-align: center;"><img class="size-full wp-image-257 aligncenter" title="fantastico" src="http://www.rockyrasonable.com/wp-content/uploads/2009/09/fantastico.jpg" alt="fantastico" width="87" height="69" /></p>
<ol style="text-align: left;">
<li>Click the &#8220;<strong>Fantastico De Luxe</strong> &#8221; Icon</li>
<li>In the Fantastico Page,  click the &#8220;<strong>wordpress</strong>&#8221; below the &#8220;<strong>blogs</strong>&#8221; category
<p style="text-align: center;"><img class="size-full wp-image-257 aligncenter" title="fantastico" src="http://www.rockyrasonable.com/wp-content/uploads/2009/09/blogsarea.jpg" alt="blogsarea" width="104" height="72" /></p>
</li>
<li>Then, Click the new installation<img class="aligncenter size-full wp-image-259" title="newinstall" src="http://www.rockyrasonable.com/wp-content/uploads/2009/09/newinstall.jpg" alt="newinstall" width="280" height="67" /></li>
<li>Finally, Fill in the required fields<img class="aligncenter size-full wp-image-260" title="fullinstall" src="http://www.rockyrasonable.com/wp-content/uploads/2009/09/fullinstall.jpg" alt="fullinstall" width="374" height="462" /></li>
<li>Then click &#8220;<strong>Install</strong>&#8220;. You are now ready to  face the word of blogging..</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/install-wordpress-in-cpanel/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Recommended CMS for newbies</title>
		<link>http://www.rockyrasonable.com/websites/recommended-cms-for-newbies</link>
		<comments>http://www.rockyrasonable.com/websites/recommended-cms-for-newbies#comments</comments>
		<pubDate>Wed, 19 Aug 2009 09:52:45 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Computer]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[CCCA]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Soholaunch]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=238</guid>
		<description><![CDATA[1.) CCCA by IDX Web Designs Content management system based on PHP and MySQL. Powerful yet simple CMS for all. Comprehensive functionality. Pricing seems to be reasonable for the small company. Easy to install and user friendly.  Available only for All IDX Web Designs Clients. Contact IDX Web Designs and Request a quote 2.) Joomla [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Frecommended-cms-for-newbies"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Frecommended-cms-for-newbies&amp;source=rockyford1000&amp;style=normal&amp;hashtags=CCCA,CMS,Drupal,Joomla,Soholaunch,Wordpress" height="61" width="50" /><br />
			</a>
		</div>
<p>1.) <strong>CCCA</strong> by <a href="http://idxwebdesigns.com" target="_blank">IDX Web Designs</a></p>
<p><img class="alignleft size-thumbnail wp-image-239" style="margin-left: 3px; margin-right: 3px;" title="ccca" src="http://www.rockyrasonable.com/wp-content/uploads/2009/08/ccca-150x150.jpg" alt="ccca" width="122" height="111" />Content management system based on <strong>PHP </strong>and <strong>MySQL</strong>. Powerful yet simple <strong>CMS </strong>for all. Comprehensive functionality. Pricing seems to be reasonable for the small company. Easy to install and user friendly.  Available only for All <strong><a href="http://idxwebdesigns.com" target="_blank">IDX Web Designs</a></strong> Clients. Contact IDX Web Designs and Request a quote</p>
<p>2.) <a href="http://Joomla.org" target="_blank"><strong>Joomla </strong></a>by <a href="http://joomla.org" target="_blank"><span class="small">Wilco Jansen</span></a></p>
<p><img class="alignleft size-full wp-image-242" title="joomla-s-webtreatsetc-128" src="http://www.rockyrasonable.com/wp-content/uploads/2009/08/joomla-s-webtreatsetc-128.png" alt="joomla-s-webtreatsetc-128" width="128" height="128" />An award-winning content management system (<strong>CMS</strong>), which enables you to build Web sites and powerful online applications. Many aspects, including its ease-of-use and extensibility, have made <strong>Joomla </strong>the most popular Web site software available. Best of all, <strong>Joomla </strong>is an open source solution that is freely available to everyone.</p>
<p>3.) <a href="http://Wordpress.org" target="_blank"><strong>WordPress </strong></a>by <a href="http://boren.nu/">Ryan Boren</a></p>
<p><img class="alignleft size-thumbnail wp-image-241" style="margin-left: 3px; margin-right: 3px;" title="wordpress-logo" src="http://www.rockyrasonable.com/wp-content/uploads/2009/08/wordpress-logo-150x150.png" alt="wordpress-logo" width="112" height="112" />State-of-the-art publishing platform with a focus on aesthetics, web standards, and usability. <strong>WordPress </strong>is both free and priceless at the same time.<br />
More simply, <strong>WordPress </strong>is what you use when you want to work with your blogging software, not fight it.</p>
<p>4.) <a href="http://www.soholaunch.com" target="_blank"><strong>Soholaunch </strong></a></p>
<p><img class="alignleft size-thumbnail wp-image-243" style="margin-left: 3px; margin-right: 3px;" title="soholaunch" src="http://www.rockyrasonable.com/wp-content/uploads/2009/08/soholaunch-150x150.gif" alt="soholaunch" width="114" height="103" />An easy-to-use website creation tool to help you build, maintain, and manage your personal or business website. It runs right from your website, making it easy to take shopping cart orders online, create forms, and edit site pages from any computer in the world!</p>
<p>5.) <a href="http://drupal.org" target="_blank"><strong>Drupal </strong></a></p>
<p><img class="alignleft size-full wp-image-244" style="margin-left: 3px; margin-right: 3px;" title="drupal-s-webtreatsetc-128" src="http://www.rockyrasonable.com/wp-content/uploads/2009/08/drupal-s-webtreatsetc-128.png" alt="drupal-s-webtreatsetc-128" width="128" height="128" />A free software package that allows an individual or a community of users to easily publish, manage and organize a wide variety of content on a website. Tens of thousands of people and organizations are <a href="http://drupal.org/cases">using Drupal</a> to power scores of different web sites</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/recommended-cms-for-newbies/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating A Simple Search Engine In PHP</title>
		<link>http://www.rockyrasonable.com/websites/creating-a-simple-search-engine-in-php</link>
		<comments>http://www.rockyrasonable.com/websites/creating-a-simple-search-engine-in-php#comments</comments>
		<pubDate>Thu, 06 Aug 2009 08:52:18 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=223</guid>
		<description><![CDATA[This is the first in what I hope will be a long list of tutorials that I like to call Practical Programming in PHP. Lets get down to business, today I&#8217;m going to show you how to create a simple search engine that you can use for your very own site or some other project [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fcreating-a-simple-search-engine-in-php"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fwebsites%2Fcreating-a-simple-search-engine-in-php&amp;source=rockyford1000&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p class="para">
<p><img class="alignleft size-thumbnail wp-image-227" title="search-engine-optimization-blog" src="http://www.rockyrasonable.com/wp-content/uploads/2009/08/search-engine-optimization-blog-150x150.jpg" alt="search-engine-optimization-blog" width="150" height="150" />This is the first in what I hope will be a long list of tutorials that I like to call Practical Programming in PHP. Lets get down to business, today I&#8217;m going to show you how to create a simple search engine that you can use for your very own site or some other project that you may be working on. For this tutorial I will be using a MySQL database. The bulk of the code should be compatible with PHP 3 and 4.</p>
<h2>Background:</h2>
<p class="para">
<p>Before we begin, I&#8217;ll show you the table I&#8217;ll be using in the examples:</p>
<table class="example" border="1" cellspacing="0" cellpadding="2" align="center" summary="Table layout of database">
<tbody>
<tr class="exampletop">
<td>First_Name</td>
<td>Middle_Name</td>
<td>Last_Name</td>
</tr>
<tr>
<td>Dana</td>
<td>Johnson</td>
<td>Smith</td>
</tr>
<tr>
<td>Jill</td>
<td>Angel</td>
<td>Petersburg</td>
</tr>
<tr>
<td>Jack</td>
<td>Coner</td>
<td>Mitchel</td>
</tr>
</tbody>
</table>
<p class="para">
<p>If you feel confused about any of the functions in the tutorial, have a look at my previous tutorial that deals with common database functions.</p>
<h2>Down To Work:</h2>
<p class="para">
<p>Before we actually make the search engine, we need to create a basic webpage that will have an input field where the user can enter his or her search query. I&#8217;m going to keep mine simple; feel free to make an elaborate one with lots of bells and whistles. The code for my page is below:</p>
<div class="center">
<pre class="example">
<pre class="brush: php;">&lt;html&gt;

&lt;head&gt;

  &lt;title&gt;Simple Search Engine version 1.0&lt;/title&gt;

&lt;/head&gt;

&lt;body&gt;

  &lt;center&gt;

    Enter the first, last, or middle name of the person you are looking for:

    &lt;form action=&quot;search.php&quot; method=&quot;post&quot;&gt;

      &lt;input type=&quot;text&quot; name=&quot;search_query&quot; maxlength=&quot;25&quot; size=&quot;15&quot;&gt;&lt;br&gt;

      &lt;input type=&quot;reset&quot; name=&quot;reset&quot; value=&quot;Reset&quot;&gt; 

      &lt;input type=&quot;text&quot; name=&quot;submit&quot; value=&quot;Submit&quot;&gt;

    &lt;/form&gt;

  &lt;/center&gt; 

&lt;/body&gt;

&lt;/html&gt;</pre>
</pre>
</div>
<p>It&#8217;s a pretty basic page so I&#8217;m not going to explain alot of it. Basically, the user will enter the first, middle, or last name of the person they are looking for and hit enter. The contents of the input field will be passed to a php script named “search.php” which will handle the rest.</p>
<p class="para">
<p>Now that the page is out of the way, let&#8217;s create the actual script. First, we need to connect to the database using mysql_pconnect() and select the table using mysql_select_db(). Next, we want to parse the value passed to the script to see if it contains any invalid input, such as numbers and funky characters like #&amp;*^. You should always validate input, don&#8217;t rely on things like JavaScript to do it for  you, because once the user disables JavaScript all that fancy validation goes down the toilet. To check the input we are going to use a regular expression, they are a bit confusing and will be explained in a later tutorial. For now, all you need to know is that it will check to see if value passed is a string of characters. All right, enough chatter, here is the first part of the script:</p>
<div class="center">
<pre class="example">
<pre class="brush: php;">&lt;?php 

  mysql_pconnect(&quot;host&quot;, &quot;username&quot;, &quot;password&quot;) or die(&quot;Can't connect!&quot;);

  mysql_select_db(&quot;Names&quot;) or die(&quot;Can't select database!&quot;); 

  if (!eregi(&quot;[[:alpha:]]&quot;, $search_query))

  {

    echo &quot;Error: you have entered an invalid query, you can only use characters!&lt;br&gt;&quot;;

    exit;

  }
</pre>
</pre>
</div>
<p>Now that we&#8217;ve done that, we will form the search query.</p>
<div class="center">
<pre class="example">
<pre class="brush: php;">$query= mysql_query(&quot;SELECT * FROM some_table WHERE First_Name= '$search_query' 

OR Middle_Name= '$search_query' OR Last_Name= '$search_query' ORDER BY Last_Name&quot;);</pre>
</pre>
</div>
<p>Look confusing? I&#8217;ll explain, what&#8217;s happening is, we&#8217;re asking MySQL to search all the rows in First_Name, Middle_Name, and Last_Name for a match to the query entered by the user; then, take the results of that search, alphabetize the results by Last_Name.</p>
<p class="para">
<p>The rest of the coding from now on is a breeze. We will get the results from the query using mysql_fetch_array( ), and check to see if there is a match using mysql_num_rows(). If there is a match, or matches, we will output it along with the number of matches found; if there isn&#8217;t, we&#8217;ll report to the user that we couldn&#8217;t find anything.</p>
<div class="center">
<pre class="example">
<pre class="brush: php;">$result= mysql_num_rows($query);

  if ($result == 0)

  {

    echo &quot;Sorry, I couldn't find any user that matches your query ($search_query)&quot;;

    exit; 

  }

  else if ($result == 1)

  {

    echo &quot;I've found &lt;b&gt;1&lt;/b&gt; match!&lt;br&gt;&quot;;

  }

  else {

    echo &quot;I've found &lt;b&gt;$result&lt;/b&gt; matches! &lt;br&gt;&quot;;

  }

  while ($row= mysql_fetch_array($query))

  {

    $first_name= $row[&quot;First_Name&quot;];

    $middle_name = $row[&quot;Middle_Name&quot;];

    $last_name = $row[&quot;Last_Name&quot;];

    echo &quot;The first name of the user is: $first_name.&lt;br&gt;&quot;;

    echo &quot;The middle name of the user is: $middle_name.&lt;br&gt;&quot;;

    echo &quot;The last name of the user is: $last_name.&lt;br&gt;&quot;;

  }

?&gt;</pre>
</pre>
</div>
<p>I added that extra if statement so that when we report how many users we&#8217;ve found, its output will be in proper English. If I we don&#8217;t, the script will echo &#8220;I&#8217;ve found 1 matches&#8221; which obviously isn&#8217;t good grammar <img src='http://www.rockyrasonable.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  The rest of the script loops through the results and prints them to a webpage. That&#8217;s all, we&#8217;ve finished the script! The entire script is included below:</p>
<div class="center">
<pre class="example">
<pre class="brush: php;">&lt;html&gt;

&lt;head&gt;

  &lt;title&gt;Simple Search Engine version 1.0 - Results &lt;/title&gt;

&lt;/head&gt;

&lt;body&gt; 

&lt;?php 

  mysql_pconnect(&quot;host&quot;, &quot;username&quot;, &quot;password&quot;) or die(&quot;Can't connect!&quot;);

  mysql_select_db(&quot;Names&quot;) or die(&quot;Can't select database!&quot;); 

  if (!eregi(&quot;[[:alpha:]]&quot;, $search_query))

  {

    echo &quot;Error: you have entered an invalid query, you can only use characters!&lt;br&gt;&quot;;

    exit; //No need to execute the rest of the script.

  }

  $query= mysql_query(&quot;SELECT * FROM some_table WHERE First_Name='$search_query' 

  OR Middle_Name= '$search_query' OR Last_Name='$search_query' ORDER BY Last_Name&quot;);

  $result= mysql_numrows($query);

  if ($result == 0)

  {

    echo &quot;Sorry, I couldn't find any user that matches your query ($search_query)&quot;;

    exit; //No results found, why bother executing the rest of the script?

  }

  else if ($result == 1)

  {

    echo &quot;I've found &lt;b&gt;1&lt;/b&gt; match!&lt;br&gt;&quot;;

  }

  else {

    echo &quot;I've found &lt;b&gt;$result&lt;/b&gt; matches!&lt;br&gt;&quot;;

  }

  while ($row= mysql_fetch_array($query))

  {

    $first_name= $row[&quot;First_Name&quot;];

    $middle_name = $row[&quot;Middle_Name&quot;];

    $last_name = $row[&quot;Last_Name&quot;];

    echo &quot;The first name of the user is: $first_name.&lt;br&gt;&quot;;

    echo &quot;The middle name of the user is: $middle_name.&lt;br&gt;&quot;;

    echo &quot;The last name of the user is: $last_name. &lt;br&gt;&quot;;

  }

?&gt; 

&lt;/body&gt;

&lt;/html&gt;</pre>
</pre>
</div>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/websites/creating-a-simple-search-engine-in-php/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Using Databases In PHP</title>
		<link>http://www.rockyrasonable.com/programming/using-databases-in-php</link>
		<comments>http://www.rockyrasonable.com/programming/using-databases-in-php#comments</comments>
		<pubDate>Thu, 06 Aug 2009 08:47:08 +0000</pubDate>
		<dc:creator>Rocky Rasonable</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[MYSQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.rockyrasonable.com/?p=219</guid>
		<description><![CDATA[The first thing we need to do is connect to the database. mysql_connect(&#34;somehost&#34;, &#34;username&#34;, &#34;password&#34;) or die (&#34;Can't connect!&#34;); This will try to connect to the database on somehost and login with “username” as the username and “password” as the password. If it can&#8217;t, it will output an error message saying that it can&#8217;t connect. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fprogramming%2Fusing-databases-in-php"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.rockyrasonable.com%2Fprogramming%2Fusing-databases-in-php&amp;source=rockyford1000&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>The first thing we need to do is connect to the database.</p>
<pre class="brush: php;">mysql_connect(&quot;somehost&quot;, &quot;username&quot;, &quot;password&quot;) or die (&quot;Can't connect!&quot;);</pre>
<p>This will try to connect to the database on somehost and login with “username” as the username and “password” as the password. If it can&#8217;t, it will output an error message saying that it can&#8217;t connect. For your own code be sure to change somehost to your host (most of the times it&#8217;s localhost, ask your admin), username to your username (duh), and password to your password. Another way to connect to a database is to open a persistent connection. To do this, use the mysql_pconnectfunction and pass it the same arguments as mysql_connect. Why open a persistent connection? When you call mysql_pconnect, instead of going out and opening a connection to the database, it sees if one is already open, if it is, the script will use it. Also, when the script has finished executing, the connection to the database will not automatically be closed like it is when using mysql_connect. This way the connection can be used later on. Using a persistent connection is a good idea if your scripts constantly need to connect to the database.</p>
<p>After we have opened a connection to the database, we then select a database.</p>
<pre class="brush: php;">mysql_select_db(&quot;database_name&quot;) or die(&quot;Can't select database!&quot;);</pre>
<p>This will try to select the database named “database_name” (for your own code change it to the name of your database). If it can&#8217;t select the database, it will output and error. Once you&#8217;re actually connected to a database, you will want to query a table in the database to get whatever you want done. A query looks like this:</p>
<pre class="brush: php;">mysql_query(&quot;Some query&quot;);</pre>
<p>Common queries are SELECTand INSERT For full documentation go to the mysql web site (<a title="Click to visit the MySQL website (link opens in a new browser window)." href="http://www.mysql.com" target="_blank">http://www.mysql.com</a>). Another common php function is mysql_num_rows; if it isn&#8217;t obvious this gets the number of rows from a query. Here is an example of how it can be used with mysql_query:</p>
<pre class="brush: php;">&lt;?php

  $result= mysql_query(&quot;SELECT * FROM some_table&quot;);

  $number_of_rows= @mysql_num_rows($result);

  if ($number_of_rows == 0)

  {

    echo &quot;Sorry there are no rows&quot;;

  }

  else {

    echo &quot;Yes! we found some rows!&quot;;

  }

?&gt;</pre>
<p>Now you may be wondering why I put the @ sign before mysql_num_rows. In php, the @ sign suppress errors; I put it in front of mysql_num_rows so that if there are no rows, MySQL will not output a bunch of errors. So when would mysql_num_rows be useful? Well, you could use it for an authentication script which searchs the database for a username and password and if it doesn&#8217;t find any (i.e. if no rows are returned), it tells the user that the username, or password, are not correct.</p>
<p>Another really useful function is mysql_fetch_array, because it gets the rows and puts them in an array that contains the name of the rows. That way instead of having to access each row by number you can do it by name! For example, let&#8217;s say that our database looked like this:</p>
<table border="1" cellspacing="0" cellpadding="2" align="center">
<tbody>
<tr>
<td>User</td>
<td>Password</td>
</tr>
<tr>
<td>John</td>
<td>afasdfadsfdsf</td>
</tr>
<tr>
<td>Billy</td>
<td>tla;jrjealjwqsldajf</td>
</tr>
<tr>
<td>Mitch</td>
<td>pqrtupipripewir</td>
</tr>
</tbody>
</table>
<p>We would use the following code to get the users&#8217; names and output them:</p>
<pre class="brush: php;">&lt;?php

  echo &quot;The users in this database are: &lt;br&gt;&quot;;

  $result= mysql_query(&quot;SELECT * FROM some_table&quot;);

  while ($row= mysql_fetch_array($result))

  {

    $username= $row[&quot;User&quot;];

    echo &quot;$username&lt;br&gt;&quot;;

  }

?&gt;</pre>
<p>This will output all the usernames in a database; you can add error checking if you like. The while statement is read “while there are rows that satisfy the query, put the contents of the row from the column ‘User’ into the variable ‘username,’ and print the usernames (each on a new line) to an HTML page.”</p>
<p>Now let&#8217;s cover a couple of functions that actually work with the database. The first is mysql_create_db, don&#8217;t you just love how the functions are named you can figure out what they do just by looking at the function name, this one obviously creates a database. Here&#8217;s how to use it:</p>
<pre class="brush: php;">&lt;?php

  echo &quot;I am going to try to create a database...&lt;br&gt;&quot;;

  if (mysql_create_db(&quot;test_database&quot;))

  {

    echo &quot;Hooray, I've created the database!&lt;br&gt;&quot;;

  }

  else {

    echo &quot;Darn couldn't create the database! because: &quot;;

    echo &quot;mysql_error() &lt;br&gt;&quot;;

  }

?&gt;</pre>
<p>You can see I used a new function, mysql_error, you don&#8217;t really need to know too much about it, all it does is return the error string sent by MySQL. Now since we learned how to create a database, how&#8217;s about we learn to delete one. To do that use the mysql_drop_db, here is how to use it:</p>
<pre class="brush: php;">&lt;?php

  echo &quot;I am going to try to delete a database...&lt;br&gt;&quot;;

  $result= mysql_drop_db(&quot;test_database&quot;);

  if (!$result)

  {

    echo &quot;Darn couldn't I couldn't delete the database!&lt;br&gt;&quot;;

  }

  else {

    echo &quot;Hooray, I've deleted the database&lt;br&gt;&quot;;

  }

?&gt;</pre>
<p>You can see that the syntax is very similar to that of mysql_create_db, just pop the name of the database you want to delete into the function.</p>
<p>The next two items aren&#8217;t functions, rather they are queries that you can use to manage an existing table. The following query will insert data into a database:</p>
<pre class="brush: php;">&lt;?php

  echo &quot;I am going to try to insert data into a table...&lt;br&gt;&quot;;

  $result= mysql_query(&quot;INSERT INTO test_database (username, password) VALUES

	               (Rahim, adfjaldadfsdaf)&quot;);

  if (!$result)

  {

    echo &quot;Darn couldn't I couldn't delete the database!&lt;br&gt;&quot;;

  }

  else {

    echo &quot;Hooray, I've deleted the database&lt;br&gt;&quot;;

  }

?&gt;</pre>
<p>This query should be pretty obvious, it inserts the data defined in between the parentheses into the rows. Just a little note to remember, the order in which you write out the column names is the order your data will be entered (i.e. a row with the contents Rahim will be entered under username, not password since we wrote username then pasword, if it was reveresd Rahim would be put under password).</p>
<p>The next query we&#8217;ve already gone over, I&#8217;m just going to add to it; after I&#8217;m done you should be able to use it to help create a simple search engine (upcomming tutorial)! For the sake of brevity I&#8217;ll remove all the extra php stuff and just show you the “meat” of the code.</p>
<pre class="brush: php;">$result= mysql_query(&quot;SELECT name FROM some_table WHERE name=Joe AND

         lastname=Sixpack OR lastname=Becker ORDER BY lastname LIMIT 20&quot;);</pre>
<p>Now I know that looks like a long query, but it&#8217;s not really all that bad. What it&#8217;s pretty much saying is: “Get me the name from some_table where the name is Joe and the lastname is Sixpack or Becker, oh and by the way while your at it, put it in alphabetical order by the lastname; oh and one last thing, just get the first 20 results please.” MySQL has lots of other filters that you can add on to the SELECT statement, I highly suggest you download the MySQL documentation and give it a perusing.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.rockyrasonable.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.rockyrasonable.com/programming/using-databases-in-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
