Fungsi PHP untuk Menghapus http:// dan www Otomatis di Domain
Jika anda sedang mencari fungsi php regular expression untuk menghapus string http:// atau www maka anda bisa gunakan script php berikut ini
Menghapus String http:// https:// ftp://
$stripedstr = preg_replace(';\b((ftp|https?)://)+?\b;', '', $string);
Menghapus String http:// https:// ftp:// dan www
$stripedstr = preg_replace(';\b((ftp|https?)://|www3?\.).+?\b;', ' ', $string);
Selamat mencoba fungsi php tersebut diatas.
December 24, 2011
|
Posted by admin
Categories: