News Feed
Sections
News Archive


Community Events






feed this:

Developer Tutorials Blog:
Port Scanning and Service Status Checking in PHP
0 comments :: posted Tuesday June 10, 2008 @ 08:46:08
voice your opinion now!

The Developer Tutorials blog has posted a new tutorial covering how to scan ports and checking a remote service's status with PHP.

Having access to the current status of public servers can empower your applications to make decisions and respond to problems automatically. Acknowledging a service is offline can also save endless support emails. In this tutorial, I'll show you how to keep track of your server status by scanning ports on your server with PHP.

They show how to check a remote instance (a socket open with a timeout) and how to run through a list of ports, looping from one to one-thousand and running an fsockopen on each. They make a sample script to show these two combined - a simple page that loops through the common protocols (HTTP, FTP, SSH, etc) and checks to see if the remote machine is running something on that port.

tagged with: port scan service status check fsockopen http ftp ssh


Alex Netkachov's Blog:
BAT file tips
0 comments :: posted Friday June 06, 2008 @ 07:58:08
voice your opinion now!

Alex Netkachov has updated a post he made a while back (in 2006 in fact) about making Windows batch files (.BAT) that would do the same thing as some of the functions in PHP. He's added two more to it today - one for string replace and another for splitting a string.

The replace is as simple three line call, much the same as PHP's and the split call, while a bit more complex, is still pretty straight forward (it just needs a few extra variables).

Other methods in the post include a "switch" method, defining a procedure and updating variable by its name.

tagged with: bat file tip string replace split function port

Harry Roberts' Blog:
Manipulating PHP arrays with SQL
0 comments :: posted Thursday May 22, 2008 @ 14:39:54
voice your opinion now!

Harry Roberts has a quick post to his blog today showing a method he's come up with to handle PHP arrays from inside of SQL statements (a port of the JsonSQL library to PHP).

Trent Richardson created a very small and simple JsonSQL library for JavaScript which allows you to run an extremely limited subset of SQL against a Json array/object. I quickly ported it over to PHP 5 and it works like a charm, although the syntax for the WHERE clause isn't exactly the same but the rest ported across properly.

He's included some sample source code of it in action - selecting information out of an array of user information, once changing their order and the other grabbing a username. Complete source for the library is included too.

tagged with: manipulate array sql statement phpsql library port jsonsql

ActsAsFlinn Blog:
PHP and ActiveRecord
2 comments :: posted Thursday August 09, 2007 @ 10:12:00
voice your opinion now!

On the ActsAsFlinn blog, a new article's been posted talking about ActiveRecord and some of the problems with implementing it in PHP.

I'm starting a new job soon and I'll be working primarily with PHP. Since I've been a rubyist for the last 2 years I'm looking at PHP from a Rails development perspective. Before working exclusively with Ruby I hung onto to PHP (because of the project I was working on) by porting Rails bits to PHP. I eventually gave up on porting Rails to PHP after my project's funding was cut.

His experience found that there were a few things that caused the problem in the transition between Ruby and PHP like "in Ruby everything is an object" and some Reflection differences between the two languages. He has a little sample object he's created the code for, but it still doesn't work quite right.

In the end, he points out that the Row Data Gateway is a much easier method to get working in PHP (complete with sample code).

tagged with: activerecord designpattern ruby port database activerecord designpattern ruby port database


zend zendframework mysql releases pecl cakephp security PEAR release database framework book ajax conference package job developer application PHP5 code

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework