Embed
Embed copied to clipboard
Not working on certain website
Hello, I love this tool, unfortunately it's not working for exemple on this web site : https://www.udemy.com/
I read somewhere that : The fix is to add the user-agent in the request headers.
Hope it can help
Cheers
Hi @vtibo
Change the following line of code in your /Embed/demo/index.php file:
CHANGE $dispatcher = new Embed\Http\CurlDispatcher(); to $dispatcher = new Embed\Http\CurlDispatcher([ CURLOPT_USERAGENT => 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22', ]);
And you're done! You can see working example for that https://www.udemy.com/ site here
Hope it helps - Cheers