Advertisement
colmulhall

Untitled

Apr 3rd, 2014
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. // Replace unreadable characters from the description (e.g.  )http://stats.buysellads.com/click.go?z=1293852&b=4548767&g=&s=&sw=1280&sh=800&br=safari,537.75,mac&r=0.3525264321360737&link=https://www.vultr.com
  2. $string = utf8_decode($full_event_desc);
  3. $string = iconv("UTF-8", "ISO-8859-1//IGNORE", $string);    // ignore non UTF-8 characters
  4. $temp = utf8_decode('Â');
  5. $string = str_replace($temp, '', $string);   // replace  character with a space
  6. $string = preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', ' ', $string);  // regular expression
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement