Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

file_get_contents() function blocked at php.ini level #62

Closed
vinhtvu2 opened this issue Dec 13, 2016 · 5 comments
Closed

file_get_contents() function blocked at php.ini level #62

vinhtvu2 opened this issue Dec 13, 2016 · 5 comments

Comments

@vinhtvu2
Copy link

We recently blocked set allow_url_fopen = 0 in php settings for security reason.

Is there anyway we can request for all the file_get_contents() functions to be converted to using curl?
Either:
http://snipplr.com/view/4084/curl-replacement-for-filegetcontents/
Or
http://snipplr.com/view/51161/basic-curl-wrapper-function-for-php/

which include a default user-agent and option for setting user agent.

Thanks.

@vinhtvu2
Copy link
Author

@GrahamCampbell
Copy link
Contributor

This function is used for reading files on the disk, not HTTP requests. I don't think cURL can even be used for that?

@GrahamCampbell
Copy link
Contributor

Ah, I see your example. Seems very unconventional. Surely people are more likely to have mb-string installed than curl?

@GrahamCampbell
Copy link
Contributor

It doesn't make sense to me to another extension dependency, when one of the aims of this package is to mitigate the absence of the mb-string extension?

@nicolas-grekas
Copy link
Contributor

Old and edgy.

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

No branches or pull requests

3 participants