I think you would just need to put the assign_parent.php script in the top level folder of you moodle install, then visit the URL http://example.com/moodle/assign_parent.php to run it.
However, be absolutely sure you trust the script before you run it. A script run like this can do almost anything it likes to your server's hard disc and or database contents, so a malicious, or simply buggy, script could do untold damage.
Roles and permissions
How to use an SQL Scrip???
This discussion has been locked so you can no longer reply to it.