You are posting code to send an SMS. Did you really write it yourself, or have you just copied that from somewhere else without understanding what it does or is supposed to do? That piece of code has nothing whatsoever to do with encryption/decryption, nor does it have anything to do with sending data to a server using PHP, which is what you've claimed is your actual goal.

I suggest you talk to your professor, show him what you've written here, what replies you've received, and ask if your professor can recommend you some extra tutoring or a change of project, or field of study.