19Upload an image using Java + PHP

Upload an image using Java + PHP

Whilst working on a recent project I needed a way of transferring images (screenshots to be specific) from the client machine to a web server hosted in the cloud. My choice of platform was Java on the client machine and then PHP on the server side to recieve and process the upload.

So basically I needed to upload an image to a web server using Java and PHP. Reading and writing simple data to and from a web server with Java is pretty easy really but when it comes to transferring files things get that little bit tougher. This is because when uploading files the content type of the HTTP request changes from plain text to multipart making it trickier. You could either write a whole load of extra code to deal with this or you could simply send the data over as plain text and then just let PHP deal with it. Here’s how it’s done.

25Isometric PHP

Isometric PHP

GD and PHP make a great couple and when used properly they can produce some fantastic results. Purely as an experiment to see how well it would work I’ve been playing with some isometric graphics in PHP. It’s not much but I’ve just created the following isometric scene.

Isometric PHP

It’s quite simple really; a grid made up of diamonds pieced together to form the grid lines. Then, another simple isometric box shape placed somewhere in the middle. With this approach each grid section can be individually changed – this means that if enough time was spent it would be possible (and not all that difficult) to create a PHP + GD script which would generate random landscapes or cities. I quite like that idea, if only I had the time.

22Learning Objective-C

Learning Objective-C

Objective-C iPhone developmentaThough I would never say that I have mastered a particular language I think I can safely say that I am fairly confident when it comes to XHTML, CSS, JavaScript and PHP. I’m also relatively confident with developing on Java. So what’s next?

A few months ago I bought an Intel Mac Mini with the sole intention of developing applications for the iPhone. This meant I’d not only have to learn the Objective-C language but would also have to come to grips with Mac OSX – an OS which I’m not at all used to. After putting it off for a little while I’ve finally decided to take the leap and have begun the learning process.

To help this learning process I’ll try to document what particular things I’ve been looking at as I progress through what seems to be a very steep learning curve. Therefore from time to time I’ll post the occasional blog post explaining some of the things I’ve learnt with regards to Objective-C and iPhone application development. As well as being a great way for me to remember what I’ve been doing it may also be of some use to anyone else looking to take on this challenge.

Wish me luck!