Athlon1600/php-proxy-app

Youtube Mobile

Opened this issue · 1 comments

Hello. i see there is an issue with mobile version of youtube running through the proxy. I managed to fix using the user agent header as described in another issue a year ago. Problem is this is quite ugly on mobile forcing a desktop view. is there any way to load the mobile version through this proxy?
kind regards

Create your own plugin that looks something like this:
https://github.com/Athlon1600/php-proxy-app/blob/master/plugins/TestPlugin.php

and inside the "onBeforeRequest" method, add a line like this:

$event['request']->headers->set('user-agent', 'Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25');

That way youtube will think that the connection is coming from someone with a phone.