Archive for November 15th, 2006

PHPBuilder.com: Pro PHP Security / Preventing SQL Injection, Part 3

PHPBuilder.com continues their look at preventing SQL injections in your PHP scripts with this new tutorial, the third part of the excerpts from the APress book Pro PHP Security.

They pick up where they left off last time with the creation of an abstraction layer for your application to act as a go-between and filter out possible bad data. They give examples of how to use it to secure a new application, use abstraction libraries like the PearDB functionality, and how to test your application’s protection.

Continue Reading · Add comment

Richard Davey’s Blog: PhpEd vs Zend Studio

On his blog today, Richard Davey has posted a review he’s done comparing two of the major PHP IDEs offered - NuSphere’s PhpEd and Zend’s Zend Studio.

A few months back Nusphere emailed me to say that version 4.6 of PhpEd was out, and did I want to trial it. I figured what the heck, and here is what I found out when you compare the two …Wow, things have changed in PhpEd land! Being a stalwart Zend IDE user I figured it would be only fair to give you a break-down comparison of the two.

He looks at a few different topics:

  • The Editor Itself
  • PHP IDE GUI Designers = Extinct?
  • How do they handle my projects?
  • File Uploading
  • HTML Support
  • Source Control
  • Debuggers
  • Other Tools
  • PHP 5.2

Since he’s really trying to find out more about this latest version of PhpEd, he tends to be a bit heavy on the comments towards that (and less of a comparison), but it’s definitely a good look at two different IDEs and some of their strengths and weaknesses.

Continue Reading · Add comment

DevArticles: Creating the Front End of a Search Engine with AJAX

DevArticles has posted the first part of a new series today, one looking at the creation of a simple search engine with PHP and Ajax. It’ll pull the data it needs from a backend database and display the results as transmitted through the Ajax connection.

In this particular article, though, they focus on the front-end of the system - creating the user interface, the look and feel of how it will function, and, finally, programming a behavioral layer to make the Ajax connection to the backend. It grabs the contents of the text field (in the form) directly and pushes it to a search.php on the backend.

Finally, they give you a full code listing for the entire setup so far to ensure you’re up to speed.

Continue Reading · Add comment

Coding Folders for a PHP Email Application

In this article the fourth and final one of our series covering the creation of a PHP email application we are going to look at the code for some of the remaining pages of the mail application. Chief among these is the NewMsg.php page which is where items to be more precise new messages are either saved as drafts or saved as sent messages….

InSpec Implement and manage your source code and design review process. Be efficient with your reviews. Reduce team frustration. Collect and keep inspection data for analysis and ROI determination.

Continue Reading · Add comment

Wez Furlong’s Blog: HTTP POST from PHP, without cURL

In an effort to get streams more out in the, er, mainstream, Wez Furlong has posted an example of some code for a common operation many use cURL for - posting to a remote script - but with streams.

Every time I search for the code snippet that allows you to do an HTTP POST request, I don’t find it in the manual and resort to reading the source. So, here’s an example of how to send a POST request with straight up PHP, no cURL.

The example uses stream_context_create, fopen, stream_get_contents and an Exception to send off the message from an inputted array to the remote server. Smaller things, like the Content-length header on the request, are automatically handled by the wrapper functionality. You can check out this page for more information on the wrapper functionality.

Continue Reading · Add comment