<?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/"
	>
<channel>
	<title>  General</title>
	<link>http://general-tips.assistProgramming.com</link>
	<description>Codding World &#187; General</description>
	<pubDate>Mon, 16 Mar 2009 10:35:01 +0000</pubDate>
	<language>en</language>
			<item>
		<title>Sending email using perl and sendmail.</title>
		<link>http://general-tips.AssistProgramming.com/sending-email-using-perl-and-sendmail.html</link>
		<pubDate>Thu, 12 Mar 2009 09:11:31 +0000</pubDate>
		<description><![CDATA[A very common task for a cgi script is to be able to inform a set of users with data generated by itself or other programs, cgi&#8217;s or not. For example, you might be one of the web designers who have joined one of the myriad of free counter programs on the internet that email [...]]]></description>
			<content:encoded><![CDATA[<p>A very common task for a cgi script is to be able to inform a set of users with data generated by itself or other programs, cgi&#8217;s or not. For example, you might be one of the web designers who have joined one of the myriad of free counter programs on the internet that email you with nice statistics and reports about your web pages&#8217; traffic. Systems like that are responsible for informing such a large number subscribers that sending the reports manually would require a full-time employee devoted to this task only. Obviously this wouldn&#8217;t be a sensible option even for a relatively large organization.</p>
<p>The way to automate this task is to let a perl program do those tedious bits of work for you. In this article we will build a perl script which does exactly that. We are going to go step by step giving explanations and analyzing the tricky parts.</p>
<p>Perl, being perl, provides the programmer with more than one ways to do same thing, sending email included. In this script we are going to use sendmail. Sendmail, is an open source program used on most unix computers and some nt workstations as well. Sendmail as its name implies has the ability to send email! We are going to use perl&#8217;s ability to open pipes to programs to run sendmail and feed it with input. If you are not familiar with sendmail it doesn&#8217;t really matter though; you should just understand that sendmail is able to send an email, with its headers and content, to your mail gateway which will in turn forward it to its recipient(s).</p>
<p>Here is a very simple program that emails a confirmation to a user that his/her request to subscribe to a newsletter has been accepted:</p>
<pre>
#!/usr/bin/perl -wuse strict;use <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym>;use Email::Valid;my $query    = new <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym>;# it is important to check the validity of the email address# supplied by the user both to catch genuine (mis-)typing errors 

# but also to avoid exploitation by malicious users who could 

# pass arbitrary strings to sendmail through the "send_to" 

# <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym> parameter - including whole email messages 

unless (Email::Valid-&gt;address($query-&gt;param('send_to'))) { 

  print $query-&gt;header; 

  print "You supplied an invalid email address."; 

  exit; 

} 

my $sendmail = "/usr/sbin/sendmail -t"; 

my $reply_to = "Reply-to: foo@bar.orgn"; 

my $subject  = "Subject: Confirmation of your submissionn"; 

my $content  = "Thanks for your submission."; 

my $to       = $query-&gt;param('send_to')."n"; 

my $file     = "subscribers.txt"; 

unless ($to) { 

  print $query-&gt;header; 

  print "Please fill in your email and try again"; 

} 

open (FILE, "&gt;&gt;$file") or die "Cannot open $file: $!"; 

print $to,"n"; 

close(FILE); 

my $send_to  = "To: ".$query-&gt;param('send_to'); 

open(SENDMAIL, "|$sendmail") or die "Cannot open $sendmail: $!"; 

print SENDMAIL $reply_to; 

print SENDMAIL $subject; 

print SENDMAIL $send_to; 

print SENDMAIL "Content-type: text/plainnn"; 

print SENDMAIL $content; 

close(SENDMAIL); 

print $query-&gt;header; 

print "Confirmation of your submission will be emailed to you.";</pre>
<p><strong>A note about security</strong><br />
Before attempting to explain how the script works here is an important security note: always validate user supplied input. In the case of our <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym> mailer the &#8220;send_to&#8221; parameter comes from a user submitted form and hence could be exploited by a malicious party to pass arbitrary arguments to the sendmail program. To avoid this hazard we utilize the Email::Address module from CPAN to check the conformance of the supplied email address. If the address is invalid - because of a genuine typing error or an exploitation attempt - we return an error message. Otherwise, we proceed with emailing the confirmation using the technique described in the rest of this article.<br />
<strong>How the script works<br />
</strong>At first glance you can notice that this a relatively small program which if it wasn&#8217;t that verbose would be even smaller. Looking through it you will also see that it is very simple to understand even for the Perl beginner; however it more than fullfils the task of sending email.</p>
<p>Let&#8217;s have a look at it line by line&#8230; The cgi script takes its input from a web form. This hypothetical form consists one text input field:</p>
<pre>
&lt;FORM method="POST" action=<a href="http://assistprogramming.com/">http://assistprogramming.com</a>&gt;&lt;INPUT type=&#8221;text&#8221; name=&#8221;send_to&#8221;&gt;&lt;INPUT type=&#8221;submit&#8221;&gt; 

&lt;/FORM&gt;</pre>
<p>The script uses the <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym>.pm module to parse the form data. If you are not familiar with that module I suggest that you read and learn about it as it will make you life as a scripter a lot happier. The param() function provided by <acronym title='Common Gateway Interface'><span class='caps'>CGI</span></acronym>.pm returns the value of a form field given its name as an argument and that&#8217;s all you need to know for now; hence we use it in our script to find out what the user has entered in the text box. If the user has not entered anything the script returns an error message prompting the user to try again after filling in the appropriate text field.</p>
<p>If the user has entered an email address this is appended to a text file for later use by another program and then the script procedes to return a confirmation email to the user.</p>
<p>An email message consists of some headers and the content. There are many standard headers but the ones you will most commonly encounter and the one we use here are:</p>
<p><strong>To:</strong> A comma separated list of recipient addresses.<br />
<strong>From:</strong> The email address of the sender.<br />
<strong>Reply-to:</strong> The email address to whic replies should be sent.<br />
<strong>Subject:</strong> The subject of the message.<br />
<strong>Content-type:</strong> The MIME type of the content.</p>
<p>The headers precede the content of the message. The content type header is written just before the content and is followed by two newline characters.</p>
<p>Sendmail has the ability, as most unix programs, to read from standard input hence all we need to do is a open a pipe to it and provide it with the input we want it to process. You will notice that we have given the -t option to sendmail. This merely tells sendmail to scan the message for a To:, Cc: or Bcc: header and extract the list of recipients from there. Having opened the pipe succesfully we print the message to it. First the headers, each one followed by a newline character, the a newline by itself and finally the content of the message. Finally we close the pipe. The email has been succesfully sent!</p>
<p>Here is a list of useful things you can do by using sendmail and perl:</p>
<ul>
<li>Inform visitors of your site that have asked, that your site has been updated. The script used as an example here would be a good way to collect the addresses of the people you want to email.</li>
<li>Inform yourself of the way your scripts are running. For example you can write a few lines of code that email you when something goes wrong in a script that you &#8216;ve written.</li>
<li>Create an online mailing list.</li>
</ul>
<p>These are only some of the things you can do, but there is one thing you shouldn&#8217;t do, except if you are really nasty. That is, do not spam people. Never email people that have not asked for the information you are providing as it will probably make them angry and in the future they will ignore any that corespondence from you. Have fun and be polite!</p>
<p>Source <a rel="nofollow" href="http://www.perlfect.com/articles/sendmail.shtml">http://www.perlfect.com/articles/sendmail.shtml</a></p>
]]></content:encoded>
			</item>
		<item>
		<title>TierDeveloper 6.1 becomes Free Software</title>
		<link>http://asp-dot-net.AssistProgramming.com/tierdeveloper-61-becomes-free-software.html</link>
		<pubDate>Tue, 10 Mar 2009 20:38:25 +0000</pubDate>
		<description><![CDATA[SUMMARY:
Alachisoft has released TierDeveloper 6.1 as free software (previous version priced at $1495/developer). TierDeveloper is a leading Object-Relational Mapping (ORM) Code Generator for .NET. It lets you develop complex object oriented applications in no time without compromising on code quality.
DESCRIPTION:
Alachisoft has released TierDeveloper 6.1 as free software (previous version priced at $1495/developer). TierDeveloper is a [...]]]></description>
			<content:encoded><![CDATA[<p>SUMMARY:<br />
Alachisoft has released TierDeveloper 6.1 as free software (previous version priced at $1495/developer). TierDeveloper is a leading Object-Relational Mapping (ORM) Code Generator for .NET. It lets you develop complex object oriented applications in no time without compromising on code quality.<br />
DESCRIPTION:<br />
Alachisoft has released TierDeveloper 6.1 as free software (previous version priced at $1495/developer). TierDeveloper is a leading Object-Relational Mapping (ORM) Code Generator for .NET. It lets you develop complex object oriented applications in no time without compromising on code quality.</p>
<p>TierDeveloper lets you develop major chunks of your .NET applications in matter of hours and days instead of weeks and months. And, the unlike ORM engines (e.g. NHibernate) that do mapping at runtime, TierDeveloper does mapping at compile time and therefore the generated code runs very fast.<br />
TierDeveloper is one of the most feature-rich ORM code generators in the market. It provides you the following:</p>
<p>- Map and generate well designed .NET persistence and domain objects in C# and VB.NET - Generate web services and WCF server layers and proxy client objects - Design and generate custom ASP.NET and Windows Forms GUI seamlessly - Generate code that is integrated with NCache (a leading distributed cache for .NET) - Powerful Template IDE to let you customize existing or write new code generation templates - Support for iterative round-trip development without losing any code changes - Full support for .NET 2.0/3.5 and Visual Studio 2005/2008</p>
<p>TierDeveloper is free software (not a trial).</p>
<p>Download TierDeveloper 6.1 Free Edition http://www.alachisoft.com/rp.php?dest=/download.html</p>
<p>TierDeveloper 6.1 Free Edition Information http://www.alachisoft.com/rp.php?dest=/tdev/index.html</p>
]]></content:encoded>
			</item>
		<item>
		<title>Javascript broken in Firefox</title>
		<link>http://general-tips.AssistProgramming.com/javascript-broken-in-firefox.html</link>
		<pubDate>Sat, 23 Aug 2008 05:10:57 +0000</pubDate>
		<description><![CDATA[I&#8217;ve struggled quite much time to find out why my Firefox was giving errors in CMS, where the rich editor was working before I do any mods to it. Was pretty strange but hard to fix because I&#8217;ve tried to Google on solutions related to that specific CMS ( Drupal, we love Drupal here as [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve struggled quite much time to find out why my Firefox was giving errors in <acronym title='Content Management System'><span class='caps'>CMS</span></acronym>, where the rich editor was working before I do any mods to it. Was pretty strange but hard to fix because I&#8217;ve tried to Google on solutions related to that specific <acronym title='Content Management System'><span class='caps'>CMS</span></acronym> ( Drupal, we love Drupal here as well as Wordpress).</p>
<p>My JS console was showing the above errors</p>
<pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 6px; overflow: auto; width: 640px; height: 50px; text-align: left">replace_element.insertAdjacentHTML is not a function       tiny_mce.js (line 1)

this.contentWindow has no properties            tiny_mce.js (line 1)</pre>
<p>So it was something related to tinymce. Well that was my problem but for the same reason you might encounter another error&#8230;So, what&#8217;s the fix for this problem?</p>
<p>Since last time this tinymce worked I did one change to Firefox indeed. I&#8217;ve changed the user agent and looks like that broke the JavaScript.</p>
<p>So, if you have this problem, type <strong>about:config</strong> in your Firefox and search for <strong>general.useragent.extra.firefox. </strong>Make sure this has a value something like this <strong>Firefox/2.0.0.1. </strong>Also, lookup for <strong>general.useragent.override </strong>and make sure it has an empty value. If you can&#8217;t find this last one than there&#8217;s no problem.</p>
<p>Hope this helped somebody out there!</p>
<p>Thanks for reading <img src='http://www.assistprogramming.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			</item>
		<item>
		<title>Optimizing Paid Search Advertising</title>
		<link>http://general-tips.AssistProgramming.com/optimizing-paid-search-advertising.html</link>
		<pubDate>Tue, 10 Jun 2008 12:58:28 +0000</pubDate>
		<description><![CDATA[Is Your Paid Search Advertising Generating Positive Financial Results?
As an online business, the people may be familiar with the available utilize “pay for performance”. Also known as pay-per-click,  PPC  or paid search, it has faithful taken the online marketing world flood  especially the two largest player, Overture and Google Adwords.  A [...]]]></description>
			<content:encoded><![CDATA[<h2><strong>Is Your Paid Search Advertising Generating Positive Financial Results?</strong></h2>
<p>As an online business, the people may be familiar with the available utilize “pay for performance”. Also known as pay-per-click,  PPC  or paid search, it has faithful taken the online marketing world flood  especially the two largest player, Overture and Google Adwords.  A study by   Piper Jaffray tell that paid search constitutes more than 87% of U.S. search market revenues. This wonderful statistic demand the question:”Are    advertisers  achieving a positive  return on their paid  search investment?”</p>
<p>The answer to this question may forbid  from understanding the role of the two critical performance metrics.</p>
<p><strong>Click-through Rate</strong> (a.k.a. CTR) = Click-throughs (i.e. Total Visitors) / Impressions</p>
<p>For example, if your paid search ad is seen by 10 users and one user clicks on your ad.Website conversion is defined of users who want to visit your website and complete your primary objective.</p>
<p><strong>Website Conversion</strong> (a.k.a. sales conversion) = Sales / Click-throughs (i.e. Total Visitors)</p>
<p>So what role does each play in understanding the effectiveness of a paid search campaign?<br />
Standard practice between advertisers is to concentrate a high click-through rate to send more visitor traffic to their website.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Good site layout importance</title>
		<link>http://general-tips.AssistProgramming.com/good-site-layout-importance.html</link>
		<pubDate>Fri, 06 Jun 2008 19:34:32 +0000</pubDate>
		<description><![CDATA[        When you create a website you must think first to the content and layout. All those things are very important for you content and are the most important things that make visitors to came back and visit again. Everyone is not born with a quality of creating [...]]]></description>
			<content:encoded><![CDATA[<p>        When you create a website you must think first to the content and layout. All those things are very important for you content and are the most important things that make visitors to came back and visit again. Everyone is not born with a quality of creating layouts that are pleasing to the eye. In order to keep you visitors is important to carefully chose the colors and to create all the possible combination offering to your website a special design.</p>
<h2><strong>        Points to consider while designing a website layout</strong></h2>
<p>When you create a website is very important to consider that you may change something on the site and that must be an easy job. That’s why:</p>
<h3><strong>Keep it simple:</strong></h3>
<p>In major situations a simple website layout is user friendly. It’s better to not create complex navigational links using complex scripts or images that may not be viewable correctly in different browsers. It’s also very possible that search engine to not index the site properly if complex navigation is involved. You should use small icons to attract visitor’s attentions because using larges images cam make your website difficult, laborious.</p>
<h3><strong>        Readable font size and face:</strong></h3>
<p>We recomand you to use standard font size of  “-1” (11 or 12 pixels if using styles) because that way visitors can read the content easily. Select a professional looking font face (Verdana, Arial, Helvetica, sans-serif are very common). Avoid using fancy fonts like Comic Sans (unless it is a personal website). Use appropriate spacing between lines (12 or more pixels) to avoid clumsiness.</p>
<h3><strong>        Use web safe eye pleasing colors:</strong></h3>
<p>You must select that color you feel are best for you website subject. However, it is a wise decision to get feedback from users or friends about what they feel about the color combination of the website.</p>
<h3><strong>         Web pageDimensions:</strong></h3>
<p>Here, an important thing is to keep track of dimensions of a web page. Most successful commercial websites limit the width and height of the web page so that the important content of the web page lies within the top 600&#215;600 viewable area without scrolling. The best choice is to limit the width by placing a table with a fixed width of 750 or 775 pixels and to work in this table. The page height should not be any more than 4 scroll lengths. Limit the content of the page and if more content needs to be added, move it to a new web page. Provide a navigational link to the next page and a link back from the second page. This will also increase your web site&#8217;s page views.</p>
<h3><strong>        Tips &amp; tricks</strong></h3>
<p>Extract JavaScript code and styles from within the <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> page to external .JS and .<acronym title='Cascading Style Sheets'><span class='caps'>CSS</span></acronym> files. To decrease you individual <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> page size create a link from each <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> page to these external files because browsers download these files only once and caches them on the user&#8217;s computer. Use server side includes for centralizing common content, use a background which creates a contrast to the font colors and graphics and why not look at media sites to inspire.</p>
]]></content:encoded>
			</item>
		<item>
		<title>Apache redirect dynamic urls</title>
		<link>http://general-tips.AssistProgramming.com/apache-redirect-dynamic-urls.html</link>
		<pubDate>Wed, 28 May 2008 07:14:53 +0000</pubDate>
		<description><![CDATA[Backgound
Many times there&#8217;s a big need to redirect different URL&#8217;s on your website to other places. The reason for this can be very different, but the idea is same. We need a reliable way of doing that. Off course that can be done in a &#8220;script wise&#8221; manner; I mean, if your website is dynamic, [...]]]></description>
			<content:encoded><![CDATA[<h3>Backgound</h3>
<p>Many times there&#8217;s a big need to redirect different <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>&#8217;s on your website to other places. The reason for this can be very different, but the idea is same. We need a reliable way of doing that. Off course that can be done in a &#8220;script wise&#8221; manner; I mean, if your website is dynamic, upon loading a specific page, the requested URI could be checked against a database redirects collection and if found there, the specific redirect would be issued ( be it a 302 moved temporarily redirect, 301 Permanent redirect, etc. ). That&#8217;s beyound the purpose of this article.</p>
<h3>So what would be a simple solution to do a temporary/permanent redirect on dynamic <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>?</h3>
<p>Since I was asked by many peoples over this website and other places to present a way of doing redirects of dynamic <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>&#8217;s  using .htaccess, I decided to put here a way that I found useful.</p>
<p>So here it is the following htaccess  file:</p>
<pre>
RewriteEngine onRewriteCond %{QUERY_STRING} ^page=1$

RewriteRule ^(/)?$ http://mywebsite.com/url_to_go_to [R=301,L]</pre>
<p>Basically that would do the trick, and would issue a 301 Redirect of <strong>/?page=1</strong> to <strong>http://mywebsite.com/url_to_go_to</strong>. If you try that you&#8217;ll notice a small problem which really is not a problem: The <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> to where it gets redirected will be: <strong>http://mywebsite.com/url_to_go_to?page=1. </strong>Notice that the query string is automatically appended to the new <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym>. That can be prevented by ending the <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> to be redirected to with a <strong>?</strong> mark, as stated in the <a rel="nofollow" href="http://www.searchengineworld.com/r/redirect.cgi?f=92&amp;d=6170&amp;url=http://httpd.apache.org/docs/mod/mod_rewrite.html" target="_top" title="httpd.apache.org/docs/mod/mod_rewrite.html">Apache mod_rewrite documentation</a>, where there is explained the <strong>query-string-clearing function</strong>.</p>
<p><em><strong>&#8220;<font color="#000000" face="arial" size="2"> When you want to erase an existing query string, end the substitution string with just the question mark &#8220;</font></strong></em></p>
<p>If you are trying to redirect an <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> like <strong>/index. php?page=2</strong> to something like <strong>http://www.mysite.com/page/2</strong> , than you can use the power of regular expressions combined with Apache features.</p>
<p>This will look something like the above:</p>
<pre>
RewriteEngine onRewriteCond %{QUERY_STRING} ^page=([0-9]*)$

RewriteRule ^(/)?$ http://mywebsite.com/url_to_go_to/page/%1? [R=301,L]</pre>
<p>Notice the <strong>?</strong> sign at the end of the new <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> for clearing the query string.</p>
<p>Hope someone will find this article useful. Enjoy <img src='http://www.assistprogramming.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			</item>
		<item>
		<title>SQ Excel V1.2 Released - May 21st 2008</title>
		<link>http://general-tips.AssistProgramming.com/sq-excel-v12-released-may-21st-2008.html</link>
		<pubDate>Fri, 23 May 2008 04:40:59 +0000</pubDate>
		<description><![CDATA[May 21st 2008, a new version of the SQL Excel Freeware Add-in is available (compatible and tested on Excel 2000, 2002/XP, 2003 and 2007). 
A summary of the functionality of the add-in is given below.
Easy to import data to Excel from SQL Server, MYSQL, Oracle, Sybase, Microsoft Access, FireBird, DB2, Excel Workbooks etc.  Works [...]]]></description>
			<content:encoded><![CDATA[<p>May 21st 2008, a new version of the <acronym title='Structured Query Language'><span class='caps'>SQL</span></acronym> Excel Freeware Add-in is available (compatible and tested on Excel 2000, 2002/XP, 2003 and 2007). </p>
<p>A summary of the functionality of the add-in is given below.</p>
<p>Easy to import data to Excel from <acronym title='Structured Query Language'><span class='caps'>SQL</span></acronym> Server, MYSQL, Oracle, Sybase, Microsoft Access, FireBird, DB2, Excel Workbooks etc.  Works with any ODBC compatible data source.  Use the add-in to quickly import data and then use Excel&#8217;s power to analyse it in more detail if needed.</p>
<p>Genuine Freeware! NO Ads, NO Spyware, NO Viruses  NO Time limits, NO &#8220;Phone Home&#8221;.</p>
<p>Small Add-in Size - has small disk and memory footprint.  The core DLL of the add-in is around 300k.  It wont bog down your Excel like add-ins can sometimes..</p>
<p>Add-in user interface is implemented via  a small toolbar which will be added to your excel. The toolbar wont take up too much space in Excel and you can move it to where you want it.    A new feature in this release is the Connection Profile Combobox.  So it is possible to select a connection directly from the toolbar and hit the &#8220;<acronym title='Structured Query Language'><span class='caps'>SQL</span></acronym>&#8221; button and you will connect to the database and view the available selectable objects in the main <acronym title='Structured Query Language'><span class='caps'>SQL</span></acronym> Excel Form. </p>
<p>Easy to build complex queries using the visual interface.  <acronym title='Structured Query Language'><span class='caps'>SQL</span></acronym> Excel implements two way query building so you can (i) build queries visually by dragging / clicking and (ii) build queries by manually typing in the SELECT statement.  The main form of the add-in incorporates alot of functionality but is still easy to use. </p>
<p>For more information, please visit http://www.sqlexcel.net</p>
]]></content:encoded>
			</item>
		<item>
		<title>How to be present on the Internet?</title>
		<link>http://general-tips.AssistProgramming.com/how-to-be-present-on-the-internet.html</link>
		<pubDate>Sun, 11 May 2008 19:47:40 +0000</pubDate>
		<description><![CDATA[There are people who want to start creating their own website. Being able to create a web design  and then having CSS code done based on the template it is not a simple job, but that&#8217;s not all. You need to know how to &#8220;put&#8221; your site on the Internet. This article contains main [...]]]></description>
			<content:encoded><![CDATA[<p>There are people who want to start creating their own website. Being able to create a web design  and then having <acronym title='Cascading Style Sheets'><span class='caps'>CSS</span></acronym> code done based on the template it is not a simple job, but that&#8217;s not all. You need to know how to &#8220;put&#8221; your site on the Internet. This article contains main knowledges about hosting, domain registration and necessary utilities.</p>
<p>If we want to be present on the Internet, or simple having a web site you need:</p>
<ul>
<li><strong>domain name </strong>( the name you are accessed on the Internet -  for example mydomain.com)</li>
<li><strong>web hosting</strong> on a server which can be free or payable(free servers always offer poor services, a business always need to pay for a server)</li>
<li>the <strong>files </strong>which compose the website</li>
<li><strong>site monitoring</strong> (optional)</li>
</ul>
<p>Having a website on the Internet can be done in two ways: free or paid</p>
<ul>
<li><strong>free </strong>- you can obtain a domain, host on the server and maybe an e-mail address. In this way you can publish your site, but with the limits imposed by the server administrator.</li>
<li><strong>paid </strong>- you can registered the wanted domain (if available) and benefit web hosting with more advantages than the earlier alternative.</li>
</ul>
<h3>Domain names</h3>
<p>This means your website has an unique name for accessing on the Internet. The domain can have extensions: .com, .info, .biz, .net etc. Before you register a name we have to verify for its availability. There are plenty services on the Internet where we can find out if the domain we want is available or not. <a rel="nofollow" href="http://www.whois.sc/">Here</a> is an example in this case.</p>
<h3>Web Hosting</h3>
<p>As I said the hosting can be: free on a server who has these services or on your own computer configure to act like a server and pay hosting.</p>
<p>The web hosting offer is varied and has these characteristics:</p>
<ul>
<li>host technology: Unix, Linux, Windows</li>
<li>server location</li>
<li>domain size (from 5 Mb to unlimited)</li>
<li>month traffic</li>
<li>numbers of sub domains</li>
<li>numbers of email addresses</li>
<li>access type (ftp or http)</li>
<li>files type accepted on the server</li>
<li>the maxim size of accepted files</li>
<li>auxiliary services</li>
</ul>
<h4>Free Hosting</h4>
<p>In this case your domain is actually a subdomain of the server, for example (name.server.com). The package is low and the administrator will recover the expenses by adding advertising banners on the hosted pages.</p>
<p><strong>Host on own server</strong></p>
<p>Your own computer being connected to the Internet 24 hours per day, having a static IP address can be configured as a web server by installing the Apache Server which is also free. Also, you can install a programming language which run on the server, for example <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym>, and a database administration server like MySQL. This solution involves a server that works 24 hours/day, maintenance services and back-up.</p>
<h4>Paid Hosting</h4>
<p><strong>Site administration<br />
</strong></p>
<p>After registration you will get an username and a password necessary to log in your administration panel. Here you can almost configure anything based your domain: adding and configuration for e-mail addresses, FTP counts, upload files, online statistics, add subdomains.</p>
<p><strong>File transferring on the host server</strong></p>
<p>This transfer  can be done using specialized FTP programs : CuteFTP, SmartFTP, FileZilla, CoreFTP.</p>
<p><strong>Traffic</strong></p>
<p>Monthly traffic has the formula:</p>
<p><em><strong>(no visits/day)*(no pages/visit)*(page size)*30days</strong></em></p>
<p>Example: 250 visits/day, 5 pages visited and 40kB page size will give us the next month traffic: 250*5*40kB*30=1500000kB=1500MB=1,5GB</p>
<p><strong>Changing Host Server </strong></p>
<p>This situation appears when you are not anymore content with the offered services. Practical, this means changing the old DNSs with these corresponding the new server and moving the files on the new server. <strong><acronym title='Domain Name System'><span class='caps'>DNS</span></acronym></strong> (Domain Name Server) is a service that transform the domain name in an IP address. The domain name can be easily remembered than a numeric value.</p>
<h3>The Website</h3>
<p>As I said, the site itself is composed by files. The pages we see are hosted on the server. This files are made using &#8220;technologies&#8221; like <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym>, <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> and may contains: text, images, sounds.</p>
<p>For a webpage creation you need <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> knowledge, but it is not all. You probably don&#8217;t want static pages, so adding JavaScript, Flash will make your page dynamic.  For all this you need specialized editors like: Macromedia Dreamweaver, CoffeeCup <acronym title='HyperText Markup Language'><span class='caps'>HTML</span></acronym> Editor, Microsoft FrontPage and programs for image editing.</p>
<p>If you want to add some &#8220;action&#8221; on your pages include scripts like: JavaScript (on the client side) or <acronym title='PHP Hypertext Processor'><span class='caps'>PHP</span></acronym> Scripts (on the server side).</p>
<h3>Site Monitoring</h3>
<p>The monitoring services brings usefully information about the visitors: number of visitors, data and others. This information bring us a real help, because this way we can see the site evolution. Site monitoring can be made thorough:</p>
<ul>
<li>free or paid services of specialized   companies</li>
<li>services offered the host server</li>
<li>specialized scripts</li>
</ul>
<p>For a full web-design/web-developing  solution you may visit <a rel="nofollow" href="http://www.tractsolutions.com" title="Custom web-design and web soft develop" target="_blank">http://www.tractsolutions.com</a></p>
]]></content:encoded>
			</item>
		<item>
		<title>Cross domain cookie - one tricky question</title>
		<link>http://general-tips.AssistProgramming.com/cross-domain-cookie-one-tricky-question.html</link>
		<pubDate>Thu, 03 Apr 2008 21:19:45 +0000</pubDate>
		<description><![CDATA[Hi there readers. Lately I was working on a project that was supposed to be a website working on many domains.  The website was one that ofered membership levels to users, different facilities per user group etc&#8230; The fact is users hat to login and keep the session active while getting from one domain to [...]]]></description>
			<content:encoded><![CDATA[<p>Hi there readers. Lately I was working on a project that was supposed to be a website working on many domains.  The website was one that ofered membership levels to users, different facilities per user group etc&#8230; The fact is users hat to login and keep the session active while getting from one domain to another. For logins sessions I used cookies but that is not really important. In fact any method used gets to the same COOKIE, and the problem is still same: how to send cookies across domains.</p>
<h2>Why is this a huge problem?</h2>
<p>Well  the thing is pretty simple: security reasons to not permit reading/writing of cookies from one domain to another. So if we have domain <strong>a.com</strong> and <strong>b.com</strong>, while accessing <strong>a.com</strong> we won&#8217;t be able to access any of <strong>b.com&#8217;s</strong> cookies. If this restriction wouldn&#8217;t be active, would be so a big hole into security.</p>
<h2> So what can we do though to have cross domain cookies?</h2>
<p>Google-ing a lot and reading other opinions I got a final working version of it. The idea is based on a set of redirects between the domain cookies are on(user is logged in there) and the domain where we want to have same cookies set ( domain where we would like to login the user, without asking again for an user/password. Let&#8217;s denote by <strong>a.com</strong> the domain that contains the cookie and<strong> b.com</strong> the domain we need the cookies on.</p>
<p>The whole process works in some steps:</p>
<ol>
<li>First from domain <strong>b.com</strong> we do a request to domain <strong>a.com;</strong></li>
<li>On this request, on<strong> a.com</strong> we respond by building a http GET/POST to domain<strong> b.com </strong> sending there the needed cookies as HTTP GET/POST parameters (pairs name/value).</li>
<li>on domain b.com, as a response to request from domain a.com we take each POST/GET parameters and send them as cookies to the browser.</li>
<li>This step is optional, but if into the previous steps we used GET as the HTTP method of requests, than this needs to be done in order to avoid security holes. Why is that? Well in step 3 we sent a GET request to <strong>b.com</strong>. So we are on<strong> b.com?some_query string. </strong>That query string has the needed cookies so that when accessing that url, it&#8217;ll automatically login user on domain <strong>b.com</strong>( the desired effect). Now, if on domain <strong>b.com </strong>there is an external link, user clicks on it, after being redirected from <strong>a.com</strong>. On that external link&#8217;s webserver, into the logs, will be stored the refferal, which is exactly our <acronym title='Uniform Resource Locator'><span class='caps'>URL</span></acronym> containing the COOKIES needed to automatically login. Someone may see those logs and login without being authorized.<br />
<strong>So what&#8217;s about this step. Pretty simple:  we do another redirect to domain b.com, stripping the COOKIES into the GET string. That way we are secure. </strong></li>
</ol>
<p>That should be all.  this is the main mechanism that I got implemented and working. I&#8217;ll come back in another post looking a practical way of doing it. Any comments are welcome. If you discover any security holes or you think something is wrong, please leave your feedback.</p>
]]></content:encoded>
			</item>
		<item>
		<title>IE form input Highlight problem</title>
		<link>http://general-tips.AssistProgramming.com/ie-form-input-highlight-problem.html</link>
		<pubDate>Wed, 26 Mar 2008 10:01:01 +0000</pubDate>
		<description><![CDATA[These days , working on one of my projects, almost finishing it, I got stuck at a relative simple thing. But it took me so long time to figure it out. The problem was that some of my form inputs on a page were looking funny in IE. They had a background of light yellow. [...]]]></description>
			<content:encoded><![CDATA[<p>These days , working on one of my projects, almost finishing it, I got stuck at a relative simple thing. But it took me so long time to figure it out. The problem was that some of my form inputs on a page were looking funny in <acronym title='Internet Explorer'><span class='caps'>IE</span></acronym>. They had a background of light yellow. I&#8217;ve tried everything in <acronym title='Cascading Style Sheets'><span class='caps'>CSS</span></acronym> to change it, even inline styles, !important modifier and &#8230; nothing. That background won&#8217;t dissapear.</p>
<p>Google&#8217;ing a few hours I found the problem. I was using Google Toolbar and that has a setting to highlight forms. I never knew about it. So simple but get me so much trouble. So I deactivated it and everything works fine <img src='http://www.assistprogramming.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If youhave that same trouble, You don&#8217;t even need to deactivate it, but you can go to <font color="#000000" face="verdana" size="2"><strong>Options </strong>from your Google toolbar and then <strong>More </strong>and then uncheck <strong style="color: black; background-color: #bbbbff">Automatically Highlight Fie</strong><strong>lds that AutoFill can fil.</strong></font></p>
<p>That would be it. Hope it&#8217;s useful and somebody there won&#8217;t loose as much time as I did before finding out what was wrong.</p>
]]></content:encoded>
			</item>
	</channel>
</rss>
