Web Service Authentication php

Using nusoap web service you can easily authenticate user for web service access.You can use setCredentials method of client to pass username and password,The given password will be checked against the web service access.

 
$client->setCredentials($username,$password,"basic");

You can find the working demo here and you can also download the scripts.

Client :

1)In line no 48 change “http://127.0.0.1:80/webservice_file_transfer/nusoap/server/server.php?wsdl” to your corresponding url

2)In line no 50 chnage username password to your required username password.

3)uncomment 55 line if socket error or timeout error is occured.
Server:

change your line 75 to 81 where you have to replace your logic with usertable username password or our static password