I am trying to get source code of a web page using simple html dom. I am using this code -
include('simple_html_dom.php');
$html = file_get_html("http://freelancers.net/project");
But it's showing this error:
Warning: file_get_contents(https://twitter.com/BenAffleck): failed to open stream: No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\simple_html_dom.php on line 75
I am sure my code is correct because it will work on a web server but I am trying to run it on localhost (I have Xampp Installed). I don't know why it is not working. I am using proxy server to connect with internet if has something to do with it. I have read some posts on stackoverflow and there are some answers about port blocking but I have no idea how to do that. I am using 127.0.0.1 to navigate to localhost. I am using Windows. Any help?