Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nagavinod424's avatar

Url Scraping like facebook in Laravel 5.3

Hello Guys i am using https://github.com/FriendsOfPHP/Goutte to scrape urls like facebook in laravel 5.3 but my trails are failing i had tried both http and https urls http gives a empty result and htttps gives curl 60 error can anyone help me, i have the following code in my routes.

use Illuminate\Http\Request;
use Goutte\Client;

    $client = new Client();
    $url = $request->url;
    $crawler = $client->request('GET', $url);
    return response()->json($crawler);
0 likes
4 replies
Ibaa Ibrahim's avatar

@nagavinod424 Hello, It's being to much time since you post this issue but I need to ask you something about scraping a facebook profile is it still be able to scrabe the profile like getting the email if it is public I'm using Gooute and its responsing with a data but because of facebook is a dynamic page built with react so the response is not meaningful as much as needed

nagavinod424's avatar

@Ibaa Ibrahim Just understand one thing... the url scraping is not going check the web page at all... when ever you paste a url in any social media sites like facebook they look for meta tags what we define

read this for better understanding different social media try to read different meta tags with og: (open graph) is for facebook

https://developers.facebook.com/docs/sharing/webmasters/

twitter will have twitter: meta tags

Please or to participate in this conversation.