I am trying to make a HTTP Request from one of my controller to contact another URL, the goal being to contact another URL, and to simply print the HTML answer in my page. I tri
Apparently, you can use Symfony's built-in HTTP client. See: http://api.symfony.com/2.0/Symfony/Component/HttpKernel.html
The following is a very crude codebase, using Silex (built on top of Symfony). It simply instantiates a new HTTP client.
?>
You also have a detailed example of a HTTP client for Symfony2 as part of the unit testing documentation. See: http://symfony.com/doc/current/book/testing.html
BUT (edit) these clients are local to your app. The concepts illustrated here are better implemented with the BrowserKit component of Symfony2. A headless browser within Symfony.
Better even, use Goutte for requests to external websites. See https://github.com/FriendsOfPHP/Goutte for details.