I would suggest you to go for REST service mechanism to communicate with the .php service, you may have to change the server side code as well as client.
You have to send parameters with the php service url and get the response accordingly.
Here is the service invoke code for the same.
Code:
public class NetworkService
{
string strResponse = string.Empty;
public NetworkService()
{
}
public string SendWebRequest(string strQueryString)
{
try
{
string strServiceUrl = string.Format("http://mydomain.com/webservices/getLogin.php?userinfo={0}", strQueryString);
HttpWebRequest request = null;
request = (HttpWebRequest)HttpWebRequest.Create(new Uri(strServiceUrl));
IAsyncResult asynchronousResult = request.BeginGetResponse(new AsyncCallback(ReadCallback), request);
return strResponse;
}
catch
{
throw;
}
}
private void ReadCallback(IAsyncResult asynchronousResult)
{
try
{
HttpWebRequest request = (HttpWebRequest)asynchronousResult.AsyncState;
HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asynchronousResult);
using (StreamReader streamReader1 = new StreamReader(response.GetResponseStream()))
{
strResponse = streamReader1.ReadToEnd();
}
}
catch
{
throw;
}
}
}
To invoke from client side.
Code:
NetworkService oNetworkService = new NetworkService();
oNetworkService.SendWebRequest("UserName_Password");
Hope it helps.