Php help!

Hi – I’m having no luck getting an RSS reader to work from my site; apparently there is a restriction on the web server that prevents opening remote URLS from PHP. Is this something I can fix myself, or do I need to contact support…


By default, the Dreamhost PHP installations have allow_url_fopen disabled for security reasons. It is likely that this is what you are trying to use.

Technical support will not change this for you. The proper way to grab content from another site is via cURL, and it is generally fairly simple to modify existing code that uses PHP’s url_fopen, and related, code to function with cURL. There are many tutorials on this on the web, and many thread about it here on these forums, as well as a DH Wki article or two.

Alternately, it is possible to compile your own PHP for use on DH and to allow those functions, though such an action is potentially dangerous from a security standpoint and requires consdierable expertise to accomplish it and do it safely.

Yet another alternative is to use existing code that already works well on DH for such purposes, such as Magpie RSS.