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.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

  1. Smarty Modifier dan Fungsi Itu Apa sihhh…?

About The Author

admin

Seorang penelusur, pembongkar dan peramu informasi ala mbah google dot com

Leave a Reply