<?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>Jenny’s Web World &#187; Websites</title>
	<atom:link href="http://www.jennyconnors.com/category/websites/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jennyconnors.com</link>
	<description>music~computers~coffee~and more</description>
	<lastBuildDate>Wed, 04 Aug 2010 15:16:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>glitter text</title>
		<link>http://www.jennyconnors.com/websites/glitter-text</link>
		<comments>http://www.jennyconnors.com/websites/glitter-text#comments</comments>
		<pubDate>Mon, 02 Mar 2009 01:39:23 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/?p=48</guid>
		<description><![CDATA[Well, this is new&#8230;and interesting&#8230;

Glitter Text
Would I dare put it on a website?
]]></description>
			<content:encoded><![CDATA[<p>Well, this is new&#8230;and interesting&#8230;</p>
<p><a style="padding:0px; margin:0px; border: none;" href="http://www.m8d.net/glittertextgenerator.html"><img src="http://www.m8d.net/holdz/z4889d41f64f5e.gif" border="0" alt="Glitter Text" width="478" height="93" /></a></p>
<p><a style=" font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px; text-decoration:none; color:#999999; padding:0px; margin:0px;" href="http://www.m8d.net/glittertextgenerator.html">Glitter Text</a></p>
<p>Would I dare put it on a website?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/websites/glitter-text/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>build readable strings recursively out of a form array in PHP</title>
		<link>http://www.jennyconnors.com/programming/build-readable-strings-recursively-out-of-a-form-array-in-php</link>
		<comments>http://www.jennyconnors.com/programming/build-readable-strings-recursively-out-of-a-form-array-in-php#comments</comments>
		<pubDate>Wed, 12 Mar 2008 02:01:46 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers-programming/build-readable-strings-recursively-out-of-a-form-array-in-php</guid>
		<description><![CDATA[Here&#8217;s a great way to turn an array into readable strings in PHP.  For example, I want an error notice to be sent to me automatically when a database action in a function fails.  The problem is, I cannot possibly know what is going to be in every form that is used in [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a great way to turn an array into readable strings in PHP.  For example, I want an error notice to be sent to me automatically when a database action in a function fails.  The problem is, I cannot possibly know what is going to be in every form that is used in the function that generates the database query. While I *can* easily get the keys and values using</p>
<p><code>foreach ($in_array as $key =&gt; $value)</code></p>
<p>and building a string, what if the value itself is an array? The value for any array within the array would be &#8220;Array&#8221;.  Not very useful!</p>
<p>Fortunately, PHP functions can be recursive.  Here&#8217;s a function I wrote to handle that:</p>
<p><code>function getArrayAsString($in_array)<br />
{</code></p>
<blockquote><p><code> $string = '&lt;br /&gt;';<br />
foreach ($in_array as $key =&gt; $value)<br />
{</code></p>
<blockquote><p><code> if (is_array($value)) $string = $string.'&lt;br /&gt;&lt;strong&gt;'.$key.'&lt;/strong&gt;: '.getArrayAsString($value).'&lt;br /&gt;';<br />
else $string = $string.'&lt;strong&gt;'.$key.'&lt;/strong&gt;: '.$value.'&lt;br /&gt;';</code></p></blockquote>
<p><code>}<br />
return $string;</code></p></blockquote>
<p><code>}</code></p>
<p>Each value is checked to see if it is an array. If it is, it (the array value) is sent to this function, and it processes until all of its values have been evaluated, sending any of those array values into this function as well.</p>
<p>I use this function by concatenating the result to an error message by calling the function with the $_POST variable as the array parameter. This way, I have my custom-built message specific to the failed function, and I get all the information that was posted so I can evaluate the error without having to generate the array values one at a time, or worrying if any values are themselves arrays.  <a href="http://www.jennyconnors.com/samples/print-post-form-recursively.php" target="_blank">Click here</a> to fill out a form and see how this recursive function works.</p>
<p>Personally, I like my &#8220;keys&#8221; to be bold and the values to be normal, but you can change that to suit your tastes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/programming/build-readable-strings-recursively-out-of-a-form-array-in-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>troubleshooting obscure php email issues</title>
		<link>http://www.jennyconnors.com/programming/troubleshooting-obscure-php-email-issues</link>
		<comments>http://www.jennyconnors.com/programming/troubleshooting-obscure-php-email-issues#comments</comments>
		<pubDate>Tue, 26 Feb 2008 18:09:50 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers-programming/troubleshooting-obscure-php-email-issues</guid>
		<description><![CDATA[One of my current web development/programming projects is being built on a server that I have no access to. It&#8217;s quite challenging, to say the least! One of my issues, and the hardest to resolve, was email.
I use the ordinary mail() PHP function. No classes, no cgi, just the function with HTML headers. But it [...]]]></description>
			<content:encoded><![CDATA[<p>One of my current web development/programming projects is being built on a server that I have no access to. It&#8217;s quite challenging, to say the least! One of my issues, and the hardest to resolve, was email.</p>
<p>I use the ordinary <a href="http://www.php.net/mail" target="_blank">mail() PHP function</a>. No classes, no cgi, just the function with HTML headers. But it seemed that certain emails I sent from the server were going nowhere, and no failure was being reported either.  For example, I could receive mail at my &#8220;theconnorswebsite.com&#8221; domain, but not my &#8220;whitewavedesigns.com&#8221; domain.</p>
<p>Well, first I learned that there was no formal MX record, and my server followed that protocol. One was set up on this particular server, but still, I could not receive email at my wwd domain.</p>
<p>I then tried to specify the smtp server, port and from address:</p>
<p><code>ini_set("smtp","mail.website.com");<br />
ini_set("smtp_port","25");<br />
ini_set("sendmail_from","info@website.com");</code></p>
<p>That didn&#8217;t work either. I also made sure that the server would allow &#8220;from&#8221; emails to be from any domain by substituting various emails at different domains as the &#8220;from&#8221;.  I even double-checked my HTML headers:</p>
<p><code>MIME-Version: 1.0<br />
Content-type: text/html; charset=iso-8859-1<br />
From: Website &lt;info@website.com&gt;</code></p>
<p>Then, one of the programmers who works on this mystery server told me that their MTA (mail transfer agent) was Postfix, and a quirky thing about Postfix on a Linux box was that it would not tolerate the &#8220;\r&#8221; tag when adding additional headers such as &#8220;CC&#8221; or BCC&#8221;.  For example, this is how I was writing my headers:</p>
<p><code>$headers.= "\r\nCC:".$postformAR['Email'];<br />
$headers.= "\r\nBCC:".$postformAR['Webmaster'];</code></p>
<p>(I put the carriage-return/line feed in front of the cc and bcc so it can be optional.) I had heard that Windows servers don&#8217;t especially like the &#8220;\r&#8221; carriage-return tag, but a Linux server?  Well, okay, I removed it.</p>
<p>Then, as if by miracle, some of the emails were coming through! But still not all of them&#8230;  I finally sat down today and line-by-line tried to figure out why some of my code was working and some wasn&#8217;t.  Eventually, I got down to the actual mail() function.</p>
<p>Now, according to php.net, this is the mail() function description:</p>
<p><span class="type">bool</span> <span class="methodname"><strong><strong>mail</strong></strong></span> ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$to</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$subject</tt></span> , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$message</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$additional_headers</tt></span> [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$additional_parameters</tt></span> ]] )</p>
<p>Note the last &#8220;additional_parameters&#8221;.  Sometimes, I use this last parameter &#8220;-finfo@website.com&#8221; for failed messages, bouncebacks, etc.  I don&#8217;t tend to use it when someone submits an email to my site, but I do use it when sending out bulk emails like newsletters. As I found out today, for whatever reason, that last parameter was actually <strong>required</strong>!</p>
<p>So, my fellow programmers, should you ever have email that is sent from your serve simply vanish into cyber-space, I hope this gives you a few more tricks up your sleeve to resolve the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/programming/troubleshooting-obscure-php-email-issues/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>quick way to print an array in php</title>
		<link>http://www.jennyconnors.com/programming/quick-way-to-print-an-array-in-php</link>
		<comments>http://www.jennyconnors.com/programming/quick-way-to-print-an-array-in-php#comments</comments>
		<pubDate>Sat, 15 Dec 2007 18:26:15 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers/quick-way-to-print-an-array-in-php</guid>
		<description><![CDATA[Printing arrays in PHP can be maddening if you don&#8217;t know the shortcuts! There is always the standard:
foreach ($array as $key =&#62; $value)
{
echo $key.' is key&#60;br&#62;';
echo $value.' is value&#60;br&#62;';
}

but if it&#8217;s not an array (and you have error checking on), you&#8217;ll get an error:
Warning: Invalid argument supplied for foreach() in /home/username/public_html/file.php on line x
And unfortunately, [...]]]></description>
			<content:encoded><![CDATA[<p>Printing arrays in PHP can be maddening if you don&#8217;t know the shortcuts! There is always the standard:</p>
<p><code>foreach ($array as $key =&gt; $value)<br />
{<br />
echo $</code><code>key</code><code>.' is </code><code>key</code><code>&lt;br&gt;';<br />
</code><code>echo $</code><code>value</code><code>.' is </code><code>value</code><code>&lt;br&gt;';</code><br />
<code>}<br />
</code></p>
<p>but if it&#8217;s not an array (and you have error checking on), you&#8217;ll get an error:</p>
<p><code>Warning: Invalid argument supplied for foreach() in /home/username/public_html/file.php on line x</code></p>
<p>And unfortunately, putting the &#8216;@&#8217; in front of the &#8216;foreach&#8217; only yields another error:</p>
<p><code>Parse error:  syntax error, unexpected T_FOREACH in /home/username/public_html/file.php on line x</code></p>
<p>Of course, you could do a check to see if it *is* an array, but that&#8217;s more lines of code, and we want it <em>quick</em>.</p>
<p>Here&#8217;s a clever way to get what I call in my Dreamweaver snippets panel a &#8220;quick print of array&#8221;:</p>
<p><code>print '&lt;pre&gt;'; print_r($_POST); print '&lt;/pre&gt;';</code></p>
<p>Here&#8217;s what it will look like:</p>
<p><code>Array<br />
(<br />
[asso_key_name_1] =&gt; value 1<br />
[asso_key_name_2] =&gt; value 2<br />
)</code></p>
<p>That&#8217;s great, but suppose you have several arrays on one page you want to print the results for, how can you keep them apart?  Simple! Put the name of the array after the first &lt;pre&gt; tag, like this:</p>
<p><code>print '&lt;pre&gt;_POST '; print_r($_POST); print '&lt;/pre&gt;';</code></p>
<p>The results will be like this:</p>
<p><code>_POST Array<br />
(<br />
[asso_key_name_1] =&gt; value 1<br />
[asso_key_name_2] =&gt; value 2<br />
)</code></p>
<p>You can use this quick printing of arrays to print POST vars, SESSION vars, recordsets, any kind of PHP array!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/programming/quick-way-to-print-an-array-in-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>seo for google</title>
		<link>http://www.jennyconnors.com/computers/seo-for-google</link>
		<comments>http://www.jennyconnors.com/computers/seo-for-google#comments</comments>
		<pubDate>Thu, 18 Oct 2007 00:53:20 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers/seo-for-google</guid>
		<description><![CDATA[This was posted on one of the listservs I belong to. Ever wonder if Google has SEO&#8217;d (Search Engine Optimized) their site? Probably not, because if they had, it would look like this.
]]></description>
			<content:encoded><![CDATA[<p>This was posted on one of the listservs I belong to. Ever wonder if Google has SEO&#8217;d (Search Engine Optimized) their site? Probably not, because if they had, it would <a href="http://www.meangene.com/google/design_for_google.html" target="_blank">look like this</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/computers/seo-for-google/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the reality of web design</title>
		<link>http://www.jennyconnors.com/humour/the-reality-of-web-design</link>
		<comments>http://www.jennyconnors.com/humour/the-reality-of-web-design#comments</comments>
		<pubDate>Mon, 24 Sep 2007 13:32:19 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Humour]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers/the-reality-of-web-design</guid>
		<description><![CDATA[Tee hee!?  This is sooooo true!
http://blog.alsacreations.com/images/camembert.png
]]></description>
			<content:encoded><![CDATA[<p>Tee hee!?  This is sooooo true!</p>
<p><a href="http://blog.alsacreations.com/images/camembert.png" target="_blank">http://blog.alsacreations.com/images/camembert.png</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/humour/the-reality-of-web-design/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php + remove chars from front of string</title>
		<link>http://www.jennyconnors.com/programming/php-remove-chars-from-front-of-string</link>
		<comments>http://www.jennyconnors.com/programming/php-remove-chars-from-front-of-string#comments</comments>
		<pubDate>Mon, 02 Jul 2007 23:06:42 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers/php-remove-chars-from-front-of-string</guid>
		<description><![CDATA[I had a need the other day to remove a char from the beginning of a string in PHP.  Rather than fiddle around with the existing function substr(), I whipped up my own function that will remove X number of characters from the beginning of a string.
function removeXnumCharFromFront($instring,$x)
{
$length = strlen($instring);
for($i=$x; $i&#60;$length; $i++) $temp[] = [...]]]></description>
			<content:encoded><![CDATA[<p>I had a need the other day to remove a char from the beginning of a string in PHP.  Rather than fiddle around with the existing function substr(), I whipped up my own function that will remove X number of characters from the beginning of a string.</p>
<p><code>function removeXnumCharFromFront($instring,$x)<br />
{<br />
$length = strlen($instring);<br />
for($i=$x; $i&lt;$length; $i++) $temp[] = $instring[$i];<br />
$comma_separated = implode(",", $temp);<br />
$outstring = eregi_replace(",","",$comma_separated);<br />
return $outstring;<br />
}</code></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/programming/php-remove-chars-from-front-of-string/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP mail() headers for HTML email and commas</title>
		<link>http://www.jennyconnors.com/programming/php-mail-headers-for-html-email-and-commas</link>
		<comments>http://www.jennyconnors.com/programming/php-mail-headers-for-html-email-and-commas#comments</comments>
		<pubDate>Sun, 04 Mar 2007 19:41:50 +0000</pubDate>
		<dc:creator>jenny</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.jennyconnors.com/computers/php-mail-headers-for-html-email-and-commas</guid>
		<description><![CDATA[Here are headers for emailing through PHP&#8217;s mail() function:
$headers  = &#8220;MIME-Version: 1.0\r\n&#8221;;
$headers .= &#8220;Content-type: text/html; charset=iso-8859-1\r\n&#8221;;
$headers .= &#8216;From: My Website &#60;email@mywebsite.com&#62;&#8217;;
if ($_POST['cc_sender']) $headers.= &#8220;\r\nCC:&#8221;.$_POST['Email'].&#8221;";
I use this for all websites that I build, and I distribute my code for free as well.  Formal information about this can be found at http://www.php.net/function.mail as well.
So I [...]]]></description>
			<content:encoded><![CDATA[<p>Here are headers for emailing through PHP&#8217;s mail() function:</p>
<blockquote><p>$headers  = &#8220;MIME-Version: 1.0\r\n&#8221;;<br />
$headers .= &#8220;Content-type: text/html; charset=iso-8859-1\r\n&#8221;;<br />
$headers .= &#8216;From: My Website &lt;email@mywebsite.com&gt;&#8217;;<br />
if ($_POST['cc_sender']) $headers.= &#8220;\r\nCC:&#8221;.$_POST['Email'].&#8221;";</p></blockquote>
<p>I use this for all websites that I build, and I <a href="http://gloucesterwebdesign.com/phpcontact/" target="_blank">distribute my code for free as well</a>.  Formal information about this can be found at <a href="http://www.php.net/function.mail" target="_blank">http://www.php.net/function.mail</a> as well.</p>
<p>So I was pretty surprised when a standard contact form of mine came to me while testing with this as the &#8220;from&#8221;: ABC@osd2.myhostcenter.com.  Why? Everything was set up properly.  I contacted my host, and they insisted that I wasn&#8217;t entering &#8220;<span class="mediumtext">RFC compliant&#8221; headers. Their suggestion was to enter the from headers as ONLY an email.<br />
</span></p>
<p>Well, turns out, that&#8217;s not what I had to do.  I had entered the company&#8217;s name with a comma, as in ABC, LLC.  I removed the comma, and now the email works fine.</p>
<p>Here&#8217;s what the <a href="http://www.faqs.org/rfcs/rfc2822.html" target="_blank">standards</a> say:</p>
<pre>3.6.2. Originator fields

   ...The from field consists of the field name "From" and a
   comma-separated list of one or more mailbox specifications...</pre>
<p>I&#8217;m not sure what my comma was telling it to do, but now I know that commas are not allowed.  I will be updating my PHP script to include this new information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jennyconnors.com/programming/php-mail-headers-for-html-email-and-commas/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
