Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:08:24+00:00 2026-06-04T04:08:24+00:00

I am trying to make a HTTP Request from one of my controller to

  • 0

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 tried :

$r = new Request();
$r->create('http://www.google.com', 'GET');

return $this->render(...mytemplate..., array('name' => $r->getContent());

My template is simply printing the variable “name”.
Now when I do that, nothing is returned. It seems to me that the request is never sent, which is why nothing is returned.

My question is : how do I send the request and get the content of the response?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:08:25+00:00Added an answer on June 4, 2026 at 4:08 am

    EDIT: I made a GremoBuzzBundle for Buzz browser. It’s similar to SensioBuzzBundle but it has some nice configuration options.

    I would suggest to use Buzz browser and dependency injection. Buzz is a wrapper around cURL or file_get_contents. Edit your deps file adding these lines:

    [Buzz]
        git=https://github.com/kriswallsmith/Buzz.git
        target=/buzz
    

    Then install vendors to actually download the library:

    php bin/vendors install
    

    Then add two services (src/YourCompany/YourBundle/Resources/config/services.yml):

    # cURL client for Buzz
    buzz.client.curl:
      class:  Buzz\Client\Curl
      public: false
      calls:
        - [setVerifyPeer, [false]]
    
    # Buzz browser
    buzz.browser:
      class:     Buzz\Browser
      arguments: ['@buzz.client.curl']
    

    The first service is the client (i prefer cURL over file_get_contents), the latter is the browser itself. The last step is to add one line of code in the autoloader (app/autoload.php):

    $loader->registerNamespaces(array(
        'Buzz' => __DIR__.'/../vendor/buzz/lib',
    ));
    

    Then you can get the service and user the browser in your controller code:

    $browser = $this->get('buzz.browser');
    $response = $browser->get('http://www.google.com');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to connect with google via oauth V2 I make http request
I'm trying to make a simple HTTP post a endpoint with ONLY url arguments.
I'm trying to take the android-wheel from http://code.google.com/p/android-wheel/ and make it display horizontally. My
I am trying to make HTTP Requests from Delphi using the WinInet functions. So
I am trying to make a cross domain HTTP request to WCF service (that
From within my .aspx page I am trying to make a request to an
I am trying to retrieve a web page from the following url: http://www.medicare.gov/find-a-doctor/provider-results.aspx?searchtype=OHP&specgrpids=922&loc=43615&pref=No&gender=Unknown&dist=25&lat=41.65603&lng=-83.66676 It
I'm trying to make the url into http://127.0.0.1/dev/blog/welcome but when I type that it
The problem I am trying to make a generic http module in asp.net C#
I'm trying to make use of Vexflow ( http://vexflow.com/ ) on the Android. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.