<?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>Kavoir &#187; HTTP Tips &amp; Tutorials</title>
	<atom:link href="http://www.kavoir.com/category/world-wide-web-technology/http/feed" rel="self" type="application/rss+xml" />
	<link>http://www.kavoir.com</link>
	<description>Just another dumbass webmaster, goofing around...</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:59:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Redirect 404 Error to Home Page</title>
		<link>http://www.kavoir.com/2011/12/redirect-404-error-to-home-page.html</link>
		<comments>http://www.kavoir.com/2011/12/redirect-404-error-to-home-page.html#comments</comments>
		<pubDate>Sun, 25 Dec 2011 03:15:19 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[CSS & HTML Tips]]></category>
		<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>
		<category><![CDATA[WordPress How To]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2011/12/redirect-404-error-to-home-page.html</guid>
		<description><![CDATA[Other than making your 404 error page user friendly, you can redirect it to your index pages such as the homepage, sitemap, or search page, to make it useful for the users. Instead of relying on them to correct the error themselves, you offer the new orientation. How to redirect a 404 error page to [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Other than making your <a href="http://www.smashingmagazine.com/2007/08/17/404-error-pages-reloaded/">404 error page</a> <a href="http://www.alistapart.com/articles/perfect404/">user friendly</a>, you can redirect it to your index pages such as the homepage, sitemap, or search page, to make it useful for the users. Instead of relying on them to correct the error themselves, you offer the new orientation.</p>

<h2>How to redirect a 404 error page to the home page?</h2>
<p>There are essentially 3 ways to do this depending on the technology your site is built on.</p>
<h3>The .htaccess and HTML solution</h3>
<p>This works across all sites that are served by the Apache web server with .htaccess enabled. Add this line in the .htaccess file in the root directory of your domain:</p>
<pre><code>ErrorDocument 404 /404.html</code></pre>
<p>And in 404.html, add a meta tag in the HTML head section: </p>
<pre><code>&lt;meta http-equiv=&quot;Refresh&quot; content=&quot;1; URL=http://www.example.com/&quot;&gt;</code></pre>
<p>So when there’s an 404 Not Found error the user would be first redirected to /404.html and in turn, he or she would be redirected to the homepage http://www.example.com/ (or whatever you change it to) by the meta <strong>Refresh</strong> actions.</p>
<h3>The PHP solution</h3>
<p>If you are using PHP to code your site, chances are you know this solution. You can always use the previous solution (The .htaccess and HTML solution) to redirect 404 error page to your home page on a PHP site, but you can also try the pure PHP approach instead.</p>
<p>Whenever a user types in a URL request that you do not recognize, render this:</p>
<pre><code>header(&quot;HTTP/1.1 404 Not Found&quot;);
header(&quot;Location: /&quot;);
exit();</code></pre>
<p>Which would redirect the user who has hit a 404 error to the homepage / or any other page URL you specify there.</p>
<h3>The WordPress solution</h3>
<p>If you are using WordPress for your site, make a 404.php file in your theme directory with the following content:</p>
<pre><code>&lt;?php
header(&quot;HTTP/1.1 301 Moved Permanently&quot;);
header(&quot;Location: &quot;.get_bloginfo('url'));
exit();</code></pre>
<p>WordPress would automatically use 404.php as the default 404 Not Found error page and when a user hits that page, he or she would then be taken to the home page your WordPress blog.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/09/how-to-redirect-the-visitor-to-another-page-or-website.html" rel="bookmark" title="September 3, 2009">How to redirect the visitor to another page or website?</a></li>
<li><a href="http://www.kavoir.com/2009/08/javascript-stop-and-prevent-others-from-framing-your-site-and-page.html" rel="bookmark" title="August 30, 2009">PHP, JavaScript: Stop and prevent others from framing your site or web page</a></li>
<li><a href="http://www.kavoir.com/2011/08/html-make-a-page-refresh-every-xx-seconds.html" rel="bookmark" title="August 28, 2011">HTML: Make a Page Refresh Every xx Seconds</a></li>
<li><a href="http://www.kavoir.com/2009/06/javascript-open-or-redirect-to-another-page-site-location.html" rel="bookmark" title="June 16, 2009">JavaScript: Open or Redirect to Another Page / Site / Location</a></li>
<li><a href="http://www.kavoir.com/2009/09/best-way-to-hide-and-cloak-your-affiliate-links.html" rel="bookmark" title="September 19, 2009">Best way to hide and cloak your affiliate links?</a></li>
</ul>
<p><!-- Similar Posts took 2.780 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2011/12/redirect-404-error-to-home-page.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML: Make a Page Refresh Every xx Seconds</title>
		<link>http://www.kavoir.com/2011/08/html-make-a-page-refresh-every-xx-seconds.html</link>
		<comments>http://www.kavoir.com/2011/08/html-make-a-page-refresh-every-xx-seconds.html#comments</comments>
		<pubDate>Sun, 28 Aug 2011 03:37:30 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[CSS & HTML Tips]]></category>
		<category><![CDATA[HTTP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/?p=2319</guid>
		<description><![CDATA[A quick tip for those who just started learning HTML. It&#8217;s possible to add a line of code in your HTML page so that it&#8217;s automatically refreshed every few seconds when loaded in the user&#8217;s browser. To make the page automatically refresh itself every 60 seconds, just insert the following code in the &#60;head&#62;&#60;/head&#62; section [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>A quick tip for those who just started learning HTML. It&#8217;s possible to add a line of code in your HTML page so that it&#8217;s automatically refreshed every few seconds when loaded in the user&#8217;s browser.</p>

<p>To make the page automatically refresh itself every 60 seconds, just insert the following code in the &lt;head&gt;&lt;/head&gt; section of your HTML source code:</p>
<pre><code><strong>&lt;meta http-equiv="refresh" content="60"&gt;</strong></code></pre>
<p>This would be very useful to display information that is constantly changing.</p>
<p>This can also be used to <a href="http://www.kavoir.com/2009/09/how-to-redirect-the-visitor-to-another-page-or-website.html">redirect</a> the user from the current page to another, just specify the destination URL:</p>
<pre><code>&lt;meta http-equiv="refresh" content="30; <strong>url=http://example.com/</strong>"&gt;</code></pre>
<p>Which would redirect the browser to http://example.com/ 30 seconds after finishing loading the current page.<br />
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2011/12/redirect-404-error-to-home-page.html" rel="bookmark" title="December 25, 2011">Redirect 404 Error to Home Page</a></li>
<li><a href="http://www.kavoir.com/2009/09/how-to-redirect-the-visitor-to-another-page-or-website.html" rel="bookmark" title="September 3, 2009">How to redirect the visitor to another page or website?</a></li>
<li><a href="http://www.kavoir.com/2010/05/the-ultimate-way-to-cloak-and-hide-any-website-address-or-url-stealth-forwarding.html" rel="bookmark" title="May 29, 2010">The Ultimate Way to Cloak and Hide any Website Address or URL (Stealth Forwarding)</a></li>
<li><a href="http://www.kavoir.com/2009/06/javascript-open-or-redirect-to-another-page-site-location.html" rel="bookmark" title="June 16, 2009">JavaScript: Open or Redirect to Another Page / Site / Location</a></li>
<li><a href="http://www.kavoir.com/2010/03/use-relative-protocol-url-address-to-automatically-determine-web-address-protocol-http-or-https.html" rel="bookmark" title="March 6, 2010">Use Relative Protocol URL Address to Automatically Determine Web Address Protocol (HTTP or HTTPS)</a></li>
</ul>
<p><!-- Similar Posts took 2.387 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2011/08/html-make-a-page-refresh-every-xx-seconds.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: How to distinguish values in $_POST or $_GET that are sent via HTTP requests and those that are set / assigned in the code</title>
		<link>http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html</link>
		<comments>http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 03:32:05 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html</guid>
		<description><![CDATA[To send parameters to a PHP script, you can either fabricate a form and post a few variables by the POST method or simply send a request of a URL full of GET value pairs. This way, in the server side PHP script code, you can retrieve these parameters sent from the client in $_POST [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><img src="http://www.kavoir.com/wp-content/uploads/2010/03/html-form-code.jpg" alt="html form code" title="html form code" width="110" height="73" class="alignright size-full wp-image-1815" />To send parameters to a PHP script, you can either fabricate a form and post a few variables by the POST method or simply send a request of a URL full of GET value pairs. This way, in the server side PHP script code, you can retrieve these parameters sent from the client in $_POST or $_GET. The trick is, other than receiving the values from client requests, you can manually assign values to them in your code. For example,<span id="more-1721"></span></p>
<pre><code>&lt;?php
$_POST['test'] = 100;
?&gt;</code></pre>
<p>Wherein <code>$_POST['test']</code> can be used in any way possible as you can with one that is received from a HTTP request. But how can we know the posted ones from the assigned ones? The PHP function <a href="http://us2.php.net/manual/en/function.filter-has-var.php">filter_has_var</a>() is the answer. To check if a posted variable is really posted from a client request:</p>
<pre><code>if (filter_has_var(<strong>INPUT_POST</strong>, 'test')) {
	// $_POST['test'] is posted from the client
} else {
	// $_POST['test'] is assigned locally
}</code></pre>
<p>The same rule applies to $_GET. To make sure if a $_GET value is received by URL request:</p>
<pre><code>if (filter_has_var(<strong>INPUT_GET</strong>, 'test')) {
	// $_GET['test'] is posted from the client by query strings in the URL
} else {
	// $_GET['test'] is assigned locally
}</code></pre>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2010/07/php-and-javascript-variable-value-transfer-exchange-how-to-pass-variable-values-from-php-to-javascript-or-javascript-to-php.html" rel="bookmark" title="July 9, 2010">PHP and JavaScript Variable / Value Transfer / Exchange: How to pass variable values from PHP to JavaScript or JavaScript to PHP?</a></li>
<li><a href="http://www.kavoir.com/2009/01/how-to-pass-variable-values-in-url-from-page-to-page-with-php.html" rel="bookmark" title="January 5, 2009">How to pass variable values in URL from page to page with PHP?</a></li>
<li><a href="http://www.kavoir.com/2009/01/php-checkbox-array-in-form-handling-multiple-checkbox-values-in-an-array.html" rel="bookmark" title="January 31, 2009">PHP: Checkbox Array in Form Handling &#8211; Multiple Checkbox Values in an Array</a></li>
<li><a href="http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html" rel="bookmark" title="January 9, 2009">Which is better for AJAX requests, GET or POST?</a></li>
<li><a href="http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html" rel="bookmark" title="March 4, 2010">PHP: How to detect / get the real client IP address of website visitors?</a></li>
</ul>
<p><!-- Similar Posts took 2.270 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP: How to detect / get the real client IP address of website visitors?</title>
		<link>http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html</link>
		<comments>http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 02:11:33 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html</guid>
		<description><![CDATA[It may seem simple at first because most of us should be relying on the server side environmental variable REMOTE_ADDR solely for client IP addresses: echo $_SERVER['REMOTE_ADDR']; Yet it’s barely enough to get the real IP for a variety of circumstances such as when the user is visiting your website from a proxy server. To [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>It may seem simple at first because most of us should be relying on the server side environmental variable REMOTE_ADDR solely for client IP addresses:</p>

<pre><code>echo <strong>$_SERVER['REMOTE_ADDR']</strong>;</code></pre>
<p>Yet it’s barely enough to get the real IP for a variety of circumstances such as when the user is visiting your website from a proxy server. To everyone’s surprise, there are a lot more environmental variables regarding client IP address than just the most straightforward one, REMOTE_ADDR. Consider this snippet in the attempt to detect the real source IP address of the request:</p>
<pre><code>function get_ip_address() {
    foreach (array('<strong>HTTP_CLIENT_IP</strong>', '<strong>HTTP_X_FORWARDED_FOR</strong>', '<strong>HTTP_X_FORWARDED</strong>', '<strong>HTTP_X_CLUSTER_CLIENT_IP</strong>', '<strong>HTTP_FORWARDED_FOR</strong>', '<strong>HTTP_FORWARDED</strong>', '<strong>REMOTE_ADDR</strong>') as $key) {
        if (array_key_exists($key, $_SERVER) === true) {
            foreach (explode(',', $_SERVER[$key]) as $ip) {
                if (<strong>filter_var</strong>($ip, FILTER_VALIDATE_IP) !== false) {
                    return $ip;
                }
            }
        }
    }
}</code></pre>
<p>It first searches through a series of possible environmental variables that may contain the client IP address and uses whichever that is set and then extract the potential IP value to be validated. After successful validation by the PHP5 <a href="http://www.kavoir.com/2010/03/php-check-or-validate-url-and-email-addresses-an-easier-way-than-regular-expressions-the-filter_var-function.html">filter_var</a>() function, the value is returned. You better not change the order these variable names are placed in the literal array.</p>
<p>This approach is much more sophisticated than just looking at REMOTE_ADDR but it’s far from mess-proof because it relies on the HTTP header information which can be easily manipulated anywhere along the way the request is routed to your server / website.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html" rel="bookmark" title="March 4, 2010">PHP: How to distinguish values in $_POST or $_GET that are sent via HTTP requests and those that are set / assigned in the code</a></li>
<li><a href="http://www.kavoir.com/2009/06/apache-php-get-client-browser-http-request-headers-information.html" rel="bookmark" title="June 2, 2009">Apache, PHP: Get Client Browser HTTP Request Headers Information</a></li>
<li><a href="http://www.kavoir.com/2010/07/php-and-javascript-variable-value-transfer-exchange-how-to-pass-variable-values-from-php-to-javascript-or-javascript-to-php.html" rel="bookmark" title="July 9, 2010">PHP and JavaScript Variable / Value Transfer / Exchange: How to pass variable values from PHP to JavaScript or JavaScript to PHP?</a></li>
<li><a href="http://www.kavoir.com/2010/02/use-php-to-handle-all-incoming-url-requests-in-a-seo-friendly-manner.html" rel="bookmark" title="February 23, 2010">Use PHP to handle all incoming URL requests in a SEO friendly manner</a></li>
<li><a href="http://www.kavoir.com/2010/03/php-check-or-validate-url-and-email-addresses-an-easier-way-than-regular-expressions-the-filter_var-function.html" rel="bookmark" title="March 4, 2010">PHP: Check or Validate URL and Email Addresses &ndash; an Easier Way than Regular Expressions, the filter_var() Function</a></li>
</ul>
<p><!-- Similar Posts took 2.753 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>2 reasons you should host all static content on a different domain</title>
		<link>http://www.kavoir.com/2010/01/2-reasons-you-should-host-all-static-content-on-a-different-domain.html</link>
		<comments>http://www.kavoir.com/2010/01/2-reasons-you-should-host-all-static-content-on-a-different-domain.html#comments</comments>
		<pubDate>Sun, 24 Jan 2010 07:19:19 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[Domains]]></category>
		<category><![CDATA[HTTP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2010/01/2-reasons-you-should-host-all-static-content-on-a-different-domain.html</guid>
		<description><![CDATA[That is, to host all static content such as ready-made images, scripts, style sheets on a different domain rather than the primary one that hosts the page of the current URL. For example, if you intend to add static images to the web page located at http://www.example.com/page.html, you should not place the images on www.example.com, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>That is, to host all static content such as ready-made images, scripts, style sheets on a different domain rather than the primary one that hosts the page of the current URL. For example, if you intend to add static images to the web page located at <strong>http://www.example.com/page.html</strong>, you should not place the images on <strong>www.example.com</strong>, instead, put them somewhere else such as <strong>example-static.com</strong> or <strong>static.example.com</strong>.</p>

<p>The first reasoning for this is that browsers load web assets one by one or sequentially from a single host. They will not start requesting and downloading the next asset until they are finished with the previous one from the same domain. Therefore, doubling the hosts or domains can accelerate the downloading speed by about 100% because browsers can simultaneously download stuff from 2 different domains.</p>
<p>Another reasoning is that if cookie or session is enabled on your website, the browser would send the session cookie every time it makes a request to the domain, which sort of is useless because it’s static content – the server doesn’t need the cookie at all to serve static content such as images. It’s not only a waste of bandwidth but also a waste of communication time. To avoid this, serve all static content from a domain that is not cookie enabled. For instance, if you have set cookie with <strong>example.com</strong>, you can host all static content at static.example.com, however, if you have enabled cookie by <strong>*.example.com</strong> instead of just example.com, you will need to register a whole different domain to host the static content to steer clear of the useless overhead.</p>
<p>Not much for a small site, but this would be a major improvement regarding user experience for established, popular websites.<br />
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/08/php-session-id-changes-automatically-at-every-request-page-load.html" rel="bookmark" title="August 26, 2009">PHP: Session ID changes automatically at every request / page load</a></li>
<li><a href="http://www.kavoir.com/2009/09/safely-and-quickly-transfer-files-between-your-hosts-hosting-accounts-servers-with-scp-command.html" rel="bookmark" title="September 18, 2009">scp, rsync: Safely and Quickly Transfer Files between Your Hosts / Hosting Accounts / Servers on SSH tunnel</a></li>
<li><a href="http://www.kavoir.com/2009/01/free-reverse-domain-ip-tool-for-other-websites-or-domains-on-the-same-server.html" rel="bookmark" title="January 11, 2009">Free Reverse Domain &amp; IP Tool for Other Websites or Domains on the Same Server</a></li>
<li><a href="http://www.kavoir.com/2009/07/bulk-domain-name-availability-checker-tool-to-batch-check-domain-availability.html" rel="bookmark" title="July 25, 2009">Bulk Domain Name Availability Checker Tool to Batch Search Available Domains</a></li>
<li><a href="http://www.kavoir.com/2009/04/php-curl-fetching-url-and-sending-request-with-cookies.html" rel="bookmark" title="April 22, 2009">PHP cURL: Fetching URL and Sending Request with Cookies</a></li>
</ul>
<p><!-- Similar Posts took 3.840 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2010/01/2-reasons-you-should-host-all-static-content-on-a-different-domain.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>scp, rsync: Safely and Quickly Transfer Files between Your Hosts / Hosting Accounts / Servers on SSH tunnel</title>
		<link>http://www.kavoir.com/2009/09/safely-and-quickly-transfer-files-between-your-hosts-hosting-accounts-servers-with-scp-command.html</link>
		<comments>http://www.kavoir.com/2009/09/safely-and-quickly-transfer-files-between-your-hosts-hosting-accounts-servers-with-scp-command.html#comments</comments>
		<pubDate>Fri, 18 Sep 2009 08:37:34 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[Linux Server Administration Tips]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/09/safely-and-quickly-transfer-files-between-your-hosts-hosting-accounts-servers-with-scp-command.html</guid>
		<description><![CDATA[Chances are you have a bunch of different hosts that are housing your website files, for the sake of data safety (never put all eggs in a single basket) and possibly some SEO advantage. If that is the case, you will infrequently come to the need to move some files from one host server to [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Chances are you have a bunch of different hosts that are housing your website files, for the sake of data safety (never put all eggs in a single basket) and possibly some SEO advantage. If that is the case, you will infrequently come to the need to move some files from one host server to another. How does one do that?</p>

<p>Well the straight answers include downloading the files from the source host and then uploading it to destination one via FTP. It’s not much of a time-waster with small number of files, especially those small in size. However, if it’s an impressively large chunk of package, say, 4GB, or thousands of files, this’d be quite a daunting job that may very well take the better part of your day or even a few days.</p>
<p>The shortcut is to transfer those files directly from the original host to the other, via SSH. That is of course, if you have both hosts enabled with SSH.</p>
<h2>scp Command</h2>
<p>Log into the destination host via SSH and try the following command:</p>
<pre><code><strong>scp</strong> -r remoteuser@remote.host.com:/home/remoteuser/dir-to-be-transferred/. /home/localuser/backup</code></pre>
<p>Wherein <strong>remote.host.com</strong> is the address of the source host and <strong>remoteuser</strong> is the SSH user (shell user) account that can read the remote directory to be transferred, namely <strong>/home/remoteuser/dir-to-be-transferred</strong>. The last argument is the local path that’s receiving the incoming files / directory.</p>
<p>The dot at the end of dir-to-be-transferred makes sure that all hidden files such as .htaccess are copied as well. Without the current directory sign (dot), hidden files are NOT copied by default.</p>
<p>You can also transfer a specific file:</p>
<pre><code><strong>scp</strong> remoteuser@remote.host.com:/home/remoteuser/mybackup.tar.gz /home/localuser/backup</code></pre>
<p>As a matter of fact, <strong>scp</strong> works the exactly same way as an ordinary <a href="http://www.kavoir.com/2009/04/php-copying-renaming-and-moving-a-file.html"><strong>cp</strong> command</a> except it’s able to copy files back and forth remote hosts. The “<strong>s</strong>” of “scp” stands for <strong>safe</strong>, because all the data transferred is encrypted on SSH.</p>
<p>It’s a great way to back up your valuable website data across multiple different hosts that are physically far away from each other. With the help of crontab jobs that do the regular backups automatically, this is even better than some of the commercial backup services.</p>
<h2>rsync Command</h2>
<p>The command of <strong>rsync</strong> is a more preferable option to <strong>scp</strong> for synchronizing stuff across different hosts because it compares differences and works incrementally, thus saving bandwidth, especially with large backups. For examples,</p>
<pre><code><strong>rsync</strong> -av --progress remoteuser@remote.host.com:/home/remoteuser/dir-to-be-transferred /home/localuser/backup</code></pre>
<p>This would copy and transfer the directory <strong>dir-to-be-transferred</strong> with all its content into <strong>backup</strong> so that <strong>dir-to-be-transferred</strong> is a sub-directory of <strong>backup</strong>.</p>
<pre><code><strong>rsync</strong> -av --progress remoteuser@remote.host.com:/home/remoteuser/dir-to-be-transferred/. /home/localuser/backup</code></pre>
<p>With an extra <strong>/.</strong> at the end of the source directory, only the content of the directory <strong>dir-to-be-transferred</strong> are copied and transferred into <strong>backup</strong>. Thus all the content of the directory <strong>dir-to-be-transferred</strong> are now immediate children of <strong>backup</strong>.</p>
<p>To specify the SSH port, such as 8023, just add:</p>
<pre><code> --rsh='ssh -p8023'</code></pre>
<p><strong>rsync</strong> automatically takes care of all hidden files, so there&#8217;s no need to add a dot at the end of the source directory.<br />
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/09/dropbox-review-the-most-intuitive-online-backup-storage-data-synchronizing-and-files-sharing-application.html" rel="bookmark" title="September 23, 2009">Dropbox review – the most intuitive online backup storage, data synchronizing and files sharing software</a></li>
<li><a href="http://www.kavoir.com/2011/02/linux-how-to-delete-remove-hidden-files-with-rm-command.html" rel="bookmark" title="February 12, 2011">Linux: How to delete / remove hidden files with &lsquo;rm&rsquo; command?</a></li>
<li><a href="http://www.kavoir.com/2007/03/essential-ssh.html" rel="bookmark" title="March 29, 2007">Essential SSH &#8211; 19 Linux SSH Commands You Simply Cannot Live Without</a></li>
<li><a href="http://www.kavoir.com/2009/10/free-2gb-html-static-web-pages-hosting.html" rel="bookmark" title="October 7, 2009">Free 2GB HTML static web pages hosting</a></li>
<li><a href="http://www.kavoir.com/2009/04/php-change-current-working-directory.html" rel="bookmark" title="April 22, 2009">PHP: Change Current Working Directory</a></li>
</ul>
<p><!-- Similar Posts took 4.620 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/09/safely-and-quickly-transfer-files-between-your-hosts-hosting-accounts-servers-with-scp-command.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Apache, PHP: Get Client Browser HTTP Request Headers Information</title>
		<link>http://www.kavoir.com/2009/06/apache-php-get-client-browser-http-request-headers-information.html</link>
		<comments>http://www.kavoir.com/2009/06/apache-php-get-client-browser-http-request-headers-information.html#comments</comments>
		<pubDate>Tue, 02 Jun 2009 11:27:45 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[Apache Web Server Tutorials & Tips]]></category>
		<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/06/apache-php-get-client-browser-http-request-headers-information.html</guid>
		<description><![CDATA[Every HTTP requests made by any client web browsers to an Apache should conform to the HTTP specification and provide certain set of headers information for the server to parse and understand. Useful headers information that can be retrieved in PHP by function apache_request_headers() includes: User-Agent: Operating System, browser and its version number, … Accept-Language: [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Every HTTP requests made by any client web browsers to an Apache should conform to the HTTP specification and provide certain set of headers information for the server to parse and understand. Useful headers information that can be retrieved in PHP by function <strong>apache_request_headers()</strong> includes:</p>

<ol>
<li>User-Agent: Operating System, browser and its version number, … </li>
<li>Accept-Language: Requesting client language </li>
<li>Accept-Charset: Character set of the client </li>
<li>… </li>
</ol>
<p>To get an array of the above client request headers information, just use apache_request_headers() function:</p>
<p> <code>$headers = <strong>apache_request_headers</strong>();</code>
<p>And you&#8217;ll get: </p>
<pre><code>Array
(
    [Host] =&gt; localhost
    [User-Agent] =&gt; Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 GTB5
    [Accept] =&gt; text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [Accept-Language] =&gt; en-us,en;q=0.5
    [Accept-Encoding] =&gt; gzip,deflate
    [Accept-Charset] =&gt; ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [Keep-Alive] =&gt; 300
    [Connection] =&gt; keep-alive
    [Cache-Control] =&gt; max-age=0
)</code></pre>
<p>Similarly, you can use <strong>apache_response_headers</strong>() to get the HTTP response headers information sent from your server to the client.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html" rel="bookmark" title="March 4, 2010">PHP: How to detect / get the real client IP address of website visitors?</a></li>
<li><a href="http://www.kavoir.com/2008/12/pretend-your-scraper-script-as-a-browser-when-scraping-in-php.html" rel="bookmark" title="December 29, 2008">Pretend your scraper script as a browser when scraping in PHP</a></li>
<li><a href="http://www.kavoir.com/2009/11/how-to-recover-lost-firefox-bookmarks-where-is-my-firefox-bookmarks-folder.html" rel="bookmark" title="November 12, 2009">How to recover lost Firefox bookmarks? Where is my Firefox bookmarks folder?</a></li>
<li><a href="http://www.kavoir.com/2009/01/php-run-html-as-php.html" rel="bookmark" title="January 19, 2009">PHP: Run HTML as PHP</a></li>
<li><a href="http://www.kavoir.com/2009/04/php-detecting-different-browsers.html" rel="bookmark" title="April 22, 2009">PHP: Detecting Different Browsers</a></li>
</ul>
<p><!-- Similar Posts took 4.355 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/06/apache-php-get-client-browser-http-request-headers-information.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP: Send HTML Email (mail)</title>
		<link>http://www.kavoir.com/2009/04/php-send-html-email-mail.html</link>
		<comments>http://www.kavoir.com/2009/04/php-send-html-email-mail.html#comments</comments>
		<pubDate>Thu, 23 Apr 2009 05:18:30 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/04/php-send-html-email-mail.html</guid>
		<description><![CDATA[As we all know the simplest approach to create an email message and send it out is to use the php mail() function. A typical usage example would be: mail('recipient@email.com', 'Subject Title', 'Message body goes here.'); However, as the mail() function sends emails in text/plain mime type by default, if you include HTML code in [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>As we all know the simplest approach to create an email message and send it out is to use the php <strong>mail</strong>() function. A typical usage example would be:<span id="more-835"></span></p>
<pre><code><strong>mail</strong>('recipient@email.com', 'Subject Title', 'Message body goes here.');</code></pre>
<p>However, as the mail() function sends emails in <strong>text/plain</strong> mime type by default, if you include HTML code in the message body, it would not be interpreted as HTML at all. Instead, all the tags and attributes are displayed as they are.</p>
<p>To work around this and <span style="text-decoration: underline;">send HTML email with PHP</span> <strong>mail</strong>() function, you will have to modify the message mime type to <strong>text/html</strong>. In practice, use the <strong>mail</strong>() function with an additional argument to set arbitrary headers for the email message:</p>
<pre><code><strong>$to</strong> = 'recipient@email.com';
<strong>$subject</strong> = 'Purchase Successful!';
<strong>$message</strong> = '
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;Purchase Successful!&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;p&gt;Here are the order details:&lt;/p&gt;
	&lt;p&gt; ... &lt;/p&gt;
	&lt;p&gt;&lt;a href="http://www.example.com"&gt;back to store&lt;/a&gt;&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;
';

<strong>$headers</strong>  = 'MIME-Version: 1.0' . "\r\n";
<strong>$headers</strong> .= 'Content-type: <strong>text/html</strong>; charset=iso-8859-1' . "\r\n";

<strong>mail</strong>($to, $subject, $message, <strong>$headers</strong>);</code></pre>
<p>Now the email dispatched to the recipient will have all the HTML in it working as expected.<br />
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/01/how-to-pass-variable-values-in-url-from-page-to-page-with-php.html" rel="bookmark" title="January 5, 2009">How to pass variable values in URL from page to page with PHP?</a></li>
<li><a href="http://www.kavoir.com/2009/08/php-email-attachment-class.html" rel="bookmark" title="August 6, 2009">PHP: Email Attachment Class</a></li>
<li><a href="http://www.kavoir.com/2009/12/a-basic-php-contact-form-script.html" rel="bookmark" title="December 10, 2009">A Simple PHP Contact Form Script</a></li>
<li><a href="http://www.kavoir.com/2007/03/spin-your-first-web-page.html" rel="bookmark" title="March 29, 2007">Create your first web page &#8211; Learn XHTML and Make Web pages</a></li>
<li><a href="http://www.kavoir.com/2010/05/the-ultimate-way-to-cloak-and-hide-any-website-address-or-url-stealth-forwarding.html" rel="bookmark" title="May 29, 2010">The Ultimate Way to Cloak and Hide any Website Address or URL (Stealth Forwarding)</a></li>
</ul>
<p><!-- Similar Posts took 3.988 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/04/php-send-html-email-mail.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP cURL: Fetching URL and Sending Request with Cookies</title>
		<link>http://www.kavoir.com/2009/04/php-curl-fetching-url-and-sending-request-with-cookies.html</link>
		<comments>http://www.kavoir.com/2009/04/php-curl-fetching-url-and-sending-request-with-cookies.html#comments</comments>
		<pubDate>Wed, 22 Apr 2009 12:50:15 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/04/php-curl-fetching-url-and-sending-request-with-cookies.html</guid>
		<description><![CDATA[One of the things the remote web server inspects is the client cookie to know about the requester. If you need cURL to simulate a user browser that sends cookie information to the web server, you need the following options: $c = curl_init('http://www.example.com/needs-cookies.php'); curl_setopt ($c, CURLOPT_COOKIE, 'user=ellen; activity=swimming'); curl_setopt ($c, CURLOPT_RETURNTRANSFER, true); $page = curl_exec [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>One of the things the remote web server inspects is the client cookie to know about the requester. If you need <strong>cURL</strong> to simulate a user browser that sends cookie information to the web server, you need the following options:</p>

<pre><code>$c = curl_init('http://www.example.com/needs-cookies.php');
curl_setopt ($c, <strong>CURLOPT_COOKIE</strong>, '<u>user=ellen; activity=swimming</u>');
curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec ($c);
curl_close ($c);</code></pre>
<p>So, the HTTP request cURL sends out to www.example.com will take the cookie data with it, thus the remote script needs-cookies.php knows the information and determines that the request is sent from the user ellen’s web browser.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/04/php-curl-making-post-request-to-url.html" rel="bookmark" title="April 22, 2009">PHP cURL: Making POST Request to URL</a></li>
<li><a href="http://www.kavoir.com/2008/12/pretend-your-scraper-script-as-a-browser-when-scraping-in-php.html" rel="bookmark" title="December 29, 2008">Pretend your scraper script as a browser when scraping in PHP</a></li>
<li><a href="http://www.kavoir.com/2010/03/php-setcookie-with-httponly-option-to-prevent-xss-cross-site-scripting-attacks.html" rel="bookmark" title="March 4, 2010">PHP: setcookie() with HttpOnly Option to Reduce XSS (Cross Site Scripting) Attacks by Preventing JavaScript from Reading Cookies</a></li>
<li><a href="http://www.kavoir.com/2010/03/php-how-to-detect-get-the-real-client-ip-address-of-website-visitors.html" rel="bookmark" title="March 4, 2010">PHP: How to detect / get the real client IP address of website visitors?</a></li>
<li><a href="http://www.kavoir.com/2009/06/apache-php-get-client-browser-http-request-headers-information.html" rel="bookmark" title="June 2, 2009">Apache, PHP: Get Client Browser HTTP Request Headers Information</a></li>
</ul>
<p><!-- Similar Posts took 4.476 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/04/php-curl-fetching-url-and-sending-request-with-cookies.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP cURL: Making POST Request to URL</title>
		<link>http://www.kavoir.com/2009/04/php-curl-making-post-request-to-url.html</link>
		<comments>http://www.kavoir.com/2009/04/php-curl-making-post-request-to-url.html#comments</comments>
		<pubDate>Wed, 22 Apr 2009 12:42:50 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[PHP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/04/php-curl-making-post-request-to-url.html</guid>
		<description><![CDATA[By default, all HTTP requests made out by cURL is GET requests that simply fetches the URL and don’t submit any more POST variables. However, if you need to fetch and retrieve URL by the POST method with cURL, you need the snippet below: $url = 'http://www.example.com/submit.php'; // The submitted form data, encoded as query-string-style [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>By default, all <a href="http://www.google.com/url?sa=U&amp;start=4&amp;q=http://www.kavoir.com/2009/03/http-explained-what-does-http-stand-for-what-is-http-meaning-and-https-definition.html&amp;ei=KRDvSfCNJJHy6gP0n5TcAw&amp;usg=AFQjCNGttxtoD5r9lLGKdjOnVPoHJg_BTQ">HTTP</a> requests made out by <a href="http://www.php.net/curl">cURL</a> is GET requests that simply fetches the URL and don’t submit any more POST variables.</p>

<p>However, if you need to fetch and retrieve URL by the POST method with cURL, you need the snippet below:</p>
<pre><code>$url = 'http://www.example.com/submit.php';
// The submitted form data, encoded as query-string-style
// name-value pairs
$body = 'monkey=uncle&amp;rhino=aunt';
$c = curl_init ($url);
curl_setopt ($c, <strong>CURLOPT_POST</strong>, <u>true</u>);
curl_setopt ($c, <strong>CURLOPT_POSTFIELDS</strong>, <u>$body</u>);
curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec ($c);
curl_close ($c);</code></pre>
<p>Make sure you have set <strong>CURLOPT_POST</strong> to true and attached the POST variables in the form of a GET series of name=value couples by <strong>CURLOPT_POSTFIELDS</strong>.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2009/04/php-curl-fetching-url-and-sending-request-with-cookies.html" rel="bookmark" title="April 22, 2009">PHP cURL: Fetching URL and Sending Request with Cookies</a></li>
<li><a href="http://www.kavoir.com/2008/12/pretend-your-scraper-script-as-a-browser-when-scraping-in-php.html" rel="bookmark" title="December 29, 2008">Pretend your scraper script as a browser when scraping in PHP</a></li>
<li><a href="http://www.kavoir.com/2009/01/how-to-pass-variable-values-in-url-from-page-to-page-with-php.html" rel="bookmark" title="January 5, 2009">How to pass variable values in URL from page to page with PHP?</a></li>
<li><a href="http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html" rel="bookmark" title="March 4, 2010">PHP: How to distinguish values in $_POST or $_GET that are sent via HTTP requests and those that are set / assigned in the code</a></li>
<li><a href="http://www.kavoir.com/2010/04/javascript-confirmation-warning-before-leaving-or-navigating-away-from-a-page.html" rel="bookmark" title="April 27, 2010">JavaScript: Confirmation / Warning before Leaving or Navigating Away from a Page</a></li>
</ul>
<p><!-- Similar Posts took 2.866 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/04/php-curl-making-post-request-to-url.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HTTP Explained: What Does HTTP Stand For, What is HTTP Meaning and HTTP&#8217;s Definition?</title>
		<link>http://www.kavoir.com/2009/03/http-explained-what-does-http-stand-for-what-is-http-meaning-and-https-definition.html</link>
		<comments>http://www.kavoir.com/2009/03/http-explained-what-does-http-stand-for-what-is-http-meaning-and-https-definition.html#comments</comments>
		<pubDate>Tue, 24 Mar 2009 11:12:19 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[Computer & Internet Literacy]]></category>
		<category><![CDATA[HTTP Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/03/http-explained-what-does-http-stand-for-what-is-http-meaning-and-https-definition.html</guid>
		<description><![CDATA[What is HTTP in all the web site URLs / web page addresses you see everywhere online? HTTP Explained: Just like people communicate with each other following certain protocols, HTTP is the protocol between the client (your computer using web browsers) and the server (web server serving web pages and similar online resources). So what [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>What is HTTP in all the web site URLs / web page addresses you see everywhere online?</p>

<p><strong>HTTP Explained</strong>: Just like people communicate with each other following certain protocols, HTTP is the protocol between the <strong>client</strong> (your computer using web browsers) and the <strong>server</strong> (web server serving web pages and similar online resources).</p>
<h2>So what does HTTP stand for?</h2>
<p><strong>HTTP</strong> stands for <span style="text-decoration: underline;"><strong>H</strong>yper<strong>T</strong>ext <strong>T</strong>ransfer <strong>P</strong>rotocol</span>. It&#8217;s what browsers and web servers rely on for exchanging data so that you can surf the web, browse web pages, search <a href="http://www.kavoir.com/2009/03/a-new-religion.html">Google</a>, download pictures, and viewing YouTube. Developed by <a href="http://www.w3.org/">W3C</a> and <a href="http://www.ietf.org/">IETF</a> in the last few years of the last century, it&#8217;s part of a bigger protocol family created to support the whole Internet, called TCP/IP. As a subset, HTTP&#8217;s responsibility is the World Wide Web or WWW.</p>
<p>By HTTP definition and usage, it&#8217;s fundamentally an <span style="text-decoration: underline;">information exchanging procedure standard</span> between 2 communicating parties or computers, such as the client and the server. While you type a URL address in the web browser, the browser will have to know the protocol to use when fetching the remote resource such as a web page or a picture at that address. Failing to do so, as we most of the time would do without the <strong>http://</strong> part, the browser will assume HTTP by default and prepend it to the URL address.</p>
<h2>What does HTTP mean in a web address URL?</h2>
<p>A web address representing an access point on the web almost always start with http://, immediately followed by the web page address such as in this one:</p>
<p><code><strong>http</strong>://www.google.com/</code></p>
<p>This is the root web site address of Google. And browsing to it, the server located at the address would serve up the home page of Google. This is all beyond the meaning of HTTP however, what this basically means is that, a web address consists of 2 basic parts:</p>
<ol>
<li><strong>Protocol</strong> (HTTP)</li>
<li><strong>Address</strong> (WWW.GOOGLE.COM)</li>
</ol>
<p>To understand HTTP and HTTP&#8217;s meaning, imagine your need to talk to someone. You will have to get his physical address and then you need to know the language he speaks (or any other possible routines you are expected to follow in order to talk to him instead of being rejected by him). And the role of language here is what the protocol of HTTP is playing in online addressing.</p>
<h2>Why is HTTP important?</h2>
<p><img class="alignleft" style="margin: 0px 10px 0px 0px;" title="Why is HTTP so important?" src="http://www.kavoir.com/wp-content/uploads/2009/03/httpdefinition.jpg" alt="HTTP Definition: What does HTTP stand for and Why is HTTP so important?" /> HTTP as a protocol is just part of a bigger protocol family that has been developed to make the whole Internet possible. Every second, billions of computers are communicating and exchanging data across the gigantic network, however, <span style="text-decoration: underline;">physically limited telecommunication facilities</span> make it necessary to have rules.</p>
<p>Just like a huge metropolis with millions of cars. Wouldn&#8217;t it be a total mess should there be no <span style="text-decoration: underline;">traffic rules and regulations</span>? It&#8217;s the same with the Internet. Without protocols like HTTP, it&#8217;d be a nightmare and all of this will be completely impossible.</p>
<p>That said, not only HTTP is indispensable for the Internet and WWW, but all other protocols are as important in Internet communications, albeit in less uses.</p>
<h2>What is HTTPS and what does HTTPS stand for?</h2>
<p>HTTPS stands for <span style="text-decoration: underline;"><strong>H</strong>yper<strong>T</strong>ext <strong>T</strong>ransfer <strong>P</strong>rotocol <strong>S</strong>ecure</span> and is a secure version of HTTP. It&#8217;s basically an encrypted HTTP channel that encrypts all the information being exchanged, making transferring of confidential information secure from eavesdropping.</p>
<h2>Does HTTP have peers or sisters?</h2>
<p>Definitely. And <strong>FTP</strong> is one of them. You may have seen URL addresses similar to this:</p>
<p><code><strong>ftp</strong>://ftp.xxxxx.com</code></p>
<p>With a <strong>ftp://</strong> preceding, browsers would know it&#8217;s the FTP protocol that it needs to initiate the download.<br />
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2010/03/use-relative-protocol-url-address-to-automatically-determine-web-address-protocol-http-or-https.html" rel="bookmark" title="March 6, 2010">Use Relative Protocol URL Address to Automatically Determine Web Address Protocol (HTTP or HTTPS)</a></li>
<li><a href="http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html" rel="bookmark" title="January 9, 2009">Which is better for AJAX requests, GET or POST?</a></li>
<li><a href="http://www.kavoir.com/2010/05/the-ultimate-way-to-cloak-and-hide-any-website-address-or-url-stealth-forwarding.html" rel="bookmark" title="May 29, 2010">The Ultimate Way to Cloak and Hide any Website Address or URL (Stealth Forwarding)</a></li>
<li><a href="http://www.kavoir.com/2010/04/css-how-to-write-css-rules-to-detect-or-target-chrome-safari-or-opera-browsers-only.html" rel="bookmark" title="April 1, 2010">CSS: How to write CSS rules to detect or target Chrome, Safari or Opera browsers only?</a></li>
<li><a href="http://www.kavoir.com/2010/05/use-htaccess-to-allow-access-only-from-a-single-http-referrer.html" rel="bookmark" title="May 30, 2010">Use .htaccess to allow access only from a single HTTP referrer</a></li>
</ul>
<p><!-- Similar Posts took 3.028 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/03/http-explained-what-does-http-stand-for-what-is-http-meaning-and-https-definition.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Free Online Visual Trace Route Tool</title>
		<link>http://www.kavoir.com/2009/01/free-online-visual-trace-route-tool.html</link>
		<comments>http://www.kavoir.com/2009/01/free-online-visual-trace-route-tool.html#comments</comments>
		<pubDate>Sun, 11 Jan 2009 06:57:11 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[Internet Tools]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/01/free-online-visual-trace-route-tool.html</guid>
		<description><![CDATA[Trace route (command) is a common network diagnostic tool to debug network problems or check how data is passed through the whole network through all different kinds of computers, routers and such. A visual trace route tool, however, draws the data passage in illustrative diagrams or on a map for visionary perception graphically. You Get [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Trace route</strong> (command) is a common network diagnostic tool to debug network problems or check how data is passed through the whole network through all different kinds of computers, routers and such. A <strong>visual trace route</strong> tool, however, draws the data passage in illustrative diagrams or on a map for visionary perception graphically.</p>

<p><a href="http://www.yougetsignal.com/tools/visual-tracert/">You Get Signal</a> just offers the kind of free tracer route we need. It’s a trace router that traces and records all the IP a TCP packet is travelling on the Internet, mapping it on Google map while also printing the locations (IP) the packet of data has been through on the right.</p>
<p><img title="visual trace router" alt="visual trace router" src="http://www.kavoir.com/wp-content/uploads/2009/01/visualtracerouter.png" /> </p>
<p>One of the interesting things this free routing tracer tool offers is that it gives the total distance the data has travelled in miles.</p>
<p>Visit the tool: <a href="http://www.yougetsignal.com/tools/visual-tracert/">http://www.yougetsignal.com/tools/visual-tracert/</a></p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2008/04/crontab-jobs-trick-on-dreamhost.html" rel="bookmark" title="April 27, 2008">Cron jobs (Crontab jobs) tricks and tips on DreamHost</a></li>
<li><a href="http://www.kavoir.com/2009/04/what-is-this-linux-command.html" rel="bookmark" title="April 14, 2009">What is this Linux command?</a></li>
<li><a href="http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html" rel="bookmark" title="January 9, 2009">Which is better for AJAX requests, GET or POST?</a></li>
<li><a href="http://www.kavoir.com/2009/07/bulk-domain-name-availability-checker-tool-to-batch-check-domain-availability.html" rel="bookmark" title="July 25, 2009">Bulk Domain Name Availability Checker Tool to Batch Search Available Domains</a></li>
<li><a href="http://www.kavoir.com/2009/04/web-hosting-connection-speed-test.html" rel="bookmark" title="April 20, 2009">Web Hosting Connection Speed Test</a></li>
</ul>
<p><!-- Similar Posts took 2.833 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/01/free-online-visual-trace-route-tool.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Which is better for AJAX requests, GET or POST?</title>
		<link>http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html</link>
		<comments>http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html#comments</comments>
		<pubDate>Fri, 09 Jan 2009 14:44:51 +0000</pubDate>
		<dc:creator>Yang Yang</dc:creator>
				<category><![CDATA[AJAX Tips and Tricks]]></category>
		<category><![CDATA[HTTP Tips & Tutorials]]></category>
		<category><![CDATA[JavaScript Tips & Tutorials]]></category>

		<guid isPermaLink="false">http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html</guid>
		<description><![CDATA[As per HTTP protocol specifications, client browsers send http post requests in two-step processes: 1) send the headers, 2) send the data. Therefore, for websites with high volume traffic, it’s definitely preferable to choose GET method for AJAX requests over HTTP, because all it takes for GET to get out is a URL request, which [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>As per HTTP protocol specifications, client browsers send http post requests in two-step processes: 1) send the headers, 2) send the data.</p>

<p>Therefore, for websites with high volume traffic, it’s definitely preferable to choose <strong>GET method</strong> for AJAX requests over HTTP, because all it takes for GET to get out is a URL request, which is basically a TCP packet if you don’t have a lot of cookies.</p>
<p>However, as there is a limit on the length of the URL in Internet Explorer which is approximately 2k, so technically <em><u>you can’t send a GET request with data more than that</u></em>.</p>
<p>Another approach is to determine whether to use GET or POST is that, according to HTTP specification, GET is for fetching data while POST is for supplying. In this sense, use GET for <strong>data retrieval</strong> tasks and POST for <strong>data input</strong> tasks.</p>
<h3>Related Posts:</h3>
<ul class="similar-posts">
<li><a href="http://www.kavoir.com/2010/03/php-how-to-distinguish-values-in-_post-or-_get-that-are-sent-via-http-requests-and-those-that-are-set-assigned-in-the-code.html" rel="bookmark" title="March 4, 2010">PHP: How to distinguish values in $_POST or $_GET that are sent via HTTP requests and those that are set / assigned in the code</a></li>
<li><a href="http://www.kavoir.com/2008/04/comment-tag-in-internet-explorer-of-both-windows-and-mac.html" rel="bookmark" title="April 9, 2008">Proprietary HTML comment tag in Internet Explorer of both Windows and Mac</a></li>
<li><a href="http://www.kavoir.com/2009/12/php-regular-expression-matching-input-subject-string-length-limit.html" rel="bookmark" title="December 12, 2009">PHP: Subject String Length Limit of Regular Expression Matching Functions</a></li>
<li><a href="http://www.kavoir.com/2009/04/php-curl-making-post-request-to-url.html" rel="bookmark" title="April 22, 2009">PHP cURL: Making POST Request to URL</a></li>
<li><a href="http://www.kavoir.com/2010/07/php-and-javascript-variable-value-transfer-exchange-how-to-pass-variable-values-from-php-to-javascript-or-javascript-to-php.html" rel="bookmark" title="July 9, 2010">PHP and JavaScript Variable / Value Transfer / Exchange: How to pass variable values from PHP to JavaScript or JavaScript to PHP?</a></li>
</ul>
<p><!-- Similar Posts took 7.061 ms --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kavoir.com/2009/01/which-is-better-for-ajax-requests-get-or-post.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

