Advertisement
Guest User

Untitled

a guest
Aug 6th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  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) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement