I have thousands of URLs that have identifiers that I want to get only from the URL, for example This is my array
Array
(
[0] => http:
[1] => http:
[2] => http:
[3] => http:
)
I want the identifiers from the links above.
f62f2bc536bad
5966fcb2605b9
524aaacbd6614
pbz4sr6elxmo
I have a function parse_url, but it returns me path, which includes all things after the slash (/), for example / file / pbz4sr6elxmo
<?php
foreach($alllinks as $url){
$parse = parse_url($url);
echo $parse['path'];
}
?>
Output
/ pbz4sr6elxmo
/ video / 5966fcb2605b9
/ File / f62f2bc536bad
/ video / 524aaacbd6614
source
share