Answer the question
In order to leave comments, you need to log in
How to parse this data in php?
Good evening everyone. I get such data from YouTube pavira.club/sherdes/you.php?v=L98lGPKvR3Q
Now I need to get links from there that look like this https:// ... googlevideo.com/playback?...
Please tell me how can I parse these links from there?
Answer the question
In order to leave comments, you need to log in
With data parsing, there are always three options:
1) We determine what kind of format it is and look for a parser for it
2) We determine what kind of format it is and write our bike for it
3) It’s impossible to determine what kind of format it is, we’re fucking with the structure and the lack of standardization. We analyze, we analyze very much, we write our own parser, depending on what is inside.
In your case, I honestly HZ what kind of mess is this from the data. You can start with a split by & (there is a lot of it) and then look where the data you need lies next.
No one will give you the finished code.
$arr = parse_str('here is your monster string');
And then work with the specific keys of the $arr array, find the desired element and most likely skip it through json_decode (too lazy to check). Write what happens, we will help :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question