Is it the following code that determines whether the url entered is Googlemap iframe?
preg_match("/<iframe src=\"https:\/\/www\.google\.com\/map(.*?)<\/iframe>/s", $map, $is_map);
if(!isset($is_map[1])){
echo"Map embedded code is incorrect.";
} else {
echo "This is the correct map.";
}
I have created a system to enter url for the map, so I want to eliminate it when I enter code other than the map.
php html5 regular-expression
preg_match("/<iframe src=\"https:\/\/www\.google\.com\/map(.*?)<\/iframe>/s", $map, $is_map);
© 2024 OneMinuteCode. All rights reserved.