Skip to content

Instantly share code, notes, and snippets.

PHP script that uses Unity Publisher API for PHP (https://github.com/LostPolygon/Unity-Publisher-API-PHP) to retrieve new asset sales, put them into a MySQL database, and notify about the sales via e-mail.
Data is inserted into `sales` table, which can be created from sales_table.sql file. Just set up the credentials and put this script on cron with whatever interval you want. Delete the email notification part if you don't need it.
Requires PHP 5.4, php_json extension, and remote socket access.
Also, I know it's ugly, but it does the job and served me well for over a year.