Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. function fix($splitted, $char) {
  3. $splitted = explode($char, $splitted);
  4.  
  5. foreach ($splitted as $i => $item) {
  6. if (strpos($item, 'kristanw') === 0 || strpos($item, 'hurc') === 0) {
  7. if (strlen($item) > 17) {
  8. $splitted[$i] = substr($item, 0, 17);
  9. }
  10. }
  11. }
  12.  
  13. return implode($char, $splitted);
  14. }
  15.  
  16. $sql = file('mysql.sql');
  17.  
  18. foreach ($sql as $line) {
  19. $splitted = fix($line, "'");
  20. $splitted = fix($splitted, "`");
  21. echo $splitted;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement