Welcome aboard! We are happy you are here and wish you good net-raft!
<?php
$url_og = "https://net-raft.com";
$page_content = file_get_contents("$url_og");
$doc = new DOMDocument();
$doc->loadHTML($page_content);
$meta_val = null;
foreach($doc->getElementsByTagName('meta') as $meta) {
if($meta->getAttribute('property')=='og:image'){
$meta_value = $meta->getAttribute('content');
echo $meta_value;
}
}
?>
The most helpful PHP solutions
detect browser phpPHP Click to see more ... 4.6K 408