KyranRana / cloudflare-bypass

A new and improved PHP library which bypasses the Cloudflare IUAM page using cURL
MIT License
275 stars 98 forks source link

not work with php 5.6 #150

Closed Sarfroz closed 4 years ago

Sarfroz commented 4 years ago

hi , how can we solve this issue ?? Can you make it compatible with PHP 5.6 and what else are the requirements to run this code? I tried on digital ocean centos 7 but it was not working at all.

Sarfroz commented 4 years ago

`Notice: Undefined index: request_header in /var/www/html/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php on line 117

Fatal error: Uncaught TypeError: Argument 1 passed to CloudflareBypass\CFCurlImpl::checkForCorrectHeaders() must be of the type string, null given, called in /var/www/html/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php on line 117 and defined in /var/www/html/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php:203 Stack trace: #0 /var/www/html/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php(117): CloudflareBypass\CFCurlImpl->checkForCorrectHeaders(NULL) #1 /var/www/html/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php(96): CloudflareBypass\CFCurlImpl->bypassIUAMPage(Resource id #14, 'HTTP/1.1 503 Se...', Array, 0, Object(CloudflareBypass\Model\UAMOptions), false) #2 /var/www/html/index.php(56): CloudflareBypass\CFCurlImpl->exec(Resource id #6, Object(CloudflareBypass\Model\UAMOptions)) #3 {main} thrown in /var/www/html/vendor/kyranrana/cloudflare-bypass/src/main/CFCurlImpl.php on line 203`