Re: using CURL or something similar to click on a link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2007-06-25 at 19:01 -0700, Siavash Miri wrote:
> Hi All,
> 
> 
> I just recently started writing a php script that would get some search
> results from some other sites and display them.
> 
> I believe the only php way to do this is using CURL. am I correct?? or is
> there a more efficient way to do this?

cURL is one of the best ways to do it since it provides a fairly high
level interface for performing page retrieval via GET or POST. You can
also do it using sockets but that's lower level and probably less
efficient due to the way cURL encapsulates low level communication
within the C layer.

> Anyways, i got it working fine with curl, except one site where I need to
> click on a link before doing the search. I can't find a way to click on a
> link using CURL. is this possible?

You probably need cookies. Read about the following cURL options and see
if they change things for you:

    CURLOPT_COOKIEJAR
    CURLOPT_COOKIEFILE

Alternatively there may be other issues at play. Perhaps an onclick()
even in JavaScript or something else.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux