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 with curl #198

Closed
wants to merge 3 commits into from

Conversation

NikosPapakonstantinou
Copy link

For security reasons & faster responses.


$inbuf = file_get_contents($this->host, false, $context);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't that be:
curl_setopt($ch, CURLOPT_URL, $this->host);

@SadieCat
Copy link
Member

Hey, sorry it took so long to get around to this.

This file aims to be an example for how to use XMLRPC. cURL is an optional PHP extension that may not necessarily be available unlike file_get_contents so its not ideal for this purpose. Sorry.

@SadieCat SadieCat closed this Jan 10, 2022
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

Successfully merging this pull request may close these issues.

None yet

4 participants