This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 6th, 2013  |  syntax: None  |  size: 0.44 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $link = 'https://google.com';
  2.  
  3. $unacceptables = array('https:','.doc','.pdf', '.jpg', '.jpeg', '.gif', '.bmp', '.png');
  4.  
  5. foreach ($unacceptables as $unacceptable)
  6. {
  7.         if (strpos($link, $unacceptable) === true) {
  8.  
  9.             echo 'Unacceptable Found<br />';
  10.  
  11.         }
  12.          else {
  13.  
  14.             echo 'Acceptable!<br />';
  15.  
  16.         }
  17. }
  18.        
  19. // ...
  20. if (strpos($link, $unacceptable) !== false) {
  21.        
  22. if (strpos($link, $unacceptable) !== false) {
clone this paste RAW Paste Data