P
P
pixal2018-07-11 20:01:17
PHP
pixal, 2018-07-11 20:01:17

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

3 answer(s)
G
GavriKos, 2018-07-11
@GavriKos

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.

S
Shirshov Alexander, 2018-07-11
@Keanor

$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 :)

T
ThunderCat, 2018-07-12
@ThunderCat

God, regular season
https://regex101.com/r/8yw0hp/4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question