Đang Thực Hiện

324982 Convert Java to PHP

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:

5 classes

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&location1="+location1 + "&location2=" + location2 + "&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);


Please provide a time estimate in your quote.

Kĩ năng: Bất kì công việc gì, Java, PHP

Xem nhiều hơn: convert java php, string matching in c, string library in c, string library c, Restful API java, matching string, java to c convert, java distance, convert java to c, convert java code to c, string matching, restful, php to java, php core, java to c, java php, java libraries, java core, java api, java and php

Về Bên Thuê:
( 2 nhận xét ) Round Rock, United States

ID dự án: #2070789