This is a simple php project that filters a list of offers fetched from an api link
This project can be run either as a web interface or as a CLI script
To run the CLI script, simply call the run.php file as stated in the assignment documentation
php .\run.php count_by_offer_id 123 OR php .\run.php count_by_price_range 12 300
Before running the above scripts please make sure to run the following script in an another terminal to serve the web api
php .\run.php web
Simply run the below command and navigate to 127.0.0.1 in your browser
php .\run.php web
Each request to "getOffer.php" & "run.php" is logged in the logs folder according to the day date and -cli postfix if it was done by the CLI
run ./test.php to test multiple cases of the cli script, and the results will appear in the log file