I have a url: http://domain.tld/123456789abc.html
My goal is to create an embed code like this:
<iframe src="http://domain.tld/embed-123456789abc-620x360.html" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="620" height="360"></iframe>
But instead of gave me this:
<iframe src="http://domain.tld/embed-123456789abc.html-620x360.html" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="620" height="360"></iframe>
Notice the ".html" included above (123456789abc.html-620x360)?. How can create the code without the ".html" from the source url?
This is the code being used.
elseif (substr_count($link,"domain")){
$video_id = explode("/",$link);
if (isset($video_id[count($video_id)-1])){
$video_id = $video_id[count($video_id)-1];
$embed = '<IFRAME SRC="http://domain.tld/embed-'.$video_id.'-'.$width.'x'.$height.'.html" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="'.$width.'" height="'.$height.'"></iframe>';
}
Appreciate the help. Thank you.