<?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>Hot Scripts Blog &#187; Others</title>
	<atom:link href="http://www.hotscripts.com/blog/category/tutorials/others/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hotscripts.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 14 Feb 2012 12:44:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Overview XML encryption</title>
		<link>http://www.hotscripts.com/blog/overview-xml-encryption/</link>
		<comments>http://www.hotscripts.com/blog/overview-xml-encryption/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 03:01:24 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=673</guid>
		<description><![CDATA[XML encryption classifies a course of action for encrypting plain text data, generating ciphertext, and decrypting the ciphertext to retrieve the plaintext data.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/overview-xml-encryption/">Overview XML encryption</a></p>

Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/digital-signatures-in-xml/' rel='bookmark' title='Digital Signatures in XML'>Digital Signatures in XML</a></li>
<li><a href='http://www.hotscripts.com/blog/html-with-xml-data-binding/' rel='bookmark' title='HTML with XML Data Binding'>HTML with XML Data Binding</a></li>
<li><a href='http://www.hotscripts.com/blog/smarty-vs-xmlxslt/' rel='bookmark' title='Smarty vs. XML/XSLT'>Smarty vs. XML/XSLT</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>XML encryption classifies a course of action for encrypting plain text data, generating ciphertext, and decrypting the ciphertext to retrieve the plaintext data.</p>
<p>Both the &lt;EncryptionMethod&gt; and &lt;KeyInfo&gt; are optional i.e. the sender and receiver may agree on the encryption method and key in advance. Several elements use the definitions from the DSIG.</p>
<p>If the recipient does not know the decryption key in advance, then the sender generates and sends it. The key can be protected in transit by encrypting method or key agreement.</p>
<p>If the plaintext data to encrypt is an XML element or content, you encode it using UTF-8 and perform any necessary transforms to it, otherwise, if it is an external resource, you simply consider it as an octet sequence. You then encrypt the data, creating CipherValue, which you place in EncryptedData.</p>
<p>Care must be taken when signing content that may later be encrypted; clearly; the content must be restored to exactly the original plaintext form for the signature to validate properly. To restore the plaintext in the signed content, use the decryption transform method for XML signature defined by the XML encrypt joint W3C and IETF working group.</p>
<p>This transform also allows specifications of XML fragments that were encrypted and then signed with rest of the document and, therefore, are not decrypted to validate the signature. Often, encrypted fragments are removed from the signed information by using the XPATH transform in the reference element, since the meaningful information is the plaintext.</p>
<p>We can sign the plaintext version of an encrypted element by including the appropriate reference element pointing to it. When the signed document is confidential and encrypted after being signed, you should also protect against surreptitious forwarding in which the recipient forwards the signed confidential document to a competitor, encrypted by the competitor public key, trying to make it look as if the sender sent the confidential information. To prevent surreptitious forwarding, the signer should append the recipient identities to the document being signed.</p>
<p>If the recipient does not know the decryption key in advance, then the sender generates and sends it. The key can be protected in transit by encrypting method or key agreement.</p>
<p>If the plaintext data to encrypt is an XML element or content, you encode it using UTF-8 and perform any necessary transforms to it, otherwise, if it is an external resource, you simply consider it as an octet sequence. You then encrypt the data, creating CipherValue, which you place in EncryptedData.</p>
<p>Care must be taken when signing content that may later be encrypted; clearly; the content must be restored to exactly the original plaintext form for the signature to validate properly. To restore the plaintext in the signed content, use the decryption transform method for XML signature defined by the XML encrypt joint W3C and IETF working group.</p>
<p>This transform also allows specifications of XML fragments that were encrypted and then signed with rest of the document and, therefore, are not decrypted to validate the signature. Often, encrypted fragments are removed from the signed information by using the XPATH transform in the reference element, since the meaningful information is the plaintext.</p>
<p>We can sign the plaintext version of an encrypted element by including the appropriate reference element pointing to it. When the signed document is confidential and encrypted after being signed, you should also protect against surreptitious forwarding in which the recipient forwards the signed confidential document to a competitor, encrypted by the competitor public key, trying to make it look as if the sender sent the confidential information. To prevent surreptitious forwarding, the signer should append the recipient identities to the document being signed.</p>
<div class="hotlist"><strong>Author: Pawan Bangar</strong> of <a href="http://www.birbals.com/">birdals.com</a></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/overview-xml-encryption/">Overview XML encryption</a></p>
<p>Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/digital-signatures-in-xml/' rel='bookmark' title='Digital Signatures in XML'>Digital Signatures in XML</a></li>
<li><a href='http://www.hotscripts.com/blog/html-with-xml-data-binding/' rel='bookmark' title='HTML with XML Data Binding'>HTML with XML Data Binding</a></li>
<li><a href='http://www.hotscripts.com/blog/smarty-vs-xmlxslt/' rel='bookmark' title='Smarty vs. XML/XSLT'>Smarty vs. XML/XSLT</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/overview-xml-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prevent Hotlinking With htaccess</title>
		<link>http://www.hotscripts.com/blog/prevent-hotlinking-with-htaccess/</link>
		<comments>http://www.hotscripts.com/blog/prevent-hotlinking-with-htaccess/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 03:01:22 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=690</guid>
		<description><![CDATA[One of the most irritating things to find, is someone linking to your images, and running up your bandwidth. Stop it with htaccess.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/prevent-hotlinking-with-htaccess/">Prevent Hotlinking With htaccess</a></p>

Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/htaccess-wrappers-with-php/' rel='bookmark' title='.htaccess Wrappers with PHP'>.htaccess Wrappers with PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana; ">One of the most irritating things to find, is someone linking to your images, and running up your bandwidth.</span></p>
<p><span style="font-family: Verdana; ">You go through your web statistics and find a website that has not only stolen your images, but in fact simply linked right to them, on your server.</span></p>
<p><span style="font-family: Verdana; ">The problem with this is not just the theft of your images, but it runs up your bandwidth as well.  This is known as &#8220;Leeching&#8221;.</span></p>
<p><span style="font-family: Verdana; "><strong>A few options to choose from</strong><br />
When using htaccess to protect your images, you have a few options.  These options determin who can and who cannot link to your images.</span></p>
<p><span style="font-family: Verdana; ">I will cover a few of them here.</span></p>
<p><span style="font-family: Verdana; ">Creating the htaccess file (some things to remember)<br />
A few things to remember about htaccess, is that any folder you place the htaccess file in, it will affect that folder, and any folder beneath it.</span></p>
<p><span style="font-family: Verdana; ">The first thing you will want to do is open a text editor, I prefer Crimson Editor or Notepad.</span></p>
<p><span style="font-family: Verdana; ">The first basic bit of code will be used to turn on mod_rewrite, and tell the server which domains will be allowed to link to your files.</span></p>
<p><span style="font-family: Verdana; color: #ff0000; font-size: xx-small;">RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]</span></p>
<p><span style="font-family: Verdana; ">Line one turns on the mod_rewrite engine.  The second and third line is telling the server to look for referrer strings that are not left blank.  The third line is telling the server which domains are allowed to link to your files.</span></p>
<p><span style="font-family: Verdana; ">If you want to allow more than your domain to link to your files, you can add them by adding more RewriteCond lines.  For example:</span></p>
<p><span style="font-family: Verdana; color: #ff0000; font-size: xx-small;">RewriteCond %{HTTP_REFERER} !^http://(www\.)?seconddomain.com(/)?.*$ [NC]<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?thirddomain.com(/)?.*$ [NC]</span></p>
<p><span style="font-family: Verdana; "><strong>Which file extensions do you want to protect?</strong><br />
The following code, added to the bottom of the above code, will tell the server which file extensions you want to protect.  Using the the F and NC flags basically tell the server that it&#8217;s Forbidden from accessing the files, and the NC flag means No Case, telling the server to ignore the case (i.e. bmp and BMP will be treated the same):</span></p>
<p><span style="font-family: Verdana; color: #ff0000; font-size: xx-small;">RewriteRule .*\.(gif|jpe?g|png|bmp)$ [F,NC]</span></p>
<p><span style="font-family: Verdana; "><strong>The completed code</strong><br />
When you compile al of this code thus far, you will have enough to protect your images, and bandwidth:</span></p>
<p><span style="font-family: Verdana; color: #ff0000; font-size: xx-small;">RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]<br />
RewriteRule .*\.(gif|jpe?g|png|bmp)$ [F,NC]</span></p>
<p><span style="font-family: Verdana; "><strong>Displaying an image of your choice</strong><br />
Keep in mind that this option will not protect your bandwidth, but more so allow you to control it better, as well as display a humiliating image on the leecher&#8217;s site.</span></p>
<p><span style="font-family: Verdana; ">The RewriteRule that we used above, to determine the file extensions you want to protect, can be added to, to display your own image on the leecher&#8217;s site.  You can change the line to:</span></p>
<p><span style="font-family: Verdana; color: #ff0000; font-size: xx-small;">RewriteRule \.(gif|jpe?g|png|bmp)$ /images/humiliatingimage.gif [L,NC]</span></p>
<p><span style="font-family: Verdana; ">Like I said however, this will not save your bandwidth as it is still displaying the &#8220;humiliating&#8221; image from your server.</span></p>
<p><span style="font-family: Verdana; ">The completed code would then look like this:<br />
<span style="color: #ff0000; font-size: xx-small;">RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain.com(/)?.*$ [NC]<br />
RewriteRule \.(gif|jpe?g|png|bmp)$ /images/humiliatingimage.gif [L,NC]</span></span></p>
<p><span style="font-family: Verdana; "><strong>Saving your file</strong><br />
Now save your htaccess file as .htaccess.  Make sure there is no .txt extension on it, as this will not function properly.</span></p>
<p><span style="font-family: Verdana; ">Upload the htaccess file to the folder of your choice, and there you have it!</span></p>
<div class="hotlist"><strong>About the Author: Joni Carlton</strong></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/prevent-hotlinking-with-htaccess/">Prevent Hotlinking With htaccess</a></p>
<p>Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/htaccess-wrappers-with-php/' rel='bookmark' title='.htaccess Wrappers with PHP'>.htaccess Wrappers with PHP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/prevent-hotlinking-with-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using SSI&#8217;s to Ease Site Maintenance</title>
		<link>http://www.hotscripts.com/blog/ssis-site-maintenance/</link>
		<comments>http://www.hotscripts.com/blog/ssis-site-maintenance/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 03:00:55 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=710</guid>
		<description><![CDATA[Server Side Includes can make your website easier to update and maintain. Learn the basics from this article.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/ssis-site-maintenance/">Using SSI&#8217;s to Ease Site Maintenance</a></p>

No related posts.]]></description>
			<content:encoded><![CDATA[<div><span><span style="font-family: Verdana; color: #000000; ">Before building a site, every webmaster has to make a decision on what layout method to use. Most seem to go with either a frame or a table-based layout, the latter being more popular in these days. While both of these have their advantages and disadvantages, a frame-based site is usually easier to update. If you happen to have a 200-page site with the same navigation on every page, adding one link to the navigation menu might require you to edit all of the pages if the design is built with tables. On the other hand, if the site uses frames, you can get by with changing just a few files and save yourself a lot of time. </span></p>
<p><span style="font-family: Verdana; color: #000000; ">No, I&#8217;m not trying to convince you to switch to frames. I myself use tables and am not going to change my layout. The only problem is that over time, sites tend to grow. It just might be possible to edit around 20 pages when you want to change something, but when we start talking 50 or over one hundred, it just doesn&#8217;t seem like a good idea. Unless you are prepared to spend hours trying to keep your navigation menu up to date, you have to come up with a better way of doing things. </span></p>
<p><span style="font-family: Verdana; color: #000000; "><strong>SSI&#8217;s to the Rescue</strong></span></p>
<p><span style="font-family: Verdana; color: #000000; ">If your host supports Server Side Includes and is running Apache, you can use this article to make your table design as easy to maintain as it would be if you were using frames. The best part is that visitors won&#8217;t even notice that you have changed anything. After the new system is in place, they will see exactly the same design and HTML code as before, but you will be saved from hours of monotonous work. </span></p>
<p><span style="font-family: Verdana; color: #000000; ">Server Side Includes, or SSI&#8217;s, can be used in many ways. With them you can execute CGI programs, display the current date &amp; time on your page and do plenty of other things as well. In this article, we use them for including external files to your HTML. The idea is to create a separate file from your navigation menu and use SSI&#8217;s to point to it, requiring you to merely edit one file when you wish to change the navigation. </span></p>
<p><span style="font-family: Verdana; color: #000000; ">Should you have some knowledge of Server Side Includes, you might be a little worried. Doesn&#8217;t this require that you rename all your pages from &#8220;.html&#8221; to &#8220;.shtml&#8221; if you want it to work? That would take a lot of time, break the links that are pointing to your site and you might have to resubmit your pages to the search engines. Is it reasonable to go through all that trouble to make maintaining your site a little easier? </span></p>
<p><span style="font-family: Verdana; color: #000000; ">Fortunately, there&#8217;s no need to start renaming any files. You can simply instruct the server to treat your &#8220;.html&#8221; files as &#8220;.shtml&#8221; files and execute all SSI instructions in them. This can be done with a &#8220;.htaccess&#8221; file. If you already have one, you&#8217;ll have to edit it. If you don&#8217;t, open up a text editor, such as Notepad, and paste the following lines into a blank file. Be sure to replace .html with .htm, if you&#8217;re using that extension. </span></p>
<p><span style="font-family: Courier New; color: #ff0000; ">Options Includes<br />
AddType text/html .html<br />
AddHandler server-parsed .html</span><br />
<span style="font-family: Verdana; color: #000000; ">Save the file in &#8220;All files&#8221; mode and name it &#8220;<span style="font-family: Courier New;">.htaccess</span>&#8220;. Include the quotes so that Notepad won&#8217;t decide to name the file &#8220;.<span style="font-family: Courier New;">htaccess.txt</span>&#8220;. </span></p>
<p><span style="font-family: Verdana; color: #000000; "><strong>Changing Your Pages</strong></span></p>
<p><span style="font-family: Verdana; color: #000000; ">After the .htaccess file has been created, you&#8217;ll have to make changes to your HTML files. To be on the safe side, take backups of them before doing anything. Then, paste the HTML you use to generate the menu from one of your pages into a blank file. Save the file as &#8220;navig.html&#8221; for example. Next, remove the navigation menu from all of your pages. Replace it with the following line: </span></p>
<p><span style="font-family: Verdana; color: #000000; "><span style="font-family: Courier New; color: #ff0000;">&lt;!&#8211;#include file=&#8221;navig.html&#8221; &#8211;&gt;</span> </span></p>
<p><span style="font-family: Verdana; color: #000000; ">What you&#8217;re doing is telling the server to insert the code from &#8220;navig.html&#8221; into the page. This will be done before the page is sent to the user who has requested it, so anyone visiting your site will merely see a normal HTML file. When you have finished editing your files, connect to your host via FTP and upload the &#8220;.htaccess&#8221; file, the &#8220;navig.html&#8221; file and the new versions of your content pages. </span></p>
<p><span style="font-family: Verdana; color: #000000; ">Then it is time for the true test, trying to visit your site and see what happens. If you have done everything correctly, you should see that your pages look the same as before. However, if you make a simple change to the &#8220;navig.html&#8221; file, it will apply to the navigation menu of every page. What used to take minutes or even hours can now be done in seconds, giving you the possibility to use that valuable time to do something other than changing the HTML code of each page separately.</span></p>
<p></span></div>
<div class="hotlist"><strong>About the Author:Lauri Harpf</strong><br />Lauri Harpf runs the A Promotion Guide website, where he offers free information about search engines, directories and other promotion methods. His site can be found at <a href="http://www.apromotionguide.com/">http://www.apromotionguide.com/</a></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/ssis-site-maintenance/">Using SSI&#8217;s to Ease Site Maintenance</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/ssis-site-maintenance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cascading Style Sheets Basics</title>
		<link>http://www.hotscripts.com/blog/css-basics/</link>
		<comments>http://www.hotscripts.com/blog/css-basics/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 03:00:55 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=712</guid>
		<description><![CDATA[If you're not a web designer, but have nevertheless experimented with HTML or popular editors like FrontPage to try to build a website, if you didn't use cascading style sheets you probably came across most of the common problems that cascading style sheets were created to solve.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/css-basics/">Cascading Style Sheets Basics</a></p>

Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/basics-of-setting-cookies-with-php/' rel='bookmark' title='Basics of Setting Cookies with PHP'>Basics of Setting Cookies with PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div><span><span style="font-family: Verdana; color: #ff0000; "><strong>If you don&#8217;t use cascading style sheets:</strong></span></p>
<ul>
<li><span style="font-family: Verdana; ">You will have to define the different web page attributes in each and every page you build, in order to preserve your site&#8217;s look and feel. This means that every time you create a new page, you will have to specify the background color, the font type and size, the color of your links, the type, size and color of your headings, the width and borders of your tables, etc.</span></li>
<li><span style="font-family: Verdana; ">As a consequence of (1), the size of your pages will turn out to be many kilobytes more than if you didn&#8217;t have to repeatedly specify all those attributes in every page.</span></li>
<li><span style="font-family: Verdana; ">As a consequence of (2), you will incur in higher hosting costs, since you will need more server space and a higher data transfer allowance. In addition to that, your pages will take longer to load. </span></li>
</ul>
<p><span style="font-family: Verdana; ">However, the biggest problem will come when you decide to make a change in the look and feel of your site (for example: to change the color of your links). You will have to open each and every page you&#8217;ve ever built and manually change the link colors.</span></p>
<p><span style="font-family: Verdana; ">At this point, you&#8217;ve probably concluded that there must be a better way. Fortunately, there is, and that better way is to use cascading style sheets.</span></p>
<p><span style="font-family: Verdana; color: #ff0000; "><strong>What are cascading style sheets?</strong></span></p>
<p><span style="font-family: Verdana; ">A cascading style sheet is a separate file that contains all the style rules that tell a browser how to display a web page. </span></p>
<p><span style="font-family: Verdana; ">You can use a style sheet to define the attributes that are common to all pages, for example, the background, the link colors, the font type and size, the width and borders of your tables, the size and color of your headings, etc. You can also use them to create specific attributes (called &#8220;classes&#8221;) that you can refer to from any of your web pages at any moment.</span></p>
<p><span style="font-family: Verdana; color: #ff0000; "><strong>How do I use a style sheet?</strong></span></p>
<p><span style="font-family: Verdana; ">A style sheet is saved as a separate document. If you want a web page to follow the rules outlined in a style sheet, it must contain a link to the style sheet. When a browser requests a web page, the web page will link to the style sheet, which will in turn instruct the browser to display the web page using the style attributes defined in the style sheet.</span></p>
<p><span style="font-family: Verdana; color: #ff0000; "><strong>What are the advantages of style sheets?</strong></span></p>
<p><span style="font-family: Verdana; ">Style sheets ensure visual continuity throughout a site. By referring to the same style sheet, all pages in a site can display the same stylistic qualities.</span></p>
<p><span style="font-family: Verdana; ">Style sheets simplify your site&#8217;s maintenance. By concentrating your style definition in one external file, any change you implement in your style sheet will instantly apply to all the web pages linked to it. </span></p>
<p><span style="font-family: Verdana; ">By pulling the style definitions out of your pages, you will make them smaller and faster to download. This will allow you to make more efficient use of your web server space and your data transfer allowance</span></p>
<p></span></div>
<div class="hotlist"><strong>About the Author:Mario Sanchez</strong><br />Mario Sanchez is a Miami based freelance writer who focuses on Internet marketing and web design topics. He publishes The Internet Digest ( http://www.theinternetdigest.net ), a growing collection of web design and Internet marketing articles, tips and resources.</div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/css-basics/">Cascading Style Sheets Basics</a></p>
<p>Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/basics-of-setting-cookies-with-php/' rel='bookmark' title='Basics of Setting Cookies with PHP'>Basics of Setting Cookies with PHP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/css-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Printer Friendly Pages</title>
		<link>http://www.hotscripts.com/blog/building-printer-friendly-pages/</link>
		<comments>http://www.hotscripts.com/blog/building-printer-friendly-pages/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 06:45:07 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=708</guid>
		<description><![CDATA[You design for screens, but do you also design for printers? Learn to make your website more printer friendly with CSS.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/building-printer-friendly-pages/">Building Printer Friendly Pages</a></p>

Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/mobile-friendly/' rel='bookmark' title='Make your Web site more Mobile Friendly'>Make your Web site more Mobile Friendly</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div><span><span style="font-family: Verdana; ">Your site looks like it&#8217;s working perfectly. You&#8217;ve tested it with several different browsers under various resolutions. The HTML complies with the standards and your CSS is impeccable. </span><span style="font-family: Verdana; ">Even if all of the above statements are accurate, everything still might not be the way it should. We often design for screens and blissfully forget that we need to take other devices into account as well. It&#8217;s surprising to notice that while printers are very widely used, a large part of designers seem to completely ignore them. </span></p>
<p><span style="font-family: Verdana; "><strong>Why should I do this?</strong></span></p>
<p><span style="font-family: Verdana; ">The more text your site contains, the more reason you have to think about printers. Many people prefer to print out long pages instead of reading them from their screen. They can&#8217;t take their 19&#8243; screen to the park, to their bed or to the beach. However, if they print your content on paper, they can read it whenever they want to, wherever they want to. </span></p>
<p><span style="font-family: Verdana; ">By giving your users the possibility to easily print your pages, you&#8217;re making your site more usable. At the same time, you&#8217;re encouraging people to spread the word about you and your site. What&#8217;s more convenient, &#8220;Hey, read this great article&#8221; or &#8220;Hey, go to your <a id="KonaLink0" style="text-decoration: underline ! important; position: static;" href="http://www.devpapers.com/#" target="undefined"><span style="color: blue ! important; font-weight: 400; font-size: 13px; position: static;"><span style="color: blue ! important; font-family: Verdana; font-weight: 400; font-size: 13px; position: static;">computer</span></span></a>, fire up your browser and go to this address to read a great article&#8221;? </span></p>
<p><span style="font-family: Verdana; "><strong>How do I do this?</strong></span></p>
<p><span style="font-family: Verdana; ">Ensuring that your site is printer friendly can be done in many ways. Personally, I prefer to use CSS for the job. While it is not supported by some older browsers, CSS is a good choice because it eliminates the need to create separate &#8220;printer friendly&#8221; versions of your pages. The same page can have one layout for browsers and another one for printers! </span></p>
<p><span style="font-family: Verdana; ">Unless you&#8217;re already familiar with CSS, you might benefit from taking a quick look at HTML Help&#8217;s CSS Tutorial ( </span><a href="http://www.htmlhelp.com/reference/css/"><span style="font-family: Verdana; ">http://www.htmlhelp.com/reference/css/</span></a><span style="font-family: Verdana; "> ) before we begin. It&#8217;s especially important that you familiarize yourself with class selectors, as many of the examples below will use them. </span></p>
<p><span style="font-family: Verdana; ">That being said, let&#8217;s open up Notepad and start creating our new external stylesheet file. </span></p>
<p><span style="font-family: Verdana; "><strong>Modify the layout&#8230;</strong></span></p>
<p><span style="font-family: Verdana; ">The first step is to eliminate everything that is useless in a printed version of the page. Banner ads, navigation menus and all unnecessary graphics should be removed. You can do this by adding a new class to the stylesheet: </span></p>
<p><span style="font-family: Verdana; "><span style="font-family: Courier New; color: #ff0000;">.remove { display: none }</span> </span></p>
<p><span style="font-family: Verdana; ">Next, you&#8217;ll need to think about page width. If your pages are too wide, they won&#8217;t fit on the paper. Width problems are often caused by a layout that contains fixed-width tables. The solution is to either use relative widths, or to make sure that the fixed width is not too large. In order for your pages to print correctly, they should have a maximum width of approximately 600 pixels. </span></p>
<p><span style="font-family: Verdana; ">As CSS overrides the HTML definitions, it&#8217;s easy to change the size of your tables. For example, defining a relative width of 100% can be done with the following class: </span></p>
<p><span style="font-family: Verdana; "><span style="font-family: Courier New; color: #ff0000;">.setwidth { width: 100% }</span> </span></p>
<p><span style="font-family: Verdana; "><strong>&#8230;and don&#8217;t forget the details!</strong></span></p>
<p><span style="font-family: Verdana; ">Your next concern is the font. The one you use for screen display might not be the best one for paper. Sans-serif fonts, such as Arial, are often considered to be the most suitable fonts for the Web. On the other hand, Times New Roman is generally the best solution for printed content. </span></p>
<p><span style="font-family: Verdana; ">In addition to the font style, you&#8217;ll also need to consider its size. The font has to be large enough so that it can be read easily. However, if it&#8217;s too large, it&#8217;ll take up unnecessary space. The optimal size in my opinion is somewhere around 12-14 points. </span></p>
<p><span style="font-family: Verdana; ">Consider setting the background color to white and the text color to black with CSS. Some printers do print background images and colors, which is usually just a waste of ink. Even worse, if the text color and background color are close to each other, the printout may be impossible to read. </span></p>
<p><span style="font-family: Verdana; ">Instead of using a class selector for these modifications, it&#8217;s usually more comfortable to simply change the way in which the text inside the BODY tag is displayed. Setting the font to black 12-point Times New Roman and the background to white can be achieved with the following CSS statement: </span></p>
<p><span style="font-family: Verdana; "><span style="font-family: Courier New; color: #ff0000;">BODY { background-color: white; font-family: &#8220;Times New Roman&#8221;, Times, serif; font-size: 12pt; color: black }</span> </span></p>
<p><span style="font-family: Verdana; "><strong>The final touch</strong></span></p>
<p><span style="font-family: Verdana; ">After you&#8217;ve created a stylesheet that is to your liking, link it to your HTML files. To do that, simply place the following line between the &lt;HEAD&gt; and &lt;/HEAD&gt; tags: </span></p>
<p><span style="font-family: Courier New; color: #ff0000; ">&lt;LINK REL=StyleSheet HREF=&#8221;</span><a href="http://www.mysite.com/mystyle.css"><span style="font-family: Courier New; color: #ff0000; ">http://www.mysite.com/mystyle.css</span></a><span style="font-family: Verdana; "><span style="font-family: Courier New; color: #ff0000;">&#8221; TYPE=&#8221;text/css&#8221; MEDIA=print&gt;</span> </span></p>
<p><span style="font-family: Verdana; ">All that you&#8217;ll need to do now is to use your new classes in the appropriate places and you&#8217;re set to go. Happy printing!</span></p>
<p></span></div>
<div class="hotlist"><strong>About the Author:Lauri Harpf</strong><br />Lauri Harpf runs the A Promotion Guide website, where he offers free information about search engines, directories and other promotion methods. His site can be found at <a href="http://www.apromotionguide.com/">http://www.apromotionguide.com/</a></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/building-printer-friendly-pages/">Building Printer Friendly Pages</a></p>
<p>Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/mobile-friendly/' rel='bookmark' title='Make your Web site more Mobile Friendly'>Make your Web site more Mobile Friendly</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/building-printer-friendly-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML with XML Data Binding</title>
		<link>http://www.hotscripts.com/blog/html-with-xml-data-binding/</link>
		<comments>http://www.hotscripts.com/blog/html-with-xml-data-binding/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 19:56:52 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=677</guid>
		<description><![CDATA[Use data binding to pull an XML file's content into a Web-page. <p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/html-with-xml-data-binding/">HTML with XML Data Binding</a></p>

Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/digital-signatures-in-xml/' rel='bookmark' title='Digital Signatures in XML'>Digital Signatures in XML</a></li>
<li><a href='http://www.hotscripts.com/blog/creating-an-image-with-phps-gd/' rel='bookmark' title='Creating an Image with PHP&#8217;s GD'>Creating an Image with PHP&#8217;s GD</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div><span><span style="font-family: Verdana;"><span><strong>Data binding</strong> is a process that allows an Internet user to manipulate Web-page elements using an Internet Explorer Web browser. It employs dynamic HTML and does not require complex scripting or programming.</p>
<p>In this example a Web-page is used in conjunction with <a href="http://programmabilities.com/xml/contact.xml" target="_blank">contact.xml</a> to demonstrate Internet Explorer HTML <strong>data binding</strong>.  Without any scripting, this will pull data from the XML file and display it in the HTML page. This is considerably different than the XSLT that converts XML into HTML.</p>
<p></span></span><span style="font-family: Verdana;"><span><br />
First off. Make an XML file called contact.xml like so: (See a working example of the XML file at <a href="http://programmabilities.com/xml/contact.xml">http://programmabilities.com/xml/contact.xml</a>.)<br />
</span></span></p>
<pre><span style="font-family: Verdana;"><span>&lt; ?xml version="1.0" ?&gt;
&lt;!--  Filename - contact.xml  --&gt;
&lt;contact&gt;
 &lt;party&gt;
  &lt;name&gt;Chief Programmabilities&lt;/name&gt;
  &lt;email&gt;bgates@programmabilities.com&lt;/email&gt;
  &lt;organization&gt;Programmabilities&lt;/organization&gt;
  &lt;address&gt;1 Programmabilities Complex&lt;/address&gt;
  &lt;phone&gt;1-661-716-2564 x7678&lt;/phone&gt;
  &lt;im&gt;bgates@programmabilities.com&lt;/im&gt;
  &lt;url&gt;http://programmabilities.com/&lt;/url&gt;
  &lt;p xmlns="http://programmabilties.com/contact.php"&gt;
    Contact&lt;/p&gt;
 &lt;/party&gt;
&lt;/contact&gt;</span></span></pre>
<p><span style="font-family: Verdana;"><span><br />
Next off. Make an HTML file called <a href="http://programmabilities.com/xml/contact.html" target="_blank">contact.html</a> like so: (See a working example of the HTML file at <a href="http://programmabilities.com/xml/contact.html">http://programmabilities.com/xml/contact.html</a>.)<br />
</span></span></p>
<pre><span style="font-family: Verdana;"><span>&lt;html&gt;&lt;header&gt;&lt;title&gt;Contact&lt;/title&gt;&lt;/header&gt;&lt;body&gt;
  &lt;!-- Contact module --&gt;
  &lt;xml id="Contact"
         src="http://programmabilities.com/xml/contact.xml"/&gt;
  &lt;table cellpadding="0" cellspacing="0" border="0"
         datasrc="#Contact"&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Name&lt;/strong&gt;:&lt;/td&gt;
    &lt;td&gt;&lt;div dataFld="name"/&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Address&lt;/strong&gt;:&lt;/td&gt;
    &lt;td&gt;&lt;div dataFld="address"/&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;Mail&lt;/strong&gt;:&lt;/td&gt;
    &lt;td&gt;&lt;div dataFld="email"/&gt;
    &lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;IM&lt;/strong&gt;:&lt;/td&gt;
    &lt;td&gt;&lt;div dataFld="im"/&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;&lt;strong&gt;URL&lt;/strong&gt;:&lt;/td&gt;
    &lt;td&gt;&lt;div dataFld="url"/&gt;&lt;/td&gt;
   &lt;/tr&gt;
  &lt;/table&gt;
  &lt;!-- END Contact module --&gt;
&lt;/body&gt;&lt;/html&gt;</span></span></pre>
<p><span style="font-family: Verdana;"><span><br />
The <a href="http://programmabilities.com/xml/contact.html" target="_blank">contact.html</a> file pulls the data out of your <a href="http://programmabilities.com/xml/contact.xml" target="_blank">contact.xml</a> file and puts it into your contact.html page using the technology called <strong>data binding</strong>.</span></span></p>
<p>The <a href="http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/datasrc.asp" target="_blank"><span style="font-family: Courier New;">datasrc</span></a> attribute sets or retrieves the source of the data for <strong>data binding</strong>. The <span style="font-family: Courier New;">dataFld</span> attribute sets or retrieves which field of a given data source, as specified by the <span style="font-family: Courier New;">dataSrc</span> property, to bind to the specified object.</p>
<p><em><strong>NOTE</strong>: As of today, the Data Binding technology in this example does not work with Firefox.</em></p>
<p></span></p>
<p><span style="font-family: Verdana; "></p>
<hr id="null" /></span><span style="font-family: Verdana; ">By Chief Programmabilities at </span><a href="http://programmabilities.com/" target="_blank"><span style="font-family: Verdana; ">Programmabilities.com</span></a></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/html-with-xml-data-binding/">HTML with XML Data Binding</a></p>
<p>Related posts:<ol>
<li><a href='http://www.hotscripts.com/blog/digital-signatures-in-xml/' rel='bookmark' title='Digital Signatures in XML'>Digital Signatures in XML</a></li>
<li><a href='http://www.hotscripts.com/blog/creating-an-image-with-phps-gd/' rel='bookmark' title='Creating an Image with PHP&#8217;s GD'>Creating an Image with PHP&#8217;s GD</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/html-with-xml-data-binding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Digital Signatures in XML</title>
		<link>http://www.hotscripts.com/blog/digital-signatures-in-xml/</link>
		<comments>http://www.hotscripts.com/blog/digital-signatures-in-xml/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 19:55:28 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=671</guid>
		<description><![CDATA[The Xml Digital Signatures provides the security services of data integrity, authentication, and nonrepudiation. <p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/digital-signatures-in-xml/">Digital Signatures in XML</a></p>

No related posts.]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: Verdana; ">In a simple shorthand notation the structures of DSIG signatures with its four elements. Elements appear zero or more times if followed by &#8220;*&#8221;, zero or once if followed by&#8221;?&#8221;, and once or more if followed by &#8220;+&#8221;. When not followed by a symbol, elements appear only once.</span></p>
<p>Removing attributes and contents in the notation it becomes an example of signature object using three of its four elements.</p>
<p>The signature object contains the cryptographic hash of any signed information, and a reference to the information itself. The signed information may be an arbitrary document. However, often, it will be an XML object. The ability to sign only specific elements of XML documents is one of the most important features of DSIG. It lets the unsigned parts of the XML document is enhanced, modified, or removed for privacy or efficiency, keeping the signature valid.</p>
<p><span style="font-family: Verdana; ">DSIG signatures may contain either the signed XML object contained in the XML object, or detached from the signed object or document. When the signed XML object envelops the signature, the enveloped signature value itself is not included in the signature calculation and validation computation. For this you use the enveloped-signature transform, removing the whole signature element in which it is contained from the digest calculation.</span></p>
<p><span style="font-family: Verdana; ">Public key digital signatures that provide nonrepudiation, such as RSA, are computationally intensive operations; therefore, DSIG also allows shared-key authentication that provides authentication but nonrepudiation.<br />
Collision resistant hashing of the signed content is also used to save computational requirements.</span></p>
<p><span style="font-family: Verdana; ">Generating DSIG signatures:</span></p>
<p>1. Identity resources to be signed.<br />
2. Calculating the digest value and composing reference elements for each resource.<br />
3. Composing the signed info element from all references.<br />
4. Computing value of signature method over identity resources to be signed element by applying algorithms like DSA, RSA-SHA1, etc<br />
5. Composing the signature elements with signedInfo, signature value, identity key used to sign, and other optional objects like signature properties.</p>
<p><span style="font-family: Verdana; ">An XML DSIG may contain multiple reference elements in the same document</span></p>
<p>DSIG signatures may contain either the signed XML object contained in the XML object, or detached from the signed object or document. When the signed XML object envelops the signature, the enveloped signature value itself is not included in the signature calculation and validation computation. For this you use the enveloped-signature transform, removing the whole signature element in which it is contained from the digest calculation.</p>
<p>Public key digital signatures that provide nonrepudiation, such as RSA, are computationally intensive operations; therefore, DSIG also allows shared-key authentication that provides authentication but nonrepudiation.<br />
Collision resistant hashing of the signed content is also used to save computational requirements.</p>
<p><span style="font-weight: bold;">Generating DSIG signatures:</span><br />
1. Identity resources to be signed.<br />
2. Calculating the digest value and composing reference elements for each resource.<br />
3. Composing the signed info element from all references.<br />
4. Computing value of signature method over identity resources to be signed element by applying algorithms like DSA, RSA-SHA1, etc<br />
5. Composing the signature elements with signedInfo, signature value, identity key used to sign, and other optional objects like signature properties.</p>
<p>An XML DSIG may contain multiple reference elements in the same document</p>
<div class="hotlist"><strong>Author: Pawan Bangar</strong> of <a href="http://www.birbals.com/">birdals.com</a></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/digital-signatures-in-xml/">Digital Signatures in XML</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/digital-signatures-in-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Structure of a C++ Program</title>
		<link>http://www.hotscripts.com/blog/structure-of-a-c-program/</link>
		<comments>http://www.hotscripts.com/blog/structure-of-a-c-program/#comments</comments>
		<pubDate>Sun, 14 Dec 2008 19:41:55 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=631</guid>
		<description><![CDATA[This tutorial explains what each process and command in a basic C++ program does.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/structure-of-a-c-program/">Structure of a C++ Program</a></p>

No related posts.]]></description>
			<content:encoded><![CDATA[<p><span><span><span style="font-family: Verdana;"><span style="font-weight: bold;">Before Starting:</span> You should get a freely-distributed C++ compiler. An example of a freely-distributed C++ compiler would be Dev C++. You can get this compiler from the following link: <span style="color: #0099ff;"><span style="color: #000000;"><a href="http://www.bloodshed.net/devcpp.html" target="_blank">http://www.bloodshed.net/devcpp.html</a></span></span><br />
<br style="font-weight: bold;" /><span style="font-weight: bold;">After Downloading:</span> The main buttons that you will be using are File/New/Sourcefile and Execute/Compile &amp; Run(F9) When you open up the new sourcefile, and type in the code, pressing compile and run, will take the sourcecode that you have written, and print it in a DOS-like application.<br />
<br style="font-weight: bold;" /><span style="font-weight: bold;">Basic Terminology:</span><br />
string- a line of text printed across the screen<br />
process- an action that the computer is taking</span></span></span></p>
<p><span style="font-weight: bold;">&#8220;Hello World!&#8221; Program:</span></p>
<p><span style="font-family: Courier New;">1    <span style="color: #000099;">//my first C++ program</span><br />
2    <span style="color: #009900;">#include&lt;iostream&gt;</span><br />
3    <span style="font-weight: bold;">using namespace</span> std ;<br />
4    main()<br />
5<br />
6    {<br />
7       cout&lt;&lt;<span style="color: #ff0000;">&#8220;Hello World!\n&#8221;</span> ;<br />
8       system(<span style="color: #ff0000;">&#8220;pause&#8221;</span>) ;<br />
9      <span style="font-weight: bold;"> return</span> <span style="color: #990099;">0</span>;<br />
10    }<br />
</span><br style="font-weight: bold;" /><span style="font-weight: bold;">Tearing apart the, &#8220;Hello World!&#8221; Program:</span></p>
<p>1        <span style="color: #0000cc;">//my first C++ program</span> * This is a comment. Comments do not appear on the program when it runs. As long as you have // in front of words, it is classified as a comment, and will turn blue.</p>
<p>2        <span style="color: #009900;">#include&lt;iostream&gt;</span> * This line of code is known as the, preprocessor. This line of code, tells the computer which other algorithm it should look from. In this example, the program, needs the assistants of the algorithm, iostream to run. Without this line of code, the program will not run.</p>
<p>3        <span style="font-weight: bold;">using namespace</span> std ;       * This is what is known as a directive. The root of this term is direct. So, the application is directing the computer to do a process.</p>
<p>4        main()                               * main() is the center point of the application. The main part is telling the computer that this is the starting point of the application itself. The parenthesis are where the declared integers would go. Because there aren&#8217;t any in this application, only the main part is needed.</p>
<p>5                                                * This is just a blank line. The computer needs its space, so this is a line, where the computer can take a break when compiling.</p>
<p>6       {                                       * This bracket is used to show where all the work is starting. In this case, the bracket is used for showing that the text is going to be printed.</p>
<p>7       cout&lt;&lt;<span style="color: #ff0000;">&#8220;Hello World!\n&#8221;</span> ;      * This is a line of code, where all the work is being done. This line will print a string across the screen. The \n part tells the computer, that anything printed after this string, must go to the next line. You can go without having the \n in this line, but anything else, and the program will not compile.</p>
<p>8    system(<span style="color: #ff0000;">&#8220;pause&#8221;</span>) ;                   * If you are compiling and then trying to run a program in Windows, it won&#8217;t work. The moment you think it will work, it won&#8217;t. It will terminate itself. With this command in your application, it will stay open, so you can watch everything that is happening.</p>
<p>9   <span style="font-weight: bold;"> return</span> <span style="color: #990099;">0</span>;                               * You need the computer to know what to do, when all the processes are done. So, that&#8217;s where this line of code comes in. When all the processes and commands are finished running, this line of code tells the computer to terminate once a key is pressed. You need this line of code in your application.</p>
<p>10    }                                        * You also need this last bracket. It closes off the application.</p>
<p><span style="font-weight: bold;">Ending Comments:</span> Congratualtions! You have just written and compiled your own application. I had a great time writing this tutorial, and I intend on writing a follow-up on variables, arrays, and other features. If you have any comments, please feel free to make me aware of them.</p>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/structure-of-a-c-program/">Structure of a C++ Program</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/structure-of-a-c-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSS: Really Simply Syndication</title>
		<link>http://www.hotscripts.com/blog/rss-really-simply-syndication/</link>
		<comments>http://www.hotscripts.com/blog/rss-really-simply-syndication/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 14:14:55 +0000</pubDate>
		<dc:creator>DEVpapers</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.hotscripts.com/blog/?p=693</guid>
		<description><![CDATA[Using XML can provide an amazingly versatile method of syndicating content on your website. The most common usage today is that of the humble news/blog RSS feed.<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/rss-really-simply-syndication/">RSS: Really Simply Syndication</a></p>

No related posts.]]></description>
			<content:encoded><![CDATA[<h2 id="toc-introduction">Introduction</h2>
<p>This paper summarises the basics of using RSS to provide syndicated content.  I will be using the <a href="http://blogs.law.harvard.edu/tech/rss">RSS 2.0</a> specification simply because that is my personal preference. There are a number of alternative specifications available, but I will not be looking that those.</p>
<p>The author, Peter Cowburn, has been working with XML in conjunction with a variety of other web technologies for over 6 years.</p>
<h2 id="toc-rss-is-xml">RSS is XML</h2>
<p>That&#8217;s correct! Building on the amazingly versatile eXtensible Markup Language, RSS is a useful application of XML. This explains the way RSS is marked up in XML style tags.</p>
<h2 id="toc-the-structure-of-rss">The Structure of RSS</h2>
<p>All RSS documents absolutely must contain the root element <code>&lt;rss&gt;</code> within which there can only be a single <code>&lt;channel&gt;</code> element. Do not do it any other way! The basic meaning when &#8216;reading&#8217; the RSS file is that first we are actually in an RSS document (the &#8220;rss&#8221; tag) and have a channel (the &#8220;channel&#8221; tag). Only three other tags are 100% necessary in any RSS document, namely; <code>&lt;title&gt;</code>, <code>&lt;link&gt;</code> and <code>&lt;description&gt;</code>.</p>
<p>There are a whole host of other tags which can optionally be used within the &#8220;channel&#8221; which are:<br />
<span style="font-family: courier new,courier,monospace;">category, cloud, copyright, docs, generator, image, item, language, lastBuildDate, managingEditor, pubDate, rating, skipDays, skipHours, textInput, ttl <span style="font-family: arial,helvetica,sans-serif;">and</span> webMaster.</span> Details of these are listed in the <a href="http://blogs.law.harvard.edu/tech/rss">specification</a>.  The commonly used ones are <span style="font-family: courier new,courier,monospace;">pubDate</span> and <span style="font-family: courier new,courier,monospace;">lastBuildDate</span> as they are of use to RSS Feed Aggregator programs.  However the most important is the <span style="font-family: courier new,courier,monospace;">item</span> tag!</p>
<h2 id="toc-the-item-tag">The item tag</h2>
<p>The channel can contain any number of items (though having none would be silly); think of them as stories in a newspaper or entries in a blog. The available tags which can be used within an item tag are <span style="font-family: courier new,courier,monospace;">author, category, comments, description, enclosure, guid, link, pubDate, source <span style="font-family: arial,helvetica,sans-serif;">and</span> title</span>.  Note that all of the tags are optional individually but the item tag must contain at the very least either a <span style="font-family: courier new,courier,monospace;">description</span> or <span style="font-family: courier new,courier,monospace;">title</span> tag.</p>
<h2 id="toc-a-bare-bones-example">A bare-bones example</h2>
<p>Below is an example of a minimal RSS feed, note that this is not the absolute minimum required in an RSS document but just contains the most commonly used tags. Note: <span style="color: #009900;">required</span> tags are coloured green.</p>
<p><span style="font-family: courier new,courier,monospace;"><span style="color: #009900;">&lt;rss version=&#8221;2.0&#8243;&gt;</span><br style="color: #009900;" /> <span style="color: #009900;"> &lt;channel&gt;</span><br style="color: #009900;" /> <span style="color: #009900;"> &lt;title&gt;My Personal Blog&lt;/title&gt;</span><br style="color: #009900;" /> <span style="color: #009900;"> &lt;link&gt;http://www.mypersonalblog.com&lt;/link&gt;</span><br style="color: #009900;" /> <span style="color: #009900;"> &lt;description&gt;A small web log all about me.&lt;/description&gt;</span><br />
&lt;pubDate&gt;Tue, 2 Nov 2004 14:48:32 GMT&lt;/pubDate&gt;<br />
&lt;lastBuildDate&gt;Tue, 2 Nov 2004 14:48:32 GMT&lt;/lastBuildDate&gt;<br />
&lt;item&gt;<br />
</span><span style="font-family: courier new,courier,monospace;"> &lt;title&gt;The Weather Today&lt;/title&gt;<br />
</span><span style="font-family: courier new,courier,monospace;"> &lt;link&gt;http://www.mypersonalblog.com/the-weather-today/&lt;/link&gt;<br />
</span><span style="font-family: courier new,courier,monospace;"> &lt;description&gt;<br />
</span><span style="font-family: courier new,courier,monospace;"> </span><span style="font-family: courier new,courier,monospace;">I looked out of the window this morning and it was<br />
</span><span style="font-family: courier new,courier,monospace;"> </span><span style="font-family: courier new,courier,monospace;">pouring with rain. Obviously my first reaction<br />
</span><span style="font-family: courier new,courier,monospace;"> was to turn over and go back to sleep.</span><br />
<span style="font-family: courier new,courier,monospace;"> </span><span style="font-family: courier new,courier,monospace;">&lt;/description&gt;<br />
</span><span style="font-family: courier new,courier,monospace;"> &lt;/item&gt;</span><br />
<span style="font-family: courier new,courier,monospace;"><span style="color: #009900;"> &lt;/channel&gt;</span><br style="color: #009900;" /> <span style="color: #009900;">&lt;/rss&gt;</span></span></p>
<h2 id="toc-more-real-world-example">More real-world example</h2>
<p>Most commonly RSS documents are used for news/blog feeds, so I will give you a quick example (modified from my own web log). Note the various groups of tags are coloured to distinguish groups.</p>
<p><span style="font-family: courier new,courier,monospace; color: #330000;">&lt;rss version=&#8221;2.0&#8243;&gt;</span><br style="font-family: courier new,courier,monospace; color: #330000;" /> <span style="font-family: courier new,courier,monospace; color: #330000;"> &lt;channel&gt;</span><br style="font-family: courier new,courier,monospace; color: #333333;" /> <span style="font-family: courier new,courier,monospace; color: #333333;"> <span style="color: #006600;">&lt;title&gt;cowburn&lt;/title&gt;</span></span><br style="font-family: courier new,courier,monospace; color: #006600;" /> <span style="font-family: courier new,courier,monospace; color: #006600;"> &lt;link&gt;http://blog.cowburn.info/&lt;/link&gt;</span><br style="font-family: courier new,courier,monospace; color: #006600;" /> <span style="font-family: courier new,courier,monospace; color: #006600;"> &lt;description&gt;Web, Life and Photography&lt;/description&gt;</span><br style="font-family: courier new,courier,monospace; color: #006600;" /> <span style="font-family: courier new,courier,monospace; color: #006600;"> &lt;language&gt;en-us&lt;/language&gt;</span><br style="font-family: courier new,courier,monospace; color: #006600;" /> <span style="font-family: courier new,courier,monospace; color: #006600;"> &lt;pubDate&gt;Tue, 2 Nov 2004 14:48:32 GMT&lt;/pubDate&gt;</span><br style="font-family: courier new,courier,monospace; color: #006600;" /> <span style="font-family: courier new,courier,monospace; color: #006600;"> &lt;lastBuildDate&gt;Tue, 2 Nov 2004 14:48:32 GMT&lt;/lastBuildDate&gt;</span><br style="font-family: courier new,courier,monospace; color: #333333;" /> <span style="font-family: courier new,courier,monospace; color: #333333;"> <span style="color: #003366;">&lt;item&gt;</span></span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> &lt;title&gt;So you want a photolog?&lt;/title&gt;</span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> &lt;link&gt;http://blog.cowburn.info/archives/2004/11/2/photolog/&lt;/link&gt;</span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> &lt;description&gt;</span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> I have been working on re-arranging this site so that the different </span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> areas (Blog, Photos, etc) will all appear consistantly, styled along </span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> the same theme.</span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> &lt;/description&gt;</span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> &lt;pubDate&gt;Tue, 2 Nov 2004 14:48:32 GMT&lt;/pubDate&gt;</span><br style="font-family: courier new,courier,monospace; color: #003366;" /> <span style="font-family: courier new,courier,monospace; color: #003366;"> &lt;/item&gt;</span><br style="font-family: courier new,courier,monospace; color: #333333;" /> <span style="font-family: courier new,courier,monospace; color: #333333;"> <span style="color: #990000;">&lt;item&gt;</span></span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> &lt;title&gt;Got Logo?&lt;/title&gt;</span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> &lt;link&gt;http://blog.cowburn.info/archives/2004/11/1/logo/&lt;/link&gt;</span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> &lt;description&gt;</span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> Out of the goodness of my heart, I have decided to help those </span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> designers out who are non-logoly gifted in a contest which is </span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> going on over at yaXay currently.</span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> &lt;/description&gt;</span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> &lt;pubDate&gt;Mon, 1 Nov 2004 19:12:02 GMT&lt;/pubDate&gt;</span><br style="font-family: courier new,courier,monospace; color: #990000;" /> <span style="font-family: courier new,courier,monospace; color: #990000;"> &lt;/item&gt;</span><br style="font-family: courier new,courier,monospace; color: #333333;" /> <span style="font-family: courier new,courier,monospace; color: #333333;"> <span style="color: #330066;">&lt;item&gt;</span></span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> &lt;title&gt;Birnie 2004&lt;/title&gt;</span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> &lt;link&gt;http://blog.cowburn.info/archives/2004/10/30/birnie/&lt;/link&gt;</span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> &lt;description&gt;</span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> For those of you wondering where on earth I have been for the </span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> past month or so, fear not for I am about to enlighten you. </span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> I have been digging up in the North East of Scotland excavating </span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> the lovely settlement site of Birnie in Moray.</span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> &lt;/description&gt;</span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> &lt;pubDate&gt;Sat, 30 Oct 2004 22:19:58 GMT&lt;/pubDate&gt;</span><br style="font-family: courier new,courier,monospace; color: #330066;" /> <span style="font-family: courier new,courier,monospace; color: #330066;"> &lt;/item&gt;</span><br style="font-family: courier new,courier,monospace; color: #333333;" /> <span style="font-family: courier new,courier,monospace; color: #333333;"> <span style="color: #330000;">&lt;/channel&gt;</span></span><br style="font-family: courier new,courier,monospace; color: #330000;" /> <span style="font-family: courier new,courier,monospace; color: #330000;">&lt;/rss&gt;</span></p>
<h2 id="toc-summary">Summary</h2>
<p>So, essentially we have covered the very basics of what RSS is all about and what the documents look like.  In the real world RSS documents are generally generated on-the-fly whenever a new news article or blog entry is published.  This is an area not to be covered in this paper but there are many methods of achieving this to be found around the internet.</p>
<p>Happy publishing!</p>
<div class="hotlist"><strong>About the Author: Peter Cowburn</strong></div>
<p>Post from: <a href="http://www.hotscripts.com/blog">Hot Scripts Blog</a><br/><br/><a href="http://www.hotscripts.com/blog/rss-really-simply-syndication/">RSS: Really Simply Syndication</a></p>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.hotscripts.com/blog/rss-really-simply-syndication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

