// target media url
$media_url = 'https://www.instagram.com/p/Bf5W-R_l9Sc/';
// api call url
$ig_api_call = "https://api.instagram.com/oembed/?callback=&url={$media_url}";
// get file contents
$response = file_get_contents($ig_api_call);
// if there is valid response
if ($response){
// decode json content
$content = json_decode($response);
// if is set media id and it is not empty
if (isset($content->media_id) && !empty($content->media_id)){
echo $content->media_id;
}
//print_r($content);
}
Artık çalışmıyor yardımcı olabilecek varmı ? :norespond: