<?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>Sun, 19 May 2013 10:19:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[RooJs.com: How to spam in PHP..]]></title>
      <guid>http://www.phpdeveloper.org/news/16173</guid>
      <link>http://www.phpdeveloper.org/news/16173</link>
      <description><![CDATA[<p>
On RooJs.com there's a recent post from <i>Alan Knowles</i> looking at <a href="http://roojs.com/index.php/View/233/How_to_spam_in_PHP.html">how to spam in PHP</a>. No, nothing malicious - it's more about scalability in sending emails from PHP applications.
</p>
<blockquote>
The reason this has been relivant in the last two weeks is two fold, first off, my slow and sometimes painfull <a href="http://roojs.com/mtrack/>rewrite of mtrack</a> has got to the point of looking at email distribution. Along with this I have  a project that needs to distribute press releases, and track responses. Since both projects now use the same underlying component framework (<a href="http://www.roojs.com/mtrack/index.php/Browse/default/Pman.Core">Pman.Core</a> and <a href="http://www.roojs.com/mtrack/index.php/Browse/default/Pman.Base">Pman.Base</a>). It seemed like an ideal time to write some generic code that can solve both issues.
</blockquote>
<p>
He mentions the usual method of generating numerous emails and sending them to a remote SMTP server, but points out that there's  a better way. You can take advantage of queuing and batch sending techniques and, the way he decided to do it for mtrack, using queue tables and a backend runner (a cron job) that uses <a href="http://php.net/proc_open">proc_open</a> to send out multiple emails at once. You can <a href="http://www.roojs.com/mtrack/index.php/File/default/Pman.Core/NotifySend.php?jump=">see the code for it here</a>.
</p>]]></description>
      <pubDate>Mon, 11 Apr 2011 10:20:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Turland's Blog: CDC Update (or an Unusual Parse Error)]]></title>
      <guid>http://www.phpdeveloper.org/news/12311</guid>
      <link>http://www.phpdeveloper.org/news/12311</link>
      <description><![CDATA[<p>
<i>Matthew Turland</i> <a href="http://ishouldbecoding.com/2009/04/09/cdc-update">came across an interesting bug</a> when working with the <a href="http://github.com/elazar/cdc/tree/master">Cares Document Checker</a> he's developing related to linting (running a syntax check) on a given PHP file.
</p>
<blockquote>
While doing a lint check on a code block, a parse error was occurring on a line that contained a comment in the original source file. [...] Presumably what was happening was, even though the var_dump() call showed that actual newlines were being interpreted correctly, the r was also being interpreted rather than taken literally. This caused the comma following it to generate the error I was receiving.
</blockquote>
<p>
An alternative to the method he was using, <a href="http://php.net/shell_exec">shell_exec</a>, is <a href="http://php.net/proc_open">proc_open</a>, a function that opens a resource to handle a command execution and allows for more than just the "point and shoot" execution that things like shell_exec, <a href="http://php.net/exec"> or <a href="http://php.net/system">system</a>.
</p>]]></description>
      <pubDate>Thu, 09 Apr 2009 09:32:46 -0500</pubDate>
    </item>
  </channel>
</rss>
