title: why am getting error with MongoClient()?
body: <p>Actually am new to this mongodb.</p>
  
  <p>Here mongo was visible on localhost and phpinfo(). for</p>
  
  <p><code>http://127.0.0.1:27017/</code></p>
  
  <p>also getting like "It looks like you are trying to access MongoDB over HTTP on the native driver port." .
  From command prompt also am able to run mongo.</p>
  
  <p>But still am getting an error while using Mongo()/MongoClient from program. </p>
  
  <pre><code>Deprecated: main(): The Mongo class is deprecated, please use the MongoClient class in C:\wamp\www\mongo\new.php on line 2
  
  Fatal error: Uncaught exception 'MongoConnectionException' with message ' in C:\wamp\www\mongo\new.php on line 4
  ( ! ) MongoConnectionException: Failed to connect to: example.com:27017: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\wamp\www\mongo\new.php on line 4
  </code></pre>
  
  <p>How i can solve these issues?</p>