Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace file_get_contents by cUrl #4

Open
dumanhaydar opened this issue Aug 29, 2018 · 1 comment
Open

Replace file_get_contents by cUrl #4

dumanhaydar opened this issue Aug 29, 2018 · 1 comment

Comments

@dumanhaydar
Copy link

dumanhaydar commented Aug 29, 2018

I replace file_get_contents with cUrl

@dumanhaydar
Copy link
Author

dumanhaydar commented Aug 29, 2018

$wsdl = file_get_contents($url );
with

			$ch = curl_init();
			$timeout = 5;
			curl_setopt($ch, CURLOPT_URL, $url);
			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
			curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
			$wsdl = curl_exec($ch);
			curl_close($ch);

in classes\DpdClient.php

$source = file_get_contents($url);
with

        $ch = curl_init();
        $timeout = 5;
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
        $source = curl_exec($ch);
        curl_close($ch);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant