Simple HTML Dom PHP - No connection could be made because the target machine actively refused it
<p>I am trying to get source code of a web page using simple html dom. I am using this code -</p>

<pre><code>include('simple_html_dom.php');

$html = file_get_html("http://freelancers.net/project");
</code></pre>

<p>But it's showing this <strong>error:</strong></p>

<blockquote>
  <p>Warning: file_get_contents(<a href="https://twitter.com/BenAffleck" rel="nofollow noreferrer">https://twitter.com/BenAffleck</a>): 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</p>
</blockquote>

<p>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 <strong>127.0.0.1</strong> to navigate to localhost. I am using Windows.
Any help?</p>