FriendsOfPHP / Goutte

Goutte, a simple PHP Web Scraper
MIT License
9.26k stars 1.01k forks source link

class not found #299

Open Mahdi-Ba opened 7 years ago

Mahdi-Ba commented 7 years ago

i created php file and write this code

<?php
require '../vendor/autoload.php';
require 'Client.php';
use Goutte\Client;
$client = new Client();
$crawler = $client->request('GET', 'https://www.symfony.com/blog/');
var_dump($crawler);
?>

when run code I get this error

   PHP Fatal error:  Class 'Symfony\Component\BrowserKit\Client' not found in /home/mbahari/Documents/crawler/Goutte/Goutte/Client.php on line 31
stof commented 7 years ago

have you run Composer to install the dependencies ?