Hello All,

I really need help, I have no experience with Curl and I want to use it to perform simple actions on a "software as a service" application, the goal is to automate testing, using tools like "selenium" is much more easier but not enough powerful to develop in the future automatic scripts that can be launched as a cron job for example

I downloaded curl.exe version 7.19.5 and tried basic commands on the command prompt , there are returned results but the data returned is very complex, it seems that using curl library with PHP is easier than a pure curl usage but I have no choice and I need to use only the curl.exe file

the text was very long, I just tried to explain precisely what the problem is to save time

we can summarize the issue in "how to use curl to perform basic UI actions as in selenium and gather results"

Thanks

Well curl on its own actually hasn't got anything to do with php. Curl is a programming language which can be found at wikipedia and Curl is even a mathematics calculation. So as you can see, the name Curl is known to be a number of things but the one in php is actually called Client URL Library. The Client URL Library (php-curl) is open source so if you know c++/c then you should be able to download the source and embed it into your program. I'm assuming that's what you want.

Thank you for the feedback, but the problem I have is that I'm not authorized to use the php, only curl scripting language, I performed a simple test on the google website to see if I can get results: the command I wrote and the very ugly returned stuff are pasted below:
C:\Documents and Settings\admin\Desktop\Curl\curl-7.19.5 (working)>curl "www.goo
gle.com/search?q=zied&btnG="Google%20Search"
<html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"><t
itle>403 Forbidden</title><style><!--body {font-family: arial,sans-serif}div.nav
{margin-top: 1ex}div.nav A {font-size: 10pt; font-family: arial,sans-serif}span
.nav {font-size: 10pt; font-family: arial,sans-serif; font-weight: bold}div.nav
A,span.big {font-size: 12pt; color: #0000cc}div.nav A {font-size: 10pt; color: b
lack}A.l:link {color: #6f6f6f}A.u:link {color: green}//--></style><script><!--va
r rc=403;//--></script></head><body text=#000000 bgcolor=#ffffff><table border=0
cellpadding=2 cellspacing=0 width=100%><tr><td rowspan=3 width=1% nowrap><b><fo
nt face=times color=#0039b6 size=10>G</font><font face=times color=#c41200 size=
10>o</font><font face=times color=#f3c518 size=10>o</font><font face=times color
=#0039b6 size=10>g</font><font face=times color=#30a72f size=10>l</font><font fa
ce=times color=#c41200 size=10>e</font>&nbsp;&nbsp;</b><td>&nbsp;</td></tr><tr><
td bgcolor="#3366cc"><font face=arial,sans-serif color="#ffffff"><b>Error</b></t
d></tr><tr><td>&nbsp;</td></tr></table><blockquote><H1>Forbidden</H1>Your client
does not have permission to get URL <code>/search?q=zied&amp;btnG=Google%20Sear
ch</code> from this server. (Client IP address: 41.225.239.70)<br><br>
Please see Google's Terms of Service posted at http://www.google.com/terms_of_se
rvice.html
<BR><BR><P>If you believe that you have received this response in error, please
<A HREF="http://www.google.com/support/bin/request.py?contact_type=user&hl=en">r
eport</A> your problem. However, please make sure to take a look at our Terms of
Service (http://www.google.com/terms_of_service.html). In your email, please se
nd us the <b>entire</b> code displayed below. Please also send us any informati
on you may know about how you are performing your Google searches-- for example,
"I'm using the Opera browser on Linux to do searches from home. My Internet ac
cess is through a dial-up account I have with the FooCorp ISP." or "I'm using th
e Konqueror browser on Linux to search from my job at myFoo.com. My machine's I
P address is 10.20.30.40, but all of myFoo's web traffic goes through some kind
of proxy server whose IP address is 10.11.12.13." (If you don't know any inform
ation like this, that's OK. But this kind of information can help us track down
problems, so please tell us what you can.)</P><P>We will use all this informati
on to diagnose the problem, and we'll hopefully have you back up and searching w
ith Google again quickly!</P>
<P>Please note that although we read all the email we receive, we are not always
able to send a personal response to each and every email. So don't despair if
you don't hear back from us!</P>
<P>Also note that if you do not send us the <b>entire</b> code below, <i>we will
not be able to help you</i>.</P><P>Best wishes,<BR>The Google Team</BR></P><BLO
CKQUOTE>/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/<BR>
pJGDY_ynxlRfzpiWZ0k1TywqSLxjtFu0O3MG7pKVio1mp5fs9<BR>
Sl4MghJQ5YhcZjwMJf1tFanrMGo_zbGMyofOHuNoc6LEkyNJp<BR>
Mw3ImfkqpqwCRzgKXCVedtG3azfGeFkktryvqOCJmDhMeUjIq<BR>
6BooquyWZFRBoPLuu_DXYkeHsw9QzDeWtHHxWRQy62pD-shxn<BR>
Tgl12NQT5e9oAxtqkvCer0Zo5--0EH1kI53mS1vfiTS_OWZrY<BR>
YjpN6kbL8sE8q6RgUdV1tLIBgFWCyxolqpKJtXuSGiEGexRVF<BR>
VmoAvAh7aUPql11zIkfwjfRgShRNJVGygHEpcvaDCWYdkc_Tf<BR>
imt4cqMnujPLDOEZ-zM7zGSLzXOd2ocBaf6aqf8K0YySt_QLO<BR>
JgW-U8aD6sN-iWOdC9GA-eM7l-gyYxGFlwYOFfDASm1DvlsZ8<BR>
WNA8rRH7_wO0ETmTv-lGAYj7VUfTIvEHPYLZAPQl4uVnIpuLs<BR>
BjWLIvO-t62JgzCM65oGn-JrCcaqNgnjw3Stex6PJg6IQZA3A<BR>
Hz9cgWrB-SnPn4NXXYI8He2Vtxvo_h4E3l6w9wRRb3yYnDXkU<BR>
LSA2m-KBGxpPJPnHvsf-wJPsYEOwNEMSj5bzZlNcI7pN6g3op<BR>
JSKx4Bw2PcZaK9AWXwrHLO1gkb0Ow9AWJk22qJJ6pIJYovPG-<BR>
-MB3aMmxJbfwVZooHGDVnhmnWhOD-VYq0-uoevzdi6nCXviWg<BR>
P_1gPnw==<BR>
+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+/+<BR></BLOCKQUOTE>


<p></blockquote><table width=100% cellpadding=0 cellspacing=0><tr><td bgcolor="#
3366cc"><img alt="" width=1 height=4></td></tr></table></body></html>

Ok
That basically returned the page source. To filter it you would need to place that data into a variable then use the regex library to filter it. I'm not sure but you might be able to use variables in the command terminal. But why is it you can't use php as a cron job. Isn't it like standard? The following is an example command:

php /home/www/cron.php

If however you are looking for something that is client side and not server side I would suggest looking at php-gtk for windows.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.