fix regular expression error
This commit is contained in:
HKLCF
2018-05-19 23:20:05 +08:00
committed by GitHub
parent 34a8cf5ea4
commit ba535deec0

View File

@@ -13,7 +13,7 @@ if(empty($url)) {
$url = 'http://www.mediafire.com/file/8x5ol3r8wpb477a/small.mp4'; // sample link
}
if($url) {
preg_match('@^(?:http?://)?([^/]+)@i', $url, $matches);
preg_match('@^(?:http.?://)?([^/]+)@i', $url, $matches);
$host = $matches[1];
if($host != $support_domain) {
echo 'Please input a valid mediafire url.';