WordPress.org

Ready to get started?Download WordPress

Forums

SSL & blocking outbound requests (1 post)

  1. MatthewRuddy
    Member
    Posted 2 years ago #

    Hi everyone. So I've written a plugin that on a few occasions uses the file_get_contents function to get a files contents.

    Long story short, a user using the plugin with SSL enabled and using HTTPS URL's notified me of an issue he was having. All the plugins outbound requests were being blocked and he had to allow the Host access to do so via his cPanel.

    His site was outputting 'failed to access stream: permission denied' messages. The links being opened were HTTPS ones, not HTTP. He had 'allow_fopen_url' enabled in his hosting because the function I use tries cURL instead if the user doesn't. Would cURL also be blocked?

    What I'm wondering is how can I avoid situations like this? Is there any checks I can do to avoid having to have the Host allowed with users like this, or notify them beforehand that the Host is being blocked so they can rectify it?

    As much as I know about PHP I know nothing about SSL and HTTPS. Never used it. So a bit stumped.

Topic Closed

This topic has been closed to new replies.

About this Topic