You have to modify the script in the way described in german forum. You might use e.g. this as a start script.
You can also try some other scritps I wrote recently to understand how they work. Just run them with "php scriptname.php" on you Linux cli.
Here a list of this simple scripts...