PHP equivalent of C#'s new NetworkCredential() ?
Posted: Sat Sep 15, 2007 7:16 pm
scottayy | Please use
I need to get this to work in PHP.
Does anyone know what the equivalent code would be in php? I've searched, but I \could not find anything specific.
Thanks very much....
scottayy | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I'm new to php. I've written a lot of C, SQL, etc...
I am using php version 5 and nuSOAP with an apache server on a Windows XP sp2 platform.
I've been provided with a C# snippet of code to invoke a Web services from a commecial Vendor.
This is the C# code...
[syntax="csharp"] CredentialCache myCache = new CredentialCache();
NetworkCredential myCred = new NetworkCredential("GETest", "Ac71v3K3y", "");
myCache.Add(new Uri(mySvc.Url), "Basic", myCred);
mySvc.Credentials = myCache;
if (!mySvc.SendMessageToUnit(iProvider, strUnit, iEncoding, strData, iDataLen, out iTransID, out iError, out sErrorStr))
{
// If there's an error, iError and sErrorStr will be set
lblMessage.Text = sErrorStr;
return;
}Does anyone know what the equivalent code would be in php? I've searched, but I \could not find anything specific.
Thanks very much....
scottayy | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]