I have some quick and easy work in PHP I need done. I've written a few Java classes for a library, and I need them converted into PHP for a matching PHP library. I'm not familiar enough with PHP to do it easily.
Here's the details of the work:
3 of these classes are straighforward JavaBeans with only getter/setter methods
1 class is a utility class with 6 methods, 4 of which are nearly identical (they return an int, double, long, etc.)
1 class contains all the main functionality (280 lines of code)
- There's a main() function in the main class which contains test cases that can be used to ensure the work is correct.
- The work should be done using OO methods
- The code should be written using PHP 5
- The code should be written without requiring any extra libraries or modules (should only use core PHP methods)
The code is very straightforward, and queries a RESTful website with arguments, and then parses the results. So, it's basically just a wrapper for HTTP requests. Here's an example of one function:
public int getDistance(String location1, String location2) throws Exception
String query = WEB_SITE + QUERY_ZIP + "?type=distance&amp;amp;location1="+location1 + "&amp;amp;location2=" + location2 + "&amp;amp;API=" + apiKey;
String response = [url removed, login to view](query);
String distance = [url removed, login to view](response, "distance");
return [url removed, login to view](distance);
I will post the link to an old version of the Java code for you to examine in the PMB. The newest version is nearly identical with only a few bug fixes. I will send the newest version to the winning bid.