Archive for November, 2006

APIs in PHP

Posted on November 6th, 2006 in PHP | No Comments »

I've been wanting to sink my teeth into something juicy for a while now. Since I have been working heavily with various web APIs recently (Yahoo Web Services, Google APIs, etc) I figured that it was about time I got with the spirit of open data access.

Now, I like to dip my feet in gently to new projects so am going to be working with something small (just a few methods) in PHP (why not?) by creating yet another URL shortening website. I'm not expecting it to be a success more just something that I can say, "well, I made this." Where does the API fit into this? Well, the site itself will be running off of a REST-based API that I will create and will allow anyone else to access the same resources (to make their own url shortener?) through simple REST requests and responses.

I'll get into details in later posts probably, this really is just a "hey, I'm doing this" style of post. Before that, I might give some quick and easy examples of consuming popular web services (with PHP), just to get the ball rolling.

Custom Cursors in CSS

Posted on November 6th, 2006 in CSS | 2 Comments »

Well, on one of the forums that I visit regularly someone posted asking if it was possible to change the default mouse cursor into a magnifying glass -- to indicate that the user can zoom in on the image, in this particular case -- rather than whatever the browser normally uses.

It is possible using standard CSS but the results are somewhat limited: I only got it to work in Firefox and IE on my computer (Windows). But since those browsers account for probably 90% of visitors, and the change is really only a handy little cosmetic one to aid visitors, it's worth sharing how to do it!

It all simply comes down to the cursor property in CSS.

What to use:

img.zoomable { cursor: url(magnify.cur), pointer; }

Example:
Magnifying glass cursor over image

If you want to download the special magnify.cur file that I created for this example, then feel free: download magnify.cur

I hope that helped the person on the forums, even just a little bit.