Background

I'm attempting to have an feed using php right into a html document

Code

<?php

include ("feed url")

?>

I have tried personally ssl command to effectively add the include tag within the html file such as this

<!--#include virtual="rssfeed.php" -->

which works fine after editing htaccess file. Now issue is because during my php im using include ("feed url") I get this error:

Warning: include() [function.include]: URL file-access is disabled in the server configuration in path/rssfeed.php online 2

Warning: include(feed url) [function.include]: unsuccessful to spread out stream: no appropriate wrapper might be present in path/rssfeed.php online 2

Now items to note I've attempted setting php_value allow_url_fopen 1 but no luck because the files are held on 3rd party hosting server so I don't have a lot of access so that they have blocked me from turning allow_url_fopen to ON for apparent reasons. So My real question is how do you approch this issue ? Any directions is going to be greatly apperciated.

Thanks everybody for reading through.

Your server is set up in a way that you simply cannot include from the remote location. This really is common in hosting that is shared conditions in lowering server load and lower the potential of malicious code being accidentally performed.

However, basically understand you right, you can not only range from the Feed while using include() construct anyway, since it is not valid PHP code - include() needs the road to be considered a valid PHP source code file. Your work, in case your server permitted you to get it done, would lead to either useless output or perhaps a parse error.

You have to connect with the Feed (e.g. using [cURL](http://uk2.php.internet/manual/en/book.curl.php or fsockopen() with respect to the degree of control you would like within the request towards the remote site) and parse the feed data to help you output inside a sensible format.

include "http://..." is an awful idea since the items in http://... are examined as PHP code which opens your website available to attacks if a person can inject PHP code within the response of this Feed.

Use curl if you wish to display data from another site. In the PHP Manual example:

<?php

// produce a new cURL resource

$ch = curl_init()

// set URL along with other appropriate options

curl_setopt($ch, CURLOPT_URL, "http://world wide web.example.com/")

curl_setopt($ch, CURLOPT_HEADER, )

// grab URL and pass it towards the browser

curl_professional($ch)

// close cURL resource, and release system assets

curl_close($ch)

?>