So I need a regex that I can use in preg_replace that'll tell me if $string starts with http:// (or https) i.imgur.com/
Any help? I'm not that good with regex heh
so far what I have:
<?php
$url = "httPs";
if (preg_match('#^http#i', $url) === 1) {
// Starts with http (case insensitive).
die('ye');
}
else
{die('nop');}
?>
Aucun commentaire:
Enregistrer un commentaire