Archive for the 'PHP' Category

ie8 new features announced

Wednesday, March 5th, 2008

Microsoft has released information about whats it adding to IE8. The changes for developers look pretty good.

The biggest things I see are:

AJAX wise most of the changes are implementing bug fixes and new APIs from the HTML 5 spec (DOM Storage, firing hashChanged events, XDM).

There also seems to be a new XDR API for making requests to other domains. The API is simple but I’m not sure if the security model is good enough not to cause long term problems. If anyone finds/writes a review of XDR and its security implications please let me know.

fastcgi for IIS 6 is out

Monday, November 12th, 2007

Last month I had a change to goto Microsofts WebDev07 conference. I haven’t gotten around to doing a write up but Travis did a good one if your interested in what Microsoft has to say to a bunch of PHP guys.

One of the projects I found out about while I was there was fastcgi support in IIS. If your running PHP on windows with IIS this is a pretty big deal since it gives you a stable high performance way to run PHP. I also think its important because its real engineering time by Microsoft on the on project, a real commitment to PHP.

You can grab the bits at: http://www.iis.net/php, this release is fully supported by Microsoft which is also kinda nice.

It would be interesting to see some benchmarks comparing the new fastcgi stuff against your other PHP on windows options, but its doubtful I’ll run them since I run all my production on linux.

Messed up upgrades and Tags

Friday, November 9th, 2007

I upgraded to Wordpress 2.3.1 yesterday and do to some earlier failed upgrade all my post categories got messed up. Luckily I only have about 300 posts so re tagging everything wasn’t that painful. But word to the wise, if your running Wordpress from SVN use a branch, it was following trunk in the paste that got my database messed up in the first place.

phpDocumentor 1.4.0 scheduled for release on 7/20

Wednesday, July 18th, 2007

The PhpDocumentor team hopes to release the final 1.4.0 stable feature release on 7/20. If you have test-driven any of the recent pre-releases for 1.4.0 (alpha1, alpha2, RC1, RC2), please let us know any good/bad feedback you have from that experience.

Changelogs:
1.4.0RC2
Includes no PEAR items:

Includes these Sourceforge items:
- [1733938] regression: “-” not allowed anymore in converter (file)name
- [1733936] “phpdoc” does not return with error code “0″ on success
- [1733345] inline @link tag renders wrong way
- [1722096] DocBlock template example does not work

1.4.0RC1
Includes these PEAR items:
Bug #11409: PHP Notices accompany Global Never Found errors

Includes these Sourceforge items:
- [1724990] @static tag example
- [1724884] object return parameter value
- [1720764] documentation update needed
- [1672589] missing elements, bad links with HTML:Smarty:HandS
- [1634153] require/include with concatenated file name
- [1632496] {@internal}} becomes wrong on documentation
- [1124133] <code> and @include….

1.4.0a2
Includes these PEAR items:
Bug #10864: PhpDocumentor dies when parsing illegal page-level docblock
Bug #10870: Dead links generated with HTML:Smarty:PHP Bug 10871: Wrong rendering of inline {@internal}}
Bug #10910: DOM templates create incorrect trees
Doc #10914: Can’t use nested tags inside or
Doc #10972: @method does not work
Doc #11032: param type1|type2 not documented
Doc #11143: Provide a Minimal Tutorial File Setup Example

Includes no Sourceforge items.

1.4.0a1
Includes these PEAR items:
Req #10670: Don’t Die on Empty Tag Descriptions
Doc #10675: Clear some errors.html items
Doc #10730: Replace Sourceforge Trackers with PEAR

Includes these Sourceforge items:
- [1647423] memory_limit: bad if-clause
- [1622538] List undocumented classes/functions
- [1602988] Added –ignore-symlinks option
- [1588942] Allow memory_limit setting in phpdoc.ini
- [1588936] Show INI Path at Startup
- [1585840] Refactored RETURNs #3
- [1574047] Refactored RETURNs #2
- [1574043] Refactored RETURNs #1
- [1543289] Apply ignore patterns to subdir of dir, instead of full path
- [1543287] Use predefined PHP env var in phpdoc script
- [1540666] patch for @property, @property-read and @property-write tags
- [1044752] List undocumented classes/functions

Slides from azPHP presentation of PEAR: An Introduction

Thursday, May 24th, 2007

Tuesday I did a presentation about PEAR at my local PHP user group. Those slides are now available.

I’m hoping to improve the slides a bit and give this presentation at lots of other places. If any PHP User groups on the west coast would like me to do a presentation about PEAR drop my a line.

If you’d like to give a presentation about PEAR at your local user group also let me know and I’ll give you a tarball of the slides, you just have to agree to give me back your updates :-).

Thanks for your thoughts on improving PEAR

Tuesday, May 8th, 2007

I’d like to thank everyone who left a comment on my last post about How you would improve PEAR. You’ll be happy to know that were already working on many of your suggestions, Greg’s post on the subject has some more details. I’ll be sharing everyones comments with the rest of the PEAR group at our meeting on the 13th, so if anyone has a suggestion they haven’t submitted yet thats your deadline.

Out of all the suggestions the one I’m most excited about is starting a mentoring program to help developers get involved with PEAR. This is someone we were already planning on doing so now its just a matter of getting the details taken care of. I’m not sure if will end up with an official sign up for a mentor or some other process but until then, if your interested in getting started as a PEAR developer and want a mentor send me an email and i’ll find a mentor for you.

Also if anyone left a comment and it didn’t show up it got caught in my spam filters. I get about 500 blog spams a day so I can’t easily check the filter for false positives. If you think this happened to you shoot me an email and post again and i’ll make sure it goes through.

How would you improve PEAR?

Thursday, May 3rd, 2007

You might have heard that I’m a member of the PEAR group now. Because of this I’ve been spending a lot of time thinking about what I’d like to see changed in PEAR to make it a better project. I’m slowly building up a list of ideas and at some point I’ll share it, but today I’d like to get some feedback from everyone who reads this blog.

If you were a member of the PEAR group what would you change about PEAR. Please keep in mind were not an all powerful body (Read the constitution for details), but we do have the ability to set policy, and like in any open source project we can make changes through our direct actions.

Thanks in advance for your comments.

PEAR elections begin tomorrow

Thursday, April 19th, 2007

The PEAR elections start tomorrow, if your a PEAR developer you’ll want to read people’s position statements so you can make an informed vote.

I hope these elections will be the beginning of the a rebirth of PEAR. It was a wonderful idea when it started but its been coasting for the last couple years we never did enough to embrace PHP5.

If your wondering what the whole election is about its pretty simple. A month or so again PEAR voted to accept a new constitution. This constitution, created a new position of President (Which only Greg Beaver is running for) and made the PEAR group an elected position (candidate list with position statement follows). The PEAR group’s job is to decide how PEAR should be run and too make this happen.

This election is for a term running May 1, 2007 to May 1, 2008

The following are running for the PEAR Group (Position statements are linked for their names)
Updated April 19th 2:45PM MST

Some people haven’t replied with a position statement yet, so I haven’t linked to it, i’ll update this post as people’s emails make it too the list.

If I didn’t find position statements posts today I added a link to the post the person sent at nomination time.

Testing phpDocumentor 1.3.2

Monday, April 2nd, 2007

The phpDocumentor team is just about ready to do a bug fix release. The code is sitting on the server and ready to be uploaded, we just want to get some extra testing done.

If you could install 1.3.2 do your normal documentation run, and leave a note on this post I’d be grateful. The bug fixes have all been tested but you never know what can creep in during the packaging process.

Pear download

pear upgrade http://bluga.net/projects/phpDocumentor/PhpDocumentor-1.3.2.tgz

Non-PEAR download (extract and go)

Update (2007-04-04) we made some small changes to the build, mainly making sure everything knows its version 1.3.2

Pear Mirror

Tuesday, March 27th, 2007

Thanks to Greg’s efforts I’m now hosting a mirror of the PEAR channel. At the moment were only mirroring installer data not the entire website but its a start.

Things are still in the testing phase, but the mirror is usable, just run: pear config-set preferred_mirror us.pear.php.net

Right now we sync the mirrors every 4 hours, so it could be slightly out of date, but not enough to cause problems.

PHP Running on Java

Tuesday, March 13th, 2007

I found an interesting project, quercus that compiles PHP to Java Bytecode allowing it to run ontop of the Java Resin Application Server. It has a couple neat features, one being PHP6 compatible unicode support, the other being easy integration between Java and PHP code.

It also seems to perform well, implements a large part of the PHP api, and lets you implement anything your missing just be writing a new Java Class.

It will be interesting to see if a project like this can actually take off.

What i’ve been up to

Monday, March 12th, 2007

I haven’t blogged lately but I’m going to try to get with it again. Last month I finished up a big project built on top of Wordpress, and then started a new job. I’m doing less PHP coding in my day job for the time being which has been a nice change.

I’ve also been doing a lot more work on phpDocumentor lately, I’ve been mainly been focused on code review since Chuck Burgess has been getting tons of patches ready. We’ve also started planing for 2.0 release, so hopefully will get the large project performance problems fixed in the next 6 months. In the shorter term was almost ready to do a bug fix release, thanks to Chuck’s work a the majority of the outstanding bug have been fixed.

On the HTML_AJAX front there is a 0.5.1 release that is almost ready to go (I fixed a bunch of bugs last week) but it still needs more testing. Because of the testing problems I’ve finally started writing some unit tests for it. I’ve been focusing on the JavaScript side, using jsunit. Hopefully i’ll have enough tests done by the end of the week to feel comfortable about releasing. The code is pretty close to 1.0 at this point, its just a matter of writing tests, finishing the manual and adding a bit of polish. Let me know if your interested in helping out. Polish and documentation aren’t the most interesting parts of Open Source development but its one of the most important parts.

I haven’t got any new AJAX work to a state where I could do a real article but I have been playing around with some new stuff. Last week I started experimenting with Dojo, I wasn’t really happy with the state of its documentation, which is really problematic because of the enormous size of its API but it does have a lot of neat features. What interested me most was its Cross Domain XMLHttpRequest support, Its based on running the XMLHttpRequest requests in a separate IFrame and then loading the results back by modifying the Fragment identifier on the parent document.

I’d also like to point out that there has been that JQuery 1.1 has been released (and a couple bug fixes releases since then). It cleans up the API bit and has some nice performance enhancements. If your using JQuery its an upgrade well worth doing.

I’ve also been working on WebThumb a bit. No big changes but I have worked out all the PayPal integration bugs. I’ve also got enough paying customers to pay for some server upgrades should be done by the end of the month. I was hoping to have a new server running month but I’ve ran into some snags. I have the new server ready to ship to the Co-lo but it seems its all maxed out on power so we can’t use the rest of the space in the rack. Hopefully things will be figured out soon. I’ll be adding at least one new feature to WebThumb this month so if you have some feature you’ve been waiting for let me know, maybe your request will be the next addition.

phplondon conference 2007

Thursday, January 18th, 2007

A couple years I got to spend some time going to the phplondon user group. Its was a great group full of knowledgeable PHP developers who love to have a good time. They have been successful at growing the group over the last couple years and just let me know that they are having there second conference. The conference is a one day event, and from what I read about last years should be a great event.

CONFERENCE DETAILS:
phplondon conference 2007
23rd February 2007 @ The Keyworth Centre, London

After the success of the 2006 php conference, phplondon is organising a second conference for anyone who has an interest in all things php. You will be able to listen to an exciting mix of topics from these diverse and thought provoking speakers.

- Cal Evens (Zend) - My First Mashup
- Simon Laws (IBM) - Web services - drop it into Apache and away you go!
- Kevlin Henney - Objects of Desire
- Rasmus Lerdorf (Yahoo!) - Fast and Rich Web Applications with PHP 5
- William (Bill) Gaver (Goldsmiths University) - Ludic Interfaces

You will also have the opportunity to network with others and share experiences both at the conference itself and chat with the speakers informally at a special event afterwards.

Early bird price is £50, or £75 on the day. To find out more and book online visit us at http://www.phpconference.co.uk

Compressing JavaScript and CSS

Wednesday, January 10th, 2007

When your building fancy AJAX websites one thing that tends to happen is you end up loading amounts of JavaScript and CSS on your pages. And while browsers are smart and do a lot of client side caching you can’t get rid of that weight on your first page load.

For example on my blog I have about 60K of JavaScript and 10K of CSS. Now this isn’t horrible but when you figure images and 90K of HTML it doesn’t take long to get to my 200K total page weight.

There are a lot of various approaches for cutting down the size of JavaScript and CSS. Some of the common ones are removing whitespace and comments for JS and CSS, or using scripts which use alternate smaller syntaxes. There are a couple problems with this approach first it just doesn’t save as much space as I’d like, you can cut 60K of JavaScript down to 30K but not 10K. Second it makes debugging horrible, every JavaScript or CSS error comes from line 1 or the file.

There is a better approach and it comes from a technology in our browsers called Content Encoding. With the right headers we can send gzip’d content to the browser and it will automatically uncompress it. All modern browsers support this so its a huge win.

So now we have figure out how to compress our content, the simplest option for static files is Apache’s mod_deflate since chances are its already installed and you can enable it with a couple minutes of poking around in your httpd conf file. But it does have the disadvantage of recompressing the files for each request so it uses up some extra cpu.

mod_gzip has a similar feature set to mod_deflate with the addition of the ability to cache the compressed files but what I really want is a solution that can run on any run of the mill apache server.

To make this happen we need to compress a JavaScript file by hand and then make Apache serve it up with the correct headers.
The headers are pretty simple, Content-Type should be text/javascript and Content-Encoding should be gzip

To set the needed headers you just need to add the following rule to apache, it can go in your httpd.conf or in a .htaccess file.

<files *.js.gz>
ForceType text/javascript
Header set Content-Encoding: gzip
</files>

You can see this in action at with a small sample I made.

Now im sure your next question is what browsers support this, from my limited testing that FireFox 1.5+ and IE 6+ both work fine. From what i’ve ready anything back to version 4 of most browsers should work.

The only only downside to this approach is you have to make sure the keep your gzipped versions of files up to date and you have to update all your code to refer to the gzipped version. I don’t have a solution to the first problem, though running gzip file.js -c > file.js.gz is handy if you want to have both the uncompressed and compressed version of the file hanging around.

I thought I had a solution for the second problem using mod_rewrite. However I haven’t been able to get it working right so if you have any tips here’s my current attempt. The conditions seem to work right, but once the rediret happens the force type and content encoding header don’t seem to get set anymore.

<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_ACCEPT} >gzip
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.+).js$ $1.js.gz [QSA,L]
</ifmodule>

Note: For testing that things are working correctly you’ll want a tool to view the headers of the http response. If you want a web based tool web-sniffer seems to work well.

Deciding What AJAX Programming Style to Use

Thursday, January 4th, 2007

In my AJAX book, Understanding AJAX, I spend a lot of time talking about the various programming styles you can use with AJAX. Looking back at the chapter it seems to me there are 2 major styles of programming and large number of varitions depending on what data encodings were using, and where the bulk of our programming actually happens.

Looking at my own day to day development I tend to fall into a couple main approaches.

  • AJAX page chunks (sending standard GET/POST requests, and updating part of the page by innerHTMLing in the respose)
  • RPC using generated proxies
  • Widgeted AJAX using RPC in the background

Now each of these approaches has its advantages and disadvantages. AJAX page chunks are easy to understand, on the PHP side im generating HTML using a standard MVC framework, and I can just turn off my outer wrapper for the chunks. The disadvantage is that my JavaScript code doesn’t have a lot of power in this approach. I’m skipping full page reloads but I still might be updating a large percentage of the page for a very small change. Its also hard to update disperate parts of a page. To solve this I sometimes find myself returning an array of HTML chunks but this quickly leads to both the PHP and JavaScript sides of the equation getting overly complicated and brittle.

AJAX Page chunks are especially nice when dealing with forms, you just serialize the form to a query string, POST it to the PHP side and return the updated form, replacing the innerHTML of the forms parent with an updated form. I consider page chunks to be my first option, they make it easy to use a single code base to support AJAX and non-AJAX operation, and most importantly are an easy concept for new developers to pick up. It also leverages current skills and keeps the amount of JavaScript down since devlopers are more likely to look towards PHP (or whatever backend lanuage you use) to solve there problems.

RPC style AJAX using generated proxies is very powerful while still being pretty simple. HTML_AJAX makes programming in this style extremly easy to implement. On the PHP side I write a class that becomes the external API to my application. HTML_AJAX covers exporting the API and encoding the data, and on the JavaScript I get a generate proxy that makes that API easy to work with.

Then its time to write a lot of JavaScript code. The biggest benefit of any RPC approach is you have data in your JavaScript not just some HTML. I tend to use an approach like this when i’m building a JavaScript application. It tends towards a more client server model and moves things away from a standard MVC approach. The biggest disadvantage to this approach is the complexity. You end up with huge amounts of JavaScript code, and much smaller amounts of PHP. This wouldn’t be horrible if JavaScript was mature and consistent on all browsers but its not. Plus you can’t trust the client so the PHP code still ends up being larger then you’d like since it has too enforce all the security and integrity rules of the application. But at the end of the day sometimes you need the power.

The last style I use is related to the more standard RPC approaches but I’ll often use it along with AJAX page chunks. With widgeted AJAX I develop a self contained set of HTML and JavaScript code that can be easily integrated into any page. This might be a autocomplete/suggest style dropdown or a live grid. I normally use RPC on the backend inside these widgets since they need actual data but what there using doesn’t really matter. The point of the widget is too make things self contained enough that they can be easily integrated with anything.

Looking at these styles I think each can have it place, but I think my decisions on what to use are more and more driven by simplicity. When looking at a problem whats the simplest solution. The more I use AJAX the more I see that its added complexity is its biggest problem. Like any other programming the simplest solution is usually the best one.

I’d like to hear your thoughts on the matter, what AJAX programming styles do you use and why?

More Spam Fun

Thursday, December 21st, 2006

I hacked akismet a couple days ago to give me hourly spam statistics and then threw together a graph.

Spam in the last 24

Looks like the evil spammers were at it again this morning.

The Code

Create a new table to hold the stats:


CREATE TABLE `spam_count` (
  `day` date NOT NULL default ‘0000-00-00′,
  `hour` tinyint(4) NOT NULL default ‘0′,
  `count` int(11) NOT NULL default ‘0′,
  PRIMARY KEY  (`day`,`hour`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Find your akismet plugin [blog root]/wp-content/plugins/akismet/akistmet.php

Find the line in akismet that updates the global spam count

<?php

update_option( ‘akismet_spam_count’, get_option(‘akismet_spam_count’) + 1 );

?>

On my version of akismet thats line 139, in the ksd_auto_check_comment function

below that line add:

<?php

                /* Hourly Spam Counting Start */
                $today = date(‘Y-m-d’);
                $hour = date(‘H’);
                global $wpdb;
                $wpdb->query(“insert into spam_count (`day`,`hour`,`count`) values(’$today’,$hour,1) on duplicate key update `count`=`count`+1″);
                /* Hourly Spam Counting End */

?>

Then post some comments to test things, make sure your logged out and post something spammy. Then check the spam_count table and make sure its got a new row in it. If so then things are working right.

Now you have the data so the next step is too add some graphs. I use PEAR’s Image_Graph so install it.

Something like the command below might work:

pear install –alldeps Image_Graph-beta

Then make a graph the code for mine is:

<?php

// uses PEAR Image_Graph http://pear.php.net/Image_Graph
require_once ‘Image/Graph.php’;

require_once( dirname(__FILE__) . ‘/wp-config.php’);

$day = date(‘Y-m-d’,strtotime(‘-24 hours’));
$today = date(‘Y-m-d’);
$hour = date(‘H’,strtotime(‘-24 hours’));

$sql = “select `hour`, count from spam_count where day = ‘$today’ or (day = ‘$day’ and hour > $hour)”;
$data = $wpdb->get_results($sql ,ARRAY_A);

$month = date(‘F’);

// create the graph
$Graph =& Image_Graph::factory(‘graph’, array(300, 300));
// add a TrueType font
//$Font =& $Graph->addNew(’font’, ‘Verdana’);
$Font =& $Graph->addNew(‘font’, ‘/usr/share/fonts/dejavu/DejaVuSans.ttf’);
// set the font size to 11 pixels
$Font->setSize(8);

$Graph->setFont($Font);

$Graph->add(
    Image_Graph::vertical(
        Image_Graph::factory(‘title’, array(“Blog Spams in the Last 24 Hours”, 12)),
        $Plotarea = Image_Graph::factory(‘plotarea’),
            //$Plotarea = Image_Graph::factory(’plotarea’,array(’axis’, ‘axis’)),
        7
    )
);

$colors = array(‘red’,‘green’,‘blue’,‘orange’,‘gray’,‘purple’);

// create the dataset
$Dataset_all =& Image_Graph::factory(‘dataset’);
foreach($data as $row) {
        $Dataset_all->addPoint($row['hour'],$row['count']);
}

$Dataset_all =& Image_Graph::factory(‘dataset’);
foreach($data as $row) {
        $Dataset_all->addPoint($row['hour'],$row['count']);
}

// create the 1st plot as smoothed area chart using the 1st dataset
$Plot_all =& $Plotarea->addNew(‘Image_Graph_Plot_Smoothed_Area’, array(&$Dataset_all));

$Plot_all->setLineColor($colors[5]);
$Plot_all->setFillColor(“$colors[2]@0.2″);
$Plot_all->setTitle(‘24 Spam’);

// format the axis

$Processor =& Image_Graph::factory(‘Image_Graph_DataPreprocessor_Function’, ‘formatTime’);
$AxisX =& $Plotarea->getAxis(IMAGE_GRAPH_AXIS_X);
$AxisX->setDataPreprocessor($Processor);
$AxisX->setLabelInterval(3);

// output the Graph
$Graph->done();

function formatTime($hour) {
        $hour = (int)$hour;
        $m = ‘AM’;
        if ($hour > 12) {
                $hour = $hour-12;
                $m = ‘PM’;
        }
        return “$hour$m”;
}

?>

The code for the graph is a little more complicated then needed since its just a hacked up version of the graphs i make for WebThumb. Anyhow then its just a matter of putting your graph script in the src of an image.


<img src="/graph-spam-last24.php"/>

Oh and you might want to add some caching if your showing the graph all the time since generating pngs is a bit more expensive then generating html.

When Blog Spammers Attack

Friday, December 15th, 2006

You may have noticed that my blog has been running a bit slower these days. I’ve been getting huge load spikes a couple times a day.

Load Graph of Bluga.net for Dec 14-15

Looking at that and my Akismet counter, its seems im getting 3-4000 spam comment submissions a day. And while the server could handle the load if the spammers were polite about it, its much harder to handle spams coming in 500-1000 spam bursts (less then 1 minute).

I’ve added mod_evasive support to apache but it doesn’t look like things will help since so many different ip’s are being used in the spam attacks. There is nothing like being dos’d by spammers.

I may end up having to rewrite wordpress’s comment submission code in order to get enough performance out of it too handle the attacks. Any suggestions would be much appreciated.

Update
I moved my comments page and since serving up 404’s is cheap my load is no longer spiking. Now i just need a script that finds 404’s to the old comments page and add them to my firewall.

New Webthumb feature, Easythumb

Wednesday, November 29th, 2006

Updated
WebThumb added a new feature this week called Easythumb. Like the rest of webthumb its still in beta but it makes adding thumbnails too a site much easier.

Easythumb gives you a simple interface to WebThumb letting people with minimal PHP skills integrate WebThumb into there site. It does have a couple drawbacks, thumbnails are always cached (if someone else requested that same url within 24 hours then you get that thumb instead of making a new request), the output sizes are smaller, and some other options won’t be available.

Easythumb lets you generate a thumbnail using an normal http GET call, letting you put the request right in an img src. Easythumb thumbs are always cached, the default cache is 1 day, you can also use a 7 day and 30 day cache.

If a thumbnail is served from the cache it only use 1/5 of a credit
If the thumbnail is generated it uses 1 credit like normal

Note that currently Easythumb only generates thumbnails of sizes small, medium, and medium2

I have a small example script that shows Easythumbs usage it uses a little JavaScript trick to add a loading message. To use it on your site you just need to register a webthumb account. Copy this sample where you want it and update the parameters.


< ?php
// configuration parameters
$url = ‘http://bluga.net/webthumb’; // make a thumbnail of this url
$apikey = ‘your api key here’;
$userId = 1; // your user id here
$date = gmdate(’Ymd’);
$size = ‘medium’;
$cache = 1;
$messageId = "tmessage1";

$parameters = "user=$userId&url=".urlencode($url)."&hash=".md5($date.$url.$apikey)."&size=$size&cache=$cache";
?>
<html>
<head>
        <title>Easy Thumb Sample</title>

<style type="text/css">
.thumbnail {
        position: relative;
}
.thumbnailMessage {
        position: absolute;
        top: 0;
        left: 0;
        width: 160px;
        height: 120px;
        background: gray;
        text-align: center;
}
</style>
</head>
<body>

<div class="thumbnail">
<img src="http://webthumb.bluga.net/easythumb.php?<?php echo $parameters; ?/>"
        title="Generated Thumbnail" width=160 height=120
        onload="document.getElementById(’< ?php echo $messageId; ?>’).style.display = ‘none’"
>
<div class="thumbnailMessage" id="<?php echo $messageId; ?>">
Your thumbnail is being generated please wait
</div>
</div>

</body>
</html>

jQuery Slides are now available

Wednesday, November 29th, 2006

My slides from last nights azPHP presentation are now available. Feel free to post a comment if you have any questions.

Jquery at AZPhp Tomorrow

Monday, November 27th, 2006

I’ll be giving a talk about Jquery at the azPHP meeting tomorrow. If your in the Phoenix area you should come to the meeting, its at Walt Tv in Tempe at 7pm. azPHP meetings are a great place to meet fellow PHP developers and this month to learn some neat AJAX tricks.

This circle expands additional navigation
You should really buy my AJAX book.
You'll learn not only the technology you need for implementation but also an understanding that will help you get the most from AJAX.
You'll also have my eternal thanks :-)