I have a PHP script that returns links on a webpage. I am getting 500 internal error and this is what my server logs say. I let my friend try the same code on his server and it seems to run correctly. Can someone help me debug my problem? The warning says something about the wrapper is disabled. I checked line 1081 but I do not see allow_url_fopen.
PHP Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /hermes/bosweb/web066/b669/ipg.streamversetv/simple_html_dom.php on line 1081
PHP Warning: file_get_contents(http://www.dota2lounge.com/): failed to open stream: no suitable wrapper could be found in /hermes/bosweb/web066/b669/ipg.streamversetv/simple_html_dom.php on line 1081
PHP Fatal error: Call to a member function find() on a non-object in /hermes/bosweb/web066/b669/ipg.streamversetv/sim
<?php
include_once('simple_html_dom.php');
$target_url = 'http://www.dota2lounge.com/';
$html = new simple_html_dom();
$html->load_file($target_url);
foreach($html->find(a) as $link){
echo $link->href.'<br />';
}
?>
file_get_contents()with remote files.