mardi 30 mai 2017

Laravel 5 Using guzzle to scrape data

I am trying to scrape data from http://ift.tt/2riWRk3 and insert it into my page.

This is my first time doing it and I got completely stuck:

Route::

Route::get('hello', 'GuzzleController@guzzle');

Controller::

function guzzle(){
$client = new Client();
$results = $client->get('http://ift.tt/2riWRk3');
return $response->getBody();
}

What am I missing here?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire