Help about CURL

Discussion in 'PHP' started by eruseldarine, Mar 13, 2008.

  1. #1
    is there any one who knows how to curl some content with only taking special tables for example

    i want to curl google so i only need searches.

    i need to curl only starts from

    div id= res

    and the last line will be /NOBR
     
    eruseldarine, Mar 13, 2008 IP
  2. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not sure I get what you're saying.. do you want to use the information in <div id="res">blah</div> to perform a search?

    Please elaborate a bit more :).
     
    CodyRo, Mar 14, 2008 IP
  3. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #3
    CURL will only return you the whole page. You should use regular expressions to find necessary data.
     
    AsHinE, Mar 14, 2008 IP
  4. Edynas

    Edynas Peon

    Messages:
    796
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just also make sure you don't get in trouble ..Google may not like it when you start hitting them with curl queries. They have a lot of API's so you can query there services..take a look at http://code.google.com/apis/gdata/
     
    Edynas, Mar 14, 2008 IP
  5. pondlife

    pondlife Peon

    Messages:
    898
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #5
    If you've got access to a Linux command line then think about using 'wget' - this will capture a whole page for you and then you can use grep, sed, awk to extract the exact segment of code you're looking for.
     
    pondlife, Mar 14, 2008 IP
  6. krem

    krem Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Edynas, are you sure it is still possible to use google api for queries?
    Have a look here http://code.google.com/apis/soapsearch/reference.html

    I believe curl / wget or other tools like those are the way to go.

    Bye :eek:
     
    krem, Mar 16, 2008 IP