Can anybody convert this code to php for me.. this is code is used to access a webservice but i only C# code they are not providing any documentation.

Thanks in advance

private CrmService CreateService()
    {
        cs = new CrmService();

        string username = ConfigurationManager.AppSettings["Username"].ToString();
        string password = ConfigurationManager.AppSettings["Password"].ToString();
        string domain = ConfigurationManager.AppSettings["Domain"].ToString();
        string orgname = ConfigurationManager.AppSettings["Org"].ToString();
        string url = ConfigurationManager.AppSettings["CrmSdk.CrmServiceWsdl"].ToString();
        cs.Credentials = new NetworkCredential(username, password, domain);
       // cs.Credentials = CredentialCache.DefaultCredentials;
        cs.Url = url;
     //   OrganizationServiceProxy orgServiceImpersonate = new OrganizationServiceProxy(new Uri(p.orgUri), p.homeuri, p.credentials, p.deviceCredentials);
        CrmAuthenticationToken token = new CrmAuthenticationToken();
        token.OrganizationName = orgname;
        cs.CrmAuthenticationTokenValue = token;
        cs.PreAuthenticate = true;
        return cs;
    }
Member Avatar
diafol

I think this will be more difficult than it appears as there are a few calls to classes - which I assume would also have to be converted.