YouTube - Encrypted cookie string
- by Robertof
Hello!
I'm new to Stack Overflow.
I'm building a YouTube Downloader in PHP. But YouTube have some IP-checks.
Because the PHP file is on a remote server, the ip of the server != the ip of the user and the video-download fails.
So, maybe I've found a solution. YouTube sends a cookie with an encrypted string, which is the user IP. I need to know the encrypted-string algorithm and know how to crypt a string with this.
Here there is the string: nQ0CrJmASJk .
It could be base64, but when I try to decode it with base64_decode, it gives me strange characters.
You could check the cookie by requesting the main page of youtube, and check the headers "Set-Cookie". You will found a cookie with the name "VISITOR_INFO1_LIVE". Here there is the encrypyed string.
Anyone knows what is the algorithm? Thanks.
PS: sorry for my bad english.
Cheers,
Roberto.