you'll just need the cookies and headers from a session that has made it though the cloudlflare redirect. Some configurations of Selenium WebDriver (package to allow programmatic control of a browser) will work with this, then once you have the cookes and any headers you should be good until cookie expirys/header changes. Only way this becomes a pain in the ass is if it starts asking to complete a captcha before redirect, but you can integrate a captcha api to solve those if really needed as tabestmaker says.
Selenium does seem to have PHP bindings, although not sure what they are like to work with as i've used it with python only.