News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
CatsWhoCode.com:
How to easily monitor your web server using PHP
February 08, 2010 @ 13:48:31

In a new post to the CatsWhoCode.com blog Jean-Babtiste Jung walks you through the creation of a simple monitoring script written using just PHP that can tell you if your web site is up and responsive.

In order to make sure that your website is always available to the public, you have to monitor it. In this tutorial, I'll show you how you can easily create a monitoring script that will check your website availability and send an email or sms alert to you if it isn't.

They have a snippet of code (about 15 lines long) with a function you can call to check a remote host's connection and check the returned data for a certain string. This can not only ensure that your site is responsive but also that it's not responding incorrectly. You could even use this to hit a certain monitoring page of your site to check for certain things (like database connection problems).

0 comments voice your opinion now!
monitor webserver tutorial socket



Internet.com:
Passing Data Between PHP and JavaScript Using JSON (Video)
February 08, 2010 @ 10:51:42

As Developer.com mentions in a new article, there's a new video tutorial posted over on Internet.com about using PHP and JSON to pass around data in your applications.

Got seven minutes to learn how you can harness the power of PHP, JavaScript and JSON in a powerful AJAX-driven web application? This Internet.com Video tutorial shows you all you need to know to pass data between the client and server using JSON data format.

The video explains a bit about JSON+PHP and shows you how to send a simple message (book-related data) to the server and how to handle the response with a little help from jQuery's Ajax functions.

0 comments voice your opinion now!
json jquery tutorial video


Abhinav Singh's Blog:
MEMQ Fast queue implementation using Memcached and PHP only
February 08, 2010 @ 09:03:12

Abhinav Singh has a new post to his blog that looks at using a powerful tool, memcached, with PHP to create a simple queue system that could be reused just about anywhere.

Memcached is a scalable caching solution developed by Danga interactive. One can do a lot of cool things using memcached including spam control, online-offline detection of users, building scalable web services. In this post, I will demonstrate and explain how to implement fast scalable queues in PHP.

He starts with an overview of what the queue will let you do - save data into the queue with a unique identifier and pull it back out based on the key requested (and is removed from the queue). The code sets up the connection to the memcached server and gives you methods to check if the queue is empty and to push and pull records in and out. A bit of sample code illustrates how to put it to use.

1 comment voice your opinion now!
memcached queue tutorial


SitePoint PHP Blog:
How to Split WordPress Content Into Two or More Columns
February 05, 2010 @ 12:58:00

On the SitePoint PHP blog there's a recent post from Craig Buckler showing how to split up your WordPress content into two or more columns quickly and easily.

WordPress is a great CMS, but implementing some features within your theme can require a little lateral thinking. The content for your page or post is usually output by the theme code using a single function call. But what if you need to split the content into two or more blocks? That might be necessary if your theme requires multiple columns or sections on the page.

There's a built in call WordPress includes, "get_the_content", that returns the content rather than just echoing it out. With this handy function giving you just the content, you're free to split up the content however you want - on certain tags or as they suggest, using the "more..." tag and a few modifications to a few other scripts to split it out into DIV blocks.

0 comments voice your opinion now!
wordpress content tutorial split column


Chris Hartjes' Blog:
Sorting Relationship Results In Doctrine 1.2
February 05, 2010 @ 10:51:32

Doctrine allows you to set up relationships to link data in various tables together. Unfortunately, those aren't always in the order they need to be in. In a new post to his blog Chris Hartjes shows you how to sort these relationship results just by adding a simple line to your request.

I started digging around via search engine. Took me about an hour to find the solution. First, it took me half the time to dive deep enough to find out WHERE I can define the default sort order. Surprisingly, it was in an area that made total sense but I could not find before.

You can see an example of it in the "hasMany" call in his code snippet - the addition of the "orderBy" option and the value showing the sorting order. Here's the StackOverflow page that gave him the answer he needed.

0 comments voice your opinion now!
relationship doctrine sort tutorial orderby


Matthew Weier O'Phinney's Blog:
Creating Re-Usable Zend_Application Resource Plugins
February 05, 2010 @ 09:42:12

In a new post to his blog Matthew Weier O'Phinney looks at creating reusable plugins for the Zend_Application component of the Zend Framework. This is a follow-up from his previous article introducing Zend_Application.

What happens when you need a re-usable resource for which there is no existing plugin shipped? Why, write your own, of course! All plugins in Zend Framework follow a common pattern. Basically, you group plugins under a common directory, with a common class prefix, and then notify the pluggable class of their location.

His example shows a plugin that can set the doctype of the view you're using and set the default page title and the separator. He mentions things like the framework's coding/naming standards, dependency tracking, setting up the configuration and, finally, doing the two actions laid out at the start. A few simple lines added to the application.ini file and you're all set to start using the new plugin.

0 comments voice your opinion now!
zendframework tutorial zendapplication resource plugin


Raphael Stolt's Blog:
Utilizing Twitter lists with Zend_Service_Twitter
February 05, 2010 @ 08:14:44

Raphael Stolt has a new post to his blog today looking at how you can use the Zend_Service_Twitter component of the Zend Framework to work with the lists on Twitter.

While debating some use cases for an event registration application I stumbled upon an interesting feature, which adds participants automatically to a Twitter list upon registration. [...] This post will show how this feature can be implemented by utilizing the Zend_Service_Twitter component, and how it then can be used in a Zend Framework based application.

The Zend_Service_Twitter component makes it simple to interact with Twitter's API and calling the lists part of the API is a snap. His script first checks to see if a list exists, creates it if it doesn't and will add a user to it when they're registering. The class also includes the usual delete and modify functionality for both the users in the list and the lists themselves.

He finishes with a simple form that uses his interface class to take in the person's twitter username and send it off to the service.

0 comments voice your opinion now!
twitter list tutorial zendframework zendservicetwitter


NETTUTS.com:
Working with RESTful Services in CodeIgniter
February 04, 2010 @ 13:03:58

Phil Sturgeon has posted a new tutorial over on the NETTUTS.com site about working with REST services in CodeIgniter. He shows both sides of things - using REST services and making them.

CodeIgniter is becoming well known for its power as a PHP based web application framework, but it's not often that we see examples of it being used for anything else. Today we'll learn how we can use CodeIgniter to create a RESTful API for your existing web applications, and demonstrate how to interact with your own API or other RESTful web-services, such as Facebook and Twitter.

He has the sample code hosted over on his github account where you can pull down the source and follow along from the beginning. His application is created to be flexible enough for multiple output formats (xml, json, html) and respond correctly to the HTTP request types like GET, POST, PUT, DELETE. On the other side he shows how to consume the services via different methods like file_get_contents and cURL.

0 comments voice your opinion now!
rest webservice codeigniter tutorial consume create


Web Developer Juice:
11 easy steps for installing Apache ActiveMQ and configuring it for PHP applica
February 03, 2010 @ 13:49:24

On the Web Developer Juice blog there's a new post that'll walk you through the installation and integration of the Apache ActiveMQ messaging service and how to integrate it with your application.

Apache ActiveMQ is one good option for implementing message queue in your PHP application. It can be easily installed on your server and it's web accessible admin interface really makes administrator's life easy. It can be easily connected with PHP via STOMP. I will suggest to use MySql for Data persistance and start ActiveMQ as unix service.

Their eleven step process includes getting the packages you'll need to run ActiveMQ, starting/stopping the service, setting up the STOMP transport connector and finally connecting it to MySQL. You can then install the PECL extension for STOMP and reload Apache to get it all working together. They even include a sample script to get you started.

0 comments voice your opinion now!
tutorial step apache activemq configure install


IBM developerWorks:
Integrate Google Book Search into a PHP application
February 02, 2010 @ 09:10:48

In a recent tutorial from the IBM developerWorks website they show you how to link your site with the Google Book search and parse the results with the Zend Framework's Zend_GData component.

This article will introduce you to the Google Book Search Data API, showing you how to integrate and use book search results with a custom PHP application. It includes examples of searching for books by keyword, by language or by author; retrieving book data (including ISBN numbers and thumbnail images); and adding reviews and ratings to books that are already in the database.

They start with an overview of how the search feeds are structured so you can get an idea of whether or not the returned information looks correct or not. From there they get into the code - parsing those feeds, sending search requests based on input strings, getting details on a specific book and pulling in the contents of a user's library.

0 comments voice your opinion now!
google book search zendframework gdata tutorial



Community Events







Don't see your event here?
Let us know!


opinion book zendframework conference jquery framework developer microsoft phpunit job pear mysql wordpress codeigniter server solar zend podcast doctrine api

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