Click to See Complete Forum and Search --> : submitting a form to a website


benny666
10-25-2003, 01:34 PM
I am trying to query a website by submitting a form using perl
the website uses flash and checks for flash plugin and set the varable in a cookie

if I submit the url in the browser and the cookie exsists the form will be submitted without checking for flash

if the cookie doesn't exist the page will be rederected to a script flashcheck.php?flash=true (if flash exsists)

The problem is when i use a user Agent with perl to get the page I allways get the setFlash.php page which is chekking for the existant of flash

how can I send the value of the cookie to the website?

any suggestions??

ProperBo
10-26-2003, 04:20 AM
not a biggy on cookies, but you use the Request.Cookies funtion in ASP, must be something similiar in PHP.

example WRITE cookie to local machine.


<%
Response.Cookies("MyCOOKIE").Domain = "www.YOURDOMAINNAMEHERE.com"
Response.Cookies("MyCOOKIE").Expires = Date() + 1
Response.Cookies("MyCOOKIE")("Name") = "WebUser"%>

example READ cookie for retrieving username / password


<%
DIM strUsername, strPassword, strFirstName, strLastName
strUsername = Request.Cookies("MyCOOKIE")("Username")
strPassword = Request.Cookies("MyCOOKIE")("Password")
strFirstName = Request.Cookies("MyCOOKIE")("strFirstName")
strLastName = Request.Cookies("MyCOOKIE")
("strLastName")
%>


hope that helps a little.

benny666
10-26-2003, 07:22 AM
I am sure you are riight in reading the cookies but
a. how do I know what is the meaning of each number in the cookie
9900494#1152255#11112-11255-12522#1122055
for example

and the other question:

When i use the broser to submit a form I get a cookie
when I use a userAgent I don't get a cookie in the cookie folder for that lets assume that I need to set up a place for the cookies (cookie_jar) but how do i submit the cookie information back to the website??