Adding REST API functionality to an existing algorithm written in PHP and embedding it on a (free) server.

Closed job
no avatar
bartech
Employer
1 deal
Job category:
Desktop/web applications
Expected budget:

Negotiable

Published:
Finished

Job description

I already have an existing code written in PHP that easily calculates points for a match score hit depending on the number of players. I am attaching the PHP file for reference.

Currently, the code takes a text file (below is an example of the file structure), calculates the points and enters the scores into another text file (also an example below).

What it needs is to add a REST API funtionality, specifically just one POST action.

1) I send a query in the form of JSON with the bets

2) I get as a response the points for each bet as also JSON

Example structure of the betting file

7 (number of players)

3 2 (match score)

G1 2 2

G2 2 3

G3 3 2

G4 2 0

G5 3 3

G6 2 1

G7 3 2

Results after going through the algorithm

G1 1.5

G2 0

G3 13.5

G4 6

G5 1.5

G6 7

G7 13.5

I think for an experienced programmer a simple matter. Cloud by recommendation. It is hard for me to determine the budget, but in my experience it is a few hours of work - if it is not, I am open to suggestions.

The matter is quite urgent!

Required functions:

Submitted offers 2

Add your offer or ask the client for more details