Hello,
My work uses an .ASP based job jacket system to collect data through a web browser and ultimately this data gets saved to our SQL database. I would like to get information from this database without using a web browser and using cURL instead. The problem is you have to start a session by logging in through an .ASP login page before you can access the data. I was wondering if accessing this data is possible using cURL and what the proper cURL syntax would be.
The .ASP login variables are “strUsername” and “strPassword”
The .ASP login screen collects these variable values and passes them to another .ASP process page:
My LogOnProcess.asp page contains this .ASP code:
<%
Set cnConn = Server.CreateObject(“ADODB.Connection”)
cnConn.open strConn
strUsername = StrOrNull(Request.Form(“strUsername”))
strPassword = StrOrNull(Request.Form(“strPassword”))
strSQL = "SELECT * FROM tblEmployees WHERE strUsername = " & strUsername & " AND strPassword = " & strPassword
Set rsEmployee = Server.CreateObject(“ADODB.Recordset”)
rsEmployee.open strSQL, cnConn
If rsEmployee.EOF then
strURL = “LogOn.asp?lngLogonFailed=1”
Else
Session(“lngCurrentUserID”) = rsEmployee(“lngEmployeeID”)
Session(“strCurrentUsername”) = rsEmployee(“strFirstName”) & " " & rsEmployee(“strLastName”)
Session(“strCurrentUserEmail”) = rsEmployee(“strEmail”)
Session(“lngPSDefaultProgressSheetID”) = rsEmployee(“lngPSDefaultProgressSheetID”)
strURL = “Default.asp”
End If
rsEmployee.Close
cnConn.Close
Response.Redirect strURL
%>
I have tried:
do shell script "curl http://www.mydomain.com/LogOnProcess.asp?strUsername=henry&strPassword=unknown&submit=Log On"
Any suggestions would be greatly appreciated,
CarbonQuark