<?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>Sat, 25 May 2013 13:16:24 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rob Allen: Sending an HTML with text alternative email with ZendMail]]></title>
      <guid>http://www.phpdeveloper.org/news/18689</guid>
      <link>http://www.phpdeveloper.org/news/18689</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has a <a href="http://akrabat.com/zend-framework-2/sending-an-html-with-text-alternative-email-with-zendmail/">quick tutorial posted</a> to his site today showing you how to send an email with the ZendMail component of the Zend Framework 2 that contains HTML but provides a plain text backup in the same message.
</p>
<blockquote>
Sending a multi-part email with ZendMail is easy enough, but if you want to send an HTML email with a text alternative, you need to remember to set the content-type in the headers to multipart/alternative. As this is the second time I had to work this out, I'm noting it here for the next time I forget!
</blockquote>
<p>
The rest of the post is the code you'll need to send a simple email with a text and HTML body sections, configure the headers (to, from, etc) and the "multipart/alternative" header to make the HTML or plain text switching work correctly.
</p>]]></description>
      <pubDate>Fri, 02 Nov 2012 10:26:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[James Morris' Blog: Parsing HTML with DOMDocument and DOMXPath::Query]]></title>
      <guid>http://www.phpdeveloper.org/news/18145</guid>
      <link>http://www.phpdeveloper.org/news/18145</link>
      <description><![CDATA[<p>
In the latest post to his blog <i>James Morris</i> looks at <a href="http://blog.jmoz.co.uk/domdocument-domxpath-html-parsing">using XPath's query() function</a> to locate pieces of data in your XML.
</p>
<blockquote>
The other day I needed to do some html scraping to trim out some repeated data stuck inside nested divs and produce a simplified array of said data. My first port of call was SimpleXML which I have used many times. However this time, the son of a bitch just wouldn't work with me and kept on throwing up parsing errors. I lost my patience with it and decided to give DomDocument and DOMXpath a go which I'd heard of but never used.
</blockquote>
<p>
He includes a code (and XML document) example showing how to extract out some content from an HTML structure - grabbing each of the images from inside a div and associating them with their description content.
</p>]]></description>
      <pubDate>Wed, 27 Jun 2012 10:19:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: So You Want to Accept Credit Cards Online?]]></title>
      <guid>http://www.phpdeveloper.org/news/18091</guid>
      <link>http://www.phpdeveloper.org/news/18091</link>
      <description><![CDATA[<p>
On NetTuts.com they're posted a new tutorial about <a href="http://net.tutsplus.com/tutorials/other/so-you-want-to-accept-credit-cards-online/">using the Stripe service</a> to accept credit cards on your site. Thanks to some handy libraries they provide, integration is a relatively simple process.
</p>
<blockquote>
Until recently, accepting credit cards on a website was expensive and complicated. But that was before <a href="https://stripe.com/">Stripe</a>: a radically different and insanely awesome credit card processing company. Today, I'll show you how to start accepting cards in 30 minutes or less - without spending a dime.
</blockquote>
<p>They step you through the whole process you'll need to get the full flow set up:</p>
<ul>
<li>Install an SSL Certificate (on your server)
<li>Create an Account
<li>Create Your Payment Form
<li>Collect The Form Values
<lI>Request a Token
<li>Create a Server-Side Script
</ul>
<p>
Screenshots of the Stripe interface, HTML, Javascript and PHP code are all included - everything you need to make the simple card handling work. One of the keys to how Stripe deals with credit cards is that you provide it the card info, it gives you a token. Your app uses this to work with the card instead of storing the card information in your database (also making it more secure).
</p>]]></description>
      <pubDate>Thu, 14 Jun 2012 09:30:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Server-Side HTML Handling Using phpQuery]]></title>
      <guid>http://www.phpdeveloper.org/news/18082</guid>
      <link>http://www.phpdeveloper.org/news/18082</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial today showing how you can <a href="http://phpmaster.com/server-side-html-handling-using-phpquery/">use phpQuery to work with HTML</a> in your application. <a href="http://code.google.com/p/phpquery/">phpQuery</a> is a server-side CSS-selector-driven based on jQuery's API.
</p>
<blockquote>
Think about how you can change and manipulate the generated HTML using server-side PHP code. phpQuery is the ultimate solution that will come to your mind. If you haven't heard about phpQuery, you may be interested in this article since I am going to give you a brief introduction to phpQuery and explain how you can use it in real-world projects.
</blockquote>
<p>
The tutorial shows you how to generate a simple table with alternating row colors (zebra) and column headers from an array of product information. They also talk a bit about why using something server-side like this is important (over something client-side like jQuery) - how it can make things easier by keeping the "business logic" all in one place, leaving your frontend to do what it does best.
</p>]]></description>
      <pubDate>Tue, 12 Jun 2012 10:58:26 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Danne Lundqvist's Blog: Getting to grips with an existing XML structure]]></title>
      <guid>http://www.phpdeveloper.org/news/17864</guid>
      <link>http://www.phpdeveloper.org/news/17864</link>
      <description><![CDATA[<p>
<i>Danne Lundqvist</i> has a new post where he shares a bit of code he's written to "come to grips" with <a href="http://www.dotvoid.com/2012/04/getting-to-grips-with-an-existing-xml-structure/">an existing XML structure</a>.
</p>
<blockquote>
Very often I find myself writing input filters for large XML files using PHP. Common enough task; and PHP offer a great variety of tools to do this effectively depending on the situation. Unfortunately, almost as common is the lack of documentation for the aforementioned XML files. [...] I have looked around for a simple tool but I didn't really find a  tool that gave me the quick and dirty overview I wanted. A year or so ago I finally wrote a small PHP class to analyze large XML files.
</blockquote>
<p>
He includes an example XML file, the <a href="http://www.dotvoid.com/wp-content/uploads/2012/04/xmlstruct.png">HTML output</a> of the parsing and a sample of how to use <a href="http://www.dotvoid.com/wp-content/uploads/2012/04/xmlgrips.tar.gz">the class</a> to parse and output the XML structure, complete with some CSS.
</p>]]></description>
      <pubDate>Wed, 25 Apr 2012 10:44:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Form Validation with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17660</guid>
      <link>http://www.phpdeveloper.org/news/17660</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing how to <a href="http://phpmaster.com/form-validation-with-php/">do some form validation</a> using some basic PHP (no external libraries or tools here). This is a beginner level tutorial to help you get familiar with the concepts behind doing validation (and 
</p>
<blockquote>
In this article you'll construct and validate a simple form using HTML and PHP. The form is created using HTML and validation and processing of the form's contents is done with PHP. The goal is to teach you some basic HTML form elements and how their data is accessible to you in your PHP scripts.
</blockquote>
<p>
They start with the form itself, a basic setup with various kinds of fields - text, select, radio and a checkbox. Both the HTML markup and the PHP to do the validation is included. They check for things like "not empty", "must select one" and optional fields. Be sure to read <a href="http://phpmaster.com/form-validation-with-php/#comments">the comments</a> for some good tips on filtering the form's input too.
</p>]]></description>
      <pubDate>Mon, 12 Mar 2012 12:17:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Smashing Magazine: Create A Christmas Wish List With PHP (For Beginners)]]></title>
      <guid>http://www.phpdeveloper.org/news/17298</guid>
      <link>http://www.phpdeveloper.org/news/17298</link>
      <description><![CDATA[<p>
In <a href="http://coding.smashingmagazine.com/2011/12/22/create-a-christmas-wish-list-with-php/">this new tutorial</a> Smashing Magazine shows you how to create a mini "Christmas List" application with PHP, HTML and CSS (and a little bit of database help) to display a list of what you or your family wants this holiday.
</p>
<blockquote>
'Tis the season to be jolly, and how much jollier could we make it than with a helpful Christmas wish list crafted for your family to ensure that you get maximum presentage this holiday? In this article, we will focus on creating a very simple system that allows you to add gift ideas to a Web page, and for your family (or whoever) to view the list.
</blockquote>
<p>
They walk you through the setup of the basic PHP file structure, the HTML template for the list output, CSS to make it look nice and the actual PHP backend - working with a MySQL database to pull out product information and use a simple login method.
</p>]]></description>
      <pubDate>Fri, 23 Dec 2011 10:23:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Sending Emails with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17031</guid>
      <link>http://www.phpdeveloper.org/news/17031</link>
      <description><![CDATA[<p>
In a new tutorial from PHPMaster.com <i>Jason Pasnikowski</i> takes a look at <a href="http://phpmaster.com/sending-emails-with-php/">sending emails with PHP</a> - an introduction to what the language offers and how it can be used to send an HTML version.
</p>
<blockquote>
In most cases your installation of PHP will be capable of sending emails. If you are using a shared host, or if you installed PHP using a package management system like apt-get, more than likely you're all set. You'll really only need to worry about extra configuration if you're compiling PHP from source or if you're running it on Windows. In either case, there are plenty of resources available online to help you out. Because that's all beyond the scope of this article, I'll assume you're set. If not, Google will be your friend.
</blockquote>
<p>
He starts with a simple example using the <a href="http://php.net/mail">mail</a> function but quickly moves on to sending a multi-part email with an attached zip file and HTML content. He includes the all code you'll need and explains each part in detail so you'll know exactly what's going on.
</p>]]></description>
      <pubDate>Mon, 24 Oct 2011 20:08:52 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Script-Tutorials.com: Creating Your Own Commenting System from Scratch]]></title>
      <guid>http://www.phpdeveloper.org/news/17000</guid>
      <link>http://www.phpdeveloper.org/news/17000</link>
      <description><![CDATA[<p>
Script-Tutorials.com has a new article posted today showing you how to combine PHP, some CSS, a dash of SQL and some HTML (oh, and jQuery) to create <a href="http://www.script-tutorials.com/how-to-create-own-commenting-system/">your own commenting system</a> from scratch that could be used anywhere from a simple blog to a more complex social site.
</p>
<blockquote>
Today I prepared new interesting article - I will tell how you can create own commenting system (AJAX) for your items (any units at your website) with PHP. For our demonstration - I prepared two SQL tables: first table will keep records of our items. It contain several fields: title, description, time of adding and comments count. Another table will keep records of comments. We will use jQuery too (for better interface behavior). One of features will spam protection (we can post no more than one comment every 10 minutes)!
</blockquote>
<p>
<a href="http://www.script-tutorials.com/how-to-create-own-commenting-system/">The tutorial</a> includes all of the code, markup and styling you'll need to make the system work. If you'd like to get right into the code you can <a href="http://www.script-tutorials.com/demos/163/source.zip">download it as a package</a> or you can <a href="http://www.script-tutorials.com/demos/163/index.php">try out their demo</a>.
</p>]]></description>
      <pubDate>Mon, 17 Oct 2011 11:30:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: PHP Simple HTML DOM Parser: Editing HTML Elements in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16833</guid>
      <link>http://www.phpdeveloper.org/news/16833</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new tutorial from <i>Vojislav Janjic</i> about using a <a href="http://www.phpbuilder.com/columns/PHP_HTML_DOM_parser/PHPHTMLDOMParser.cc_09-07-2011.php3">simple DOM parser</a> in PHP to edit the markup even if it's not correctly W3C-formatted - the <a href="http://simplehtmldom.sourceforge.net/">Simple HTML DOM Parser</a>
</p>
<blockquote>
Simple HTML DOM parser is a PHP 5+ class which helps you manipulate HTML elements. The class is not limited to valid HTML; it can also work with HTML code that did not pass W3C validation. Document objects can be found using selectors, similar to those in jQuery. You can find elements by ids, classes, tags, and much more. DOM elements can also be added, deleted or altered. 
</blockquote>
<p>
They help you get started using the parser, passing in the HTML content to be handled (either directly via a string or loading a file) and locating elements in the document either by ID, class or tag. Selectors similar to those in CSS are available. Finally, they show how to find an object and update its contents, either by adding more HTML inside or by appending a new object after it.
</p>]]></description>
      <pubDate>Thu, 08 Sep 2011 10:06:07 -0500</pubDate>
    </item>
  </channel>
</rss>
