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>&gt=3B From: [email protected]<br>&gt=3B Da=
te: Tue=2C 4 Nov 2014 19:01:10 +1030<br>&gt=3B Subject: Re: help with cURL =
+ PHP<br>&gt=3B To: [email protected]<br>&gt=3B <br>&gt=3B I think =
the problem is more fundamental.  cURL isn't useful for<br>&gt=3B filling i=
n forms.  What cURL could do for you is to simulate sending<br>&gt=3B ("POS=
Ting") a completed form to the form target... ie simulate what<br>&gt=3B ha=
ppens after a human fills in the fields and then clicks the "Isci"<br>&gt=
=3B button.  You can read about the POST process here... it's a<br>&gt=3B f=
undamental part of the internet :<br>&gt=3B http://en.wikipedia.org/wiki/PO=
ST_(HTTP)<br>&gt=3B <br>&gt=3B So=2C can we do this with cURL in your appli=
cation?  Turns out to be<br>&gt=3B pretty hard... it's not just a "normal" =
POST.<br>&gt=3B <br>&gt=3B If you examine the page source at<br>&gt=3B http=
s://raz.zav-zdruzenje.si/infocenter/Search.aspx you'll see that<br>&gt=3B c=
licking the Isci button runs some javascript.... so you could dig<br>&gt=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>&gt=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>=
&gt=3B also need to get the captcha solved somehow... perhaps with a servic=
e<br>&gt=3B like http://www.deathbycaptcha.com/<br>&gt=3B <br>&gt=3B An alt=
ernative approach=2C if you are happy to solve the captcha<br>&gt=3B yourse=
lf and just want to save time filling in the other fields is to<br>&gt=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>&gt=3B http://www.excel=
y.com/excel-vba/ie-automation.shtml<br>&gt=3B <br>&gt=3B Good luck :)<br>&g=
t=3B <br>&gt=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==--