$site = file_get_contents("https://www.youtube.com/@PewDiePie");
I’m pulling data from youtube with file_get_contents
. but since the language setting and IP address of my hosting service are Turkey, when I use file_get_contents
, a Turkish page appears.
How can I view the content in English?
2
Answers
This solved my problem:
Just use
hl
in your URL’s query string.In below example I used
hl=en
for English language!The
persist_hl=1
is for preserving language after redirection!