how to clean request string in php Get link Facebook X Pinterest Email Other Apps August 20, 2012 function cleanit($text) { return htmlentities(strip_tags(stripslashes($text)), ENT_COMPAT, “UTF-8″); } Get link Facebook X Pinterest Email Other Apps Comments
How to count duplicate characters from a sentence in java August 20, 2012 Output : DuplicateCharacter .java package com.swain.cell; import java.util.HashMap; public class DuplicateCharacter { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String str = "Character duplicate word example java" ; char ch1[]=str.toCharArray(); HashMap<Character,Integer> hm= new HashMap<Character,Integer>(); for ( int i=0; i<ch1. length ; i++) { char ch=ch1[i]; ... Read more
how to check ban-word user in put using php August 20, 2012 function banned_words_chk($phrase) { global $conn, $config; $query = “SELECT word from bans_words”; $executequery = $conn->Execute($query); $bwords = $executequery->getarray(); $found = 0; $words = explode(” “, $phrase); foreach($words as $word) { foreach($bwords as $bword) { if($word == $bword[0]) { $found++; } else { $pos2 = strpos($word, $bword[0]); if($pos2 !== false) { $found++; } } } } if($found > 0) { return true; } else { return false; } } Read more
how to check ban-word user in put using php August 31, 2012 function banned_words_chk($phrase) { global $conn, $config; $query = "SELECT word from bans_words"; $executequery = $conn->Execute($query); $bwords = $executequery->getarray(); $found = 0; $words = explode(" ", $phrase); foreach($words as $word) { foreach($bwords as $bword) { if($word == $bword[0]) { $found++; } else { $pos2 = strpos($word, $bword[0]); if($pos2 !== false) { $found++; } } } } if($found > 0) { return true; } else { return false; } } ------------------------------------------------------------- if you helpful my code please donate some few amount to developing and free to post. ------------------------------------------------------------- Read more
Comments
Post a Comment