RE: help with cURL + PHP
Mladen Jovic <[email protected]> Tue, 4 Nov 2014 10:28:53 +0100
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <[email protected]> |
--===============0019835476== Content-Type: multipart/alternative; boundary="_f8990106-5098-4f46-b390-3efb4f15ab02_" --_f8990106-5098-4f46-b390-3efb4f15ab02_ Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable So if i understand there is no easy way to fill up those inputs throught ph= p even if i fill up manually CAPTCHA? :( > From: [email protected] > Date: Tue=2C 4 Nov 2014 19:01:10 +1030 > Subject: Re: help with cURL + PHP > To: [email protected] >=20 > I think the problem is more fundamental. cURL isn't useful for > filling in forms. What cURL could do for you is to simulate sending > ("POSTing") a completed form to the form target... ie simulate what > happens after a human fills in the fields and then clicks the "Isci" > button. You can read about the POST process here... it's a > fundamental part of the internet : > http://en.wikipedia.org/wiki/POST_(HTTP) >=20 > So=2C can we do this with cURL in your application? Turns out to be > pretty hard... it's not just a "normal" POST. >=20 > If you examine the page source at > https://raz.zav-zdruzenje.si/infocenter/Search.aspx you'll see that > clicking the Isci button runs some javascript.... so you could dig > into that javascript and see how it works=2C then simulate THAT with > cURL. The javascript most likely carries out a POST=2C and probably > some other processing... so you'd have to simulate the other > processing in PHP and then do the POST with cURL. Of course you'd > also need to get the captcha solved somehow... perhaps with a service > like http://www.deathbycaptcha.com/ >=20 > An alternative approach=2C if you are happy to solve the captcha > yourself and just want to save time filling in the other fields is to > use a windows machine and control Internet Explorer through vb or vba. > Here's a rough example to get you started : > http://www.excely.com/excel-vba/ie-automation.shtml >=20 > Good luck :) >=20 > Scott = --_f8990106-5098-4f46-b390-3efb4f15ab02_ Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <html> <head> <style><!-- .hmmessage P { margin:0px=3B padding:0px } body.hmmessage { font-size: 12pt=3B font-family:Calibri } --></style></head> <body class=3D'hmmessage'><div dir=3D'ltr'>So if i understand there is no e= asy way to fill up those inputs throught php even if i fill up manually CAP= TCHA? :(<br><br><div>>=3B From: [email protected]<br>>=3B Da= te: Tue=2C 4 Nov 2014 19:01:10 +1030<br>>=3B Subject: Re: help with cURL = + PHP<br>>=3B To: [email protected]<br>>=3B <br>>=3B I think = the problem is more fundamental. cURL isn't useful for<br>>=3B filling i= n forms. What cURL could do for you is to simulate sending<br>>=3B ("POS= Ting") a completed form to the form target... ie simulate what<br>>=3B ha= ppens after a human fills in the fields and then clicks the "Isci"<br>>= =3B button. You can read about the POST process here... it's a<br>>=3B f= undamental part of the internet :<br>>=3B http://en.wikipedia.org/wiki/PO= ST_(HTTP)<br>>=3B <br>>=3B So=2C can we do this with cURL in your appli= cation? Turns out to be<br>>=3B pretty hard... it's not just a "normal" = POST.<br>>=3B <br>>=3B If you examine the page source at<br>>=3B http= s://raz.zav-zdruzenje.si/infocenter/Search.aspx you'll see that<br>>=3B c= licking the Isci button runs some javascript.... so you could dig<br>>=3B= into that javascript and see how it works=2C then simulate THAT with<br>&g= t=3B cURL. The javascript most likely carries out a POST=2C and probably<b= r>>=3B some other processing... so you'd have to simulate the other<br>&g= t=3B processing in PHP and then do the POST with cURL. Of course you'd<br>= >=3B also need to get the captcha solved somehow... perhaps with a servic= e<br>>=3B like http://www.deathbycaptcha.com/<br>>=3B <br>>=3B An alt= ernative approach=2C if you are happy to solve the captcha<br>>=3B yourse= lf and just want to save time filling in the other fields is to<br>>=3B u= se a windows machine and control Internet Explorer through vb or vba.<br>&g= t=3B Here's a rough example to get you started :<br>>=3B http://www.excel= y.com/excel-vba/ie-automation.shtml<br>>=3B <br>>=3B Good luck :)<br>&g= t=3B <br>>=3B Scott<br><br></div> </div></body> </html>= --_f8990106-5098-4f46-b390-3efb4f15ab02_-- --===============0019835476== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KaHR0cDovL2Nv b2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vY3VybC1hbmQtcGhwCg== --===============0019835476==--