Tuesday, March 13, 2012

OpenData and the OpenPhoto Project -- postscript

I attended the PHP Meetup on March 8 entitled "Open Data and The Open Photo Project", founded and run by Jaisen Mathai.   It was very informative and also inspiring, since it is a project to empower users to take control of their own data.

One of the points that Jaisen made that really was important for me was that our photos now are being stored on-line at commercial sites that can later go out of business -- for example yahoo photos, geocities, and a few others.

Once these sites go down, unless you do something to retrieve the images, your photos would be gone forever.

Wednesday, March 7, 2012

OpenPhoto Tomorow night...

So many meetups now.  I'm planning on going to the OpenPhoto talk for the PHP Meetup group tomorrow evening.  It should be very interesting.   Check back tomorrow evening.

Tuesday, March 6, 2012

Image manipulation w/ PHP and the GD library

Here's a great article about how you can use PHP and the GD library to manipulate images.  Although it's an old article, all the techniques still apply; I've used all these techniques on a number of projects.

http://www.techrepublic.com/article/10-tips-for-php-scripts-create-and-manipulate-images/5077724
(written by Julie Meloni, dated 2/6/2001)

For example, if you wanted to make a (35x35 thumbnail) from a full sized image, here's a sample code snippet from the main article:


<? /* send a header so that the browser knows the content-type of the file */
header("Content-type: image/png");

/* set up variables to hold the height and width of your new image */
$newWidth = 35;
$newHeight = 35;

/* create a blank, new image of the given new height and width */
$newImg = ImageCreate($newWidth,$newHeight);

/* get the data from the original, large image */
$origImg = ImageCreateFromPNG("test.png");

/* copy the resized image. Use the ImageSX() and ImageSY functions to get the x and y sizes of the orginal image. */
ImageCopyResized($newImg,$origImg,0,0,0,0,$newWidth,$newHeight,ImageSX($origImg),ImageSY($origImg));

/* create final image and free up the memory */
ImagePNG($newImg);
ImageDestroy($newImg); 


?>  


Monday, March 5, 2012

PHP/Java Bridge

These days I primarily build applications in Java, but there are times that I need to access PHP scripts, and if you work in Java, one of the best ways to integrate PHP into your Java environment (and vise versa if you are primarily working in PHP) is to use a very powerful utility called the PHP/Java Bridge.

http://php-java-bridge.sourceforge.net/pjb/how_it_works.php 

With the PHP/Java bridge you can connect to a Java VM from within a PHP application.  Conversely, you can call PHP from within a jsp page.

According to the bridge documentation, connecting to the JVM using the PHP/Java bridge is 50 times faster than using a local RPC/SOAP request, and requires no additional components.

A handy and easy to use application for administering databases is the well known PhpMyAdmin, and I've used the PHP/Java bridge to connect to this tool from a jsp servlet.

Saturday, March 3, 2012

Great resources for finding PHP work

I get a lot of work primarily through referrals, but surprising (for me anyway) one of the best ways for me to find new work is by using craigslist.org

There are companies looing for both full-time and contract developers with a PHP background (also hot these days are Ruby on Rails and Java positions), but I can always find a lot of companies looking for PHP developers either for full-time or contract work.

You do have to do a bit of searching -- I look at "Internet Engineers" for full time positions and "Gigs" for part-time positions.

In addition to Craigslist, a new service that I have used fairly recently is startupers.com

If you use LinkedIn, and you consulting or need free-lance work, here is one resource you can use:

http://www.linkedin.com/company/freelance-php-developer.

I have not personally used THIS particular resource, but it's good to know what companies are looking for.

Monday, February 27, 2012

OpenPhoto, Part 1

Openphoto is a very handy tool and lets you put all your photos in one place on the web.  It is also Open Source (meaning you can set up your own fully functioning photo site on your server, unlike services like Flikr or PhotoBucket.

I successfully created an account w/ openphoto.me and here it is :

http://andrewgstanton.openphoto.me/

The next step would be to set up openphoto server on an EC2 or Rackspace instance...

Stay tuned.  I was just scratching the surface here...

Sunday, February 26, 2012

A little PHP History

It's hard to believe that PHP is almost 20 years old.  According to an article in here (on Wikipedia), it was started in 1994 by Rasmus Lerdorf a Danish/Canadian programmer, and has grown to be one of the most popular development platforms for building web pages today.  Lerdorf originally developed PHP out of a set of Perl scripts and later C binaries.

Today it powers billion dollar companies, including Digg, Facebook, and of course Wikipedia.