Filtering url id id

1

I would like to know how can I get the specific id of urls google example let's say I have this url link the id of this url that is in the example 0B-EMwJDMPmDIUG1UeHR6ZG9Rc0E .

    
asked by anonymous 08.08.2015 / 05:30

1 answer

1

You can use parse_url and parse_str .

<?php

$url = "https://docs.google.com/uc?id=0B-EMwJDMPmDIUG1UeHR6ZG9Rc0E&export=download";
$tmp = parse_url($url, PHP_URL_QUERY);
parse_str($tmp, $parametros);

print($parametros["id"]);

?>

Example: link

    
08.08.2015 / 09:04