TEENFRONT Posted March 9, 2009 Share Posted March 9, 2009 Hi I own a flash multiplayer game site, and we have a flash chat powered by php. Im getting alod of traffic from arab nations which isnt a problem but the arabic language seems to lag the chat with crtain characters that there using. I want to block everything thats NOT english text... is thats possible? Link to comment https://forums.phpfreaks.com/topic/148682-stopping-all-non-english-characters/ Share on other sites More sharing options...
TEENFRONT Posted March 10, 2009 Author Share Posted March 10, 2009 is this possible? Im just looking for a function that returns true or false if its english text or not. cheers Link to comment https://forums.phpfreaks.com/topic/148682-stopping-all-non-english-characters/#findComment-781699 Share on other sites More sharing options...
xylex Posted March 11, 2009 Share Posted March 11, 2009 No need for regex, php gives you filter functions for this. http://us.php.net/manual/en/function.filter-var.php filter_var($string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); Link to comment https://forums.phpfreaks.com/topic/148682-stopping-all-non-english-characters/#findComment-781743 Share on other sites More sharing options...
effigy Posted March 11, 2009 Share Posted March 11, 2009 What encoding are you using? Link to comment https://forums.phpfreaks.com/topic/148682-stopping-all-non-english-characters/#findComment-782074 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.