just a port to PHP for the project python-scrapyd-api(https://github.com/djm/python-scrapyd-api)