Refactored pull.php

Refactored pull.php

- Introduced PDO
- Introduced mySQL (optional)
- optimized refresh code
- Added comments
- removed obsolete Code-Fragment