$response = curl_exec($ch);
preg_match_all('/^Location:(.*)$/mi', $response, $matches);
curl_close($ch);
Using this script, I get the output: http://website.com/632383970568166e82391f.png
And I need to extract the ID, which is abcdef and use it in another call. How can I do that?