<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 17 May 2012 03:39:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DreamInCode.com: Preventing PHP Mail(...) Header Injections]]></title>
      <guid>http://www.phpdeveloper.org/news/16237</guid>
      <link>http://www.phpdeveloper.org/news/16237</link>
      <description><![CDATA[<p>
On the Dream In Code forums there's a recent post showing you how to <a href="http://www.dreamincode.net/forums/topic/228389-preventing-php-mail-header-injections/">prevent mail() header injections</a> when taking user input, like from a form.
</p>
<blockquote>
PHP's mail() function is a very useful and powerful function, even to the point that it is very easy to exploit. A way hackers exploit this function is a method called email header injection. [...] I'm sure most of you can already tell that's not going to be pretty since we didn't check the user input and so forth. PHP provides us with functions such as <a href="http://www.php.net/manual/en/function.filter-var.php">filter_var</a> which will validate user input and either return false if the validation fails or return the filtered data.
</blockquote>
<p>
He includes an example of using this filtering methods to check the user input for malicious information - validating that the "to" address is a valid email (FILTER_VALIDATE_EMAIL) and a sanitize() method that removes things like newlines, carriage returns and a few other characters.
</p>]]></description>
      <pubDate>Fri, 22 Apr 2011 11:06:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Weiske's Blog: A MIME type for .php files]]></title>
      <guid>http://www.phpdeveloper.org/news/16195</guid>
      <link>http://www.phpdeveloper.org/news/16195</link>
      <description><![CDATA[<p>
<i>Christian Weiske</i> has a recent post to his site looking at something most PHP developers don't even think about when serving up their scripts - the <a href="http://cweiske.de/tagebuch/php-mimetype.htm">MIME types for PHP files</a>.
</p>
<blockquote>
While setting some svn properties at work, we wondered about the correct MIME type for .php files.
</blockquote>
<p>
He found several in the <a href="http://www.iana.org/assignments/media-types/">official IANA list</a> including "text/php", "application/php" and "application/x-http-php" - all valid but none of them considered a standard. He talks about the ones supported by linux distributions (like Debian/Ubuntu) and some reasoning that might make "application/php" the best choice of the list. He points out some downsides to the choice, though, including the fact that something starting with "application/" should considered "machine readable" only despite PHP just being text.
</p>]]></description>
      <pubDate>Thu, 14 Apr 2011 09:17:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Send Text Messages with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15801</guid>
      <link>http://www.phpdeveloper.org/news/15801</link>
      <description><![CDATA[<p>
On NetTuts.com today there's a new tutorial showing you how to <a href="http://net.tutsplus.com/tutorials/php/how-to-send-text-messages-with-php/">send text messages</a> via SMS directly from your script to the user's cell phone.
</p>
<blockquote>
Text messaging has become extremely widespread throughout the world - to the point where an increasing number of web applications have integrated SMS to notify users of events, sales or coupons directly through their mobile devices. In this tutorial, we will cover the fundamentals of sending text messages with PHP.
</blockquote>
<p>
Their method "cheats" a little bit and uses an interface many of the cell phone providers offer to their subscribers - a link from an email address to SMS. Most providers <a href="http://www.venture-ware.com/kevin/?p=83">have their domains</a> you can send the email to and have it automatically forwarded to the user's cell as a text. Thankfully, this requires nothing more than the <a href="http://php.net/mail">mail</a> function to accomplish. They include the sample code and HTML+CSS to make a basic form as well as mention <a href="http://phpmailer.worxware.com/">PHPMailer</a> as a more powerful mailing alternative.
</p>]]></description>
      <pubDate>Tue, 25 Jan 2011 10:14:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Downloading and Parsing Gmail Messages in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15057</guid>
      <link>http://www.phpdeveloper.org/news/15057</link>
      <description><![CDATA[<p>
New on PHPBuilder.com today there's a tutorial showing you how to <a href="http://www.phpbuilder.com/columns/PHP-IMAP-Gmail/Rose_Kelleher083110.php3">download and parse</a> messages from Google Mail. In their case it's grabbing and parsing submissions from a form.
</p>
<blockquote>
Some friends of mine publish a literary journal that accepts submissions via email. At their request I wrote a script to download messages from the journal's Gmail account and do some simple parsing tasks. Most of the submissions are made using an HTML form and a corresponding mailer script on their website, so I knew the precise format of the incoming messages (see Figure 1). What I didn't know was how to access Gmail in PHP.
</blockquote>
<p>
He tried out the <a href="http://gmail-lite.sourceforge.net/wordpress/index.php/about/libgmailer/">libgmailer</a> script first, but ran into roadblocks until he realized he could use something PHP already had - the <a href="http://php.net/imap">imap functions</a>. With these he shows how to make a connection to the Gmail servers, get the listing of messages and pull out the body for the one you want to parse.
</p>]]></description>
      <pubDate>Wed, 01 Sep 2010 09:21:04 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Daniel Cousineau's Blog: Setting Up Mail() on Windows, or: Where is my Windows Sendmail.exe?]]></title>
      <guid>http://www.phpdeveloper.org/news/13089</guid>
      <link>http://www.phpdeveloper.org/news/13089</link>
      <description><![CDATA[<p>
In his development on a Windows environment, <i>Daniel Cousineau</i> has come across a hurdle - sending emails from his local machine from his PHP scripts. Thankfully he's found a solution and has <a href="http://www.toosweettobesour.com/2009/08/21/development-environment-help-setting-up-php-mail-on-windows-or-where-is-my-windows-sendmail-exe/">shared it in a new blog post</a>.
</p>
<blockquote>
Previously it was a simple trek to a website to download a Windows build of sendmail.exe, but for some reason I cannot get access to it, so I have to go another route. Enter <a href="http://www.hmailserver.com/">hMailServer</a>, a free, full-featured SMTP/POP/IMAP server for Windows with a pretty, shiny GUI configuration interface. All I really want to do is setup SMTP for localhost only but one could easily use hMailServer as a production mail server.
</blockquote>
<p>
He includes the details (along with some screenshots) to get the hMainServer software up and running. Thanks to the simple GUI the tool offers you can be up and working in a few clicks - oh, and a change to your php.ini file.
</p>]]></description>
      <pubDate>Fri, 21 Aug 2009 13:14:14 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Sameer Borate's Blog:Pushing xpi mime content from php]]></title>
      <guid>http://www.phpdeveloper.org/news/12541</guid>
      <link>http://www.phpdeveloper.org/news/12541</link>
      <description><![CDATA[<p>
In <a href="http://www.codediesel.com/php/sending-xpi-mime-content-from-php/">this new post</a> to his blog, <i>Sameer</i> shows how you can push content with the xpi content type out from your PHP scripts (for things like a Firefox toolbar/extension).
</p>
<blockquote>
A couple of days back I created a Firefox toolbar for my blog as an experiment in learning XUL. Once installed on my blog I wanted Firefox to recognize it as an addon and install it rather than displaying a 'save/open' dialog. 
</blockquote>
<p>
Since his hosting provider (GoDaddy) didn't seem to work with adding it into an .htaccess file (an AddType for Apache), he had to force the download type with a few calls to <a href="http://php.net/header">header</a> with the right content type, file size and file name to push it to the user.
</p>]]></description>
      <pubDate>Wed, 20 May 2009 07:06:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPClasses.org Blog: Sending e-mail using [Remote] SMTP servers/MIME Email]]></title>
      <guid>http://www.phpdeveloper.org/news/12373</guid>
      <link>http://www.phpdeveloper.org/news/12373</link>
      <description><![CDATA[<p>
On the PHPClasses.org blog <i>Manuel Lemos</i> has <a href="http://www.phpclasses.org/blog/package/9/post/1-Sending-email-using-SMTP-servers-of-Gmail-Hotmail-or-Yahoo-with-PHP.html">a recent post</a> looking at a method for sending emails using a remote SMTP server (like Google or Yahoo's) via <a href="http://www.phpclasses.org/blog/package/14/post/1-Sending-messages-to-many-recipients-via-SMTP-in-PHP.html">this package</a>.
</p>
<blockquote>
In most hosting environments, the PHP mail() function is sufficient to send e-mail messages without problems. However, there are situations on which using the mail function is inconvenient and may prevent that your messages reach the destination. [...] Therefore, you may need to find an alternative way for sending your e-mail messages from PHP.
</blockquote>
<p>
The <a href="http://www.phpclasses.org/blog/package/14/post/1-Sending-messages-to-many-recipients-via-SMTP-in-PHP.html">package</a> lets you define a username/password, server, whether to use a SSL connection or not, and if the connection needs to use the TLS protocol.
</p>]]></description>
      <pubDate>Mon, 20 Apr 2009 11:15:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: 9 Extremely Useful and Free PHP Libraries]]></title>
      <guid>http://www.phpdeveloper.org/news/12309</guid>
      <link>http://www.phpdeveloper.org/news/12309</link>
      <description><![CDATA[<p>
NETTUTS.com has posted <a href="http://net.tutsplus.com/articles/web-roundups/9-extremely-useful-and-free-php-libraries/">a list of nine libraries</a> you can use to quickly and easily add functionality to your web application.
</p>
<blockquote>
A lot of functionality is shared among applications - like sending emails or preventing spam. In the spirit of reusing the wheel instead of reinventing it, here are nine free web libraries that you can use in your next program which will dramatically increase your efficiency. 
</blockquote>
<p>Here's their list:</p>
<ul>
<li><a href="http://recaptcha.net/plugins/php/">ReCAPTCHA</a>
<li><a href="http://akismet.com/">Akismet</a>
<li><a href="http://pear.php.net/package/Services_JSON">Services_JSON</a>
<li><a href="http://smarty.net/">Smarty</a>
<li><a href="http://pchart.sourceforge.net/download.php">pChart</a>
<li><a href="http://simplepie.org/">SimplePie</a>
<li><a href="http://phpxmlrpc.sourceforge.net/#download">XML-RPC PHP Library</a>
<li><a href="http://undesigned.org.za/2007/10/22/amazon-s3-php-class">Amazon S3</a>
<li><a href="http://phpmailer.codeworxtech.com/index.php?pg=sf&p=dl">PHPMailer</a>
</ul>
<p>
Screenshots (and code examples) are provided for several of the items as well as links to their website and documentation pages.
</p>]]></description>
      <pubDate>Thu, 09 Apr 2009 07:51:16 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: Mail Logging for PHP 5.3+]]></title>
      <guid>http://www.phpdeveloper.org/news/11722</guid>
      <link>http://www.phpdeveloper.org/news/11722</link>
      <description><![CDATA[<p>
<i>Ilia Alshanetsky</i> has <a href="http://ilia.ws/archives/190-Mail-Logging-for-PHP-5.3+.html">officially submitted</a> his logging patch for the <a href="http://php.net/mail">mail</a> function in PHP:
</p>
<blockquote>
I've finally got of my ass and committed my mail logging patch I've written almost 2 years ago. This functionality is predominantly aimed at shared hosters that often have a problem identifying people who abuse the mail() function to send an in-ordinate amount of spam or hacked scripts used for the some purpose. The logging functionality is disabled by default but can be enabled on a per-directory or globally via 2 INI settings.
</blockquote>
<p>
A new directive in your php.ini file (mail.log) lets you specify where the mail log needs to go. You can also use the mail.add_x_header setting to add in a mail header with the name of the script that sent it (and the UID). 
</p>
<p>
It will be included in PHP 5.3 but if you're running PHP 5.2 and want to get a jump on it, <a href="http://news.php.net/php.cvs/55496">here's the patch</a>.
</p>]]></description>
      <pubDate>Mon, 12 Jan 2009 12:53:12 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: How to Open Zip Files with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11652</guid>
      <link>http://www.phpdeveloper.org/news/11652</link>
      <description><![CDATA[<p>
The NETTUTS.com site has a <a href="http://feedproxy.google.com/~r/nettuts/~3/umTYCt6xvOg/">new tutorial/screencast</a> posted looking at their method for opening up uploaded zip files with PHP:
</p>
<blockquote>
ThemeForest has a nice feature; It allows the authors to upload zip files containing screenshots of their themes. A script then extracts these files and displays the images accordingly. Though I doubt that the developers used PHP to accomplish this task...that's what we're going to use!
</blockquote>
<p>
They create a simple form with one field - a file input - and write some basic PHP around it. The script ensures that it was a zip file that was uploaded (based on the mime type) and passes it through a ZipArchive class to do the hard work. This class and the rest of the source <a href="http://nettuts.s3.amazonaws.com/165_php_zip/unZip_php.zip">can be downloaded</a> from the site.
</p>]]></description>
      <pubDate>Wed, 31 Dec 2008 12:04:06 -0600</pubDate>
    </item>
  </channel>
</rss>

