THE Code you are using is totally outdated. Way2sms change their way of authentication.
If you want to use new code then here is solution : http://ritesh-chandora.blogspot.in/2012/02/php-code-for-sending-free-sms.html
this blog will provide new way of sending sms easily.