What are you trying to achieve... and why?
There's some scary code in there. I very much doubt that anybody is going to debug it for you.
Moodle's web services, if over HTTPS, are already secure.
There's some scary code in there. I very much doubt that anybody is going to debug it for you.
Moodle's web services, if over HTTPS, are already secure.