Msg#: 4405494 posted 8:42 am on Jan 10, 2012 (gmt 0)
I need to call a php script to import data. I am doing this via VB.NET as follows
Dim myProcess As New System.Diagnostics.Process() myProcess.StartInfo = New System.Diagnostics.ProcessStartInfo("iexplore.exe", "http://......./pages_system/datasync.php") myProcess.Start() myProcess.Kill()
I have put username and password on the php page but now the automation fails. Any ideas how to pass the credentials (LAMP) - any language will do ?
Msg#: 4405494 posted 5:39 pm on Jan 12, 2012 (gmt 0)
I do not know how to do this in ASP or .NET but what I do when I need to post to a site like that is open a socket connection and handle the transaction on the server side. So your VB.NET server talks to the remote PHP-enabled server via a socket connection. A handy tool for this is cURL. Rather than open and control the socket and communication you can use the cURL API's for your particular server platform.
Msg#: 4405494 posted 3:48 pm on Feb 2, 2012 (gmt 0)
The basics are laid out in the text docs on the cURL site: [curl.haxx.se...] and searching for something like "curl post login" or variations on that search should turn up some examples you could follow to get started. Wish I could offer more my friend.