Menu
How would I submit a form with a php socket? How does http submit a form? Is it part of the header? The form I am trying to submit is method=post and it is sent to a dll file.
$request.="POST /tts/anontts.dll HTTP/1.1n";
$request.="Host: www.aaacooper.comn";
$request.="Content-type: application/x-www-form-urlencodedn";
$request.="Content-length: ".strlen($data_string)."n";
$request.="Connection: closen";
$request.="n";
$request.=$data_string."n";
[code=html]
http://www.aaacooper.com/online/shipinfo/imagefetch.asp?PROnum=45488676
GET /online/shipinfo/imagefetch.asp?PROnum=45488676 HTTP/1.1
Host: www.aaacooper.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: ASPSESSIONIDQQABSCSD=AELDIMLAMKFCJJPJDKOCMGCH
HTTP/1.x 200 OK
Server: Microsoft-IIS/5.0
Date: Wed, 22 Jun 2005 17:36:32 GMT
Content-Type: text/html
Cache-Control: private
Age: 0
Connection: close
----------------------------------------------------------
http://209.192.88.8/cooper/EIPAccessServlet
POST /cooper/EIPAccessServlet HTTP/1.1
Host: 209.192.88.8
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.aaacooper.com/online/shipinfo/imagefetch.asp?PROnum=45488676
Content-Type: application/x-www-form-urlencoded
Content-Length: 200
command=SearchEIP&refreshData=false&showAnnotations=false&docid1=B05116AB.KNT&doctype1=BL&docid2=B05123AA.BVA&doctype2=DR&prostring=45488676%2C*%2C*%2C*%2C*%2C*%2C*%2C*%2C*%2CBL%2CDR%2C*%2C*&agemax=57
HTTP/1.x 200 OK
Date: Wed, 22 Jun 2005 16:37:12 GMT
Server: IBM_HTTP_Server/1.3.12.6 Apache/1.3.12 (Win32)
Set-Cookie: sesessionid=PB4YHYK3SR33UJKRZI3RM0Q;Path=/
Cache-Control: no-cache
Expires: Thu, 01 Dec 1994 16:00:00 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Language: en
Age: 3488
Connection: close
----------------------------------------------------------
http://209.192.88.8/cooper/preload.html
GET /cooper/preload.html HTTP/1.1
Host: 209.192.88.8
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://209.192.88.8/cooper/EIPAccessServlet
Cookie: sesessionid=PB4YHYK3SR33UJKRZI3RM0Q
HTTP/1.x 200 OK
Date: Wed, 22 Jun 2005 16:37:19 GMT
Server: IBM_HTTP_Server/1.3.12.6 Apache/1.3.12 (Win32)
Last-Modified: Wed, 13 Jun 2001 16:27:49 GMT
Content-Length: 284
Content-Type: text/html
Content-Language: en
Age: 3478
----------------------------------------------------------
http://209.192.88.8/cooper/Blank.html
GET /cooper/Blank.html HTTP/1.1
Host: 209.192.88.8
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-gb,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://209.192.88.8/cooper/EIPAccessServlet
Cookie: sesessionid=PB4YHYK3SR33UJKRZI3RM0Q
HTTP/1.x 200 OK
Date: Wed, 22 Jun 2005 16:37:20 GMT
Server: IBM_HTTP_Server/1.3.12.6 Apache/1.3.12 (Win32)
Last-Modified: Thu, 25 Apr 2002 20:02:19 GMT
Content-Length: 328
Content-Type: text/html
Content-Language: en
Age: 3478
----------------------------------------------------------
[/code]
I got it working thanks for your help. I am trying to auto print some images that the links to them look something like this, viewimage.jsp?document=blah. There is some type of session (I think) so even though I have the exact link it does not work for some reason. Is there a way to perform some type of javascript with a socket. By this I mean like if the webpage has on click is there a way to make a socket click?[/QUOTE]When a browser connects it does so using a socket type connection so all you need to do is emulate that connection.
0.1.9 — BETA 5.18