cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: top level (non specific) questions

From: Stephen Pynenburg <spynenburg_at_gmail.com>
Date: Wed, 16 Apr 2008 17:46:29 -0400

Hi,
Personally, I'd recommend using strpos and substr - the PHP manual says it's
often faster than Regexing.
There are a lot of examples on the PHP strpos
Page<http://ca.php.net/strpos>- I'd recommend just grabbing all the
links by saying between "a href='" and
" >".
Cheers,
Stephen

On Wed, Apr 16, 2008 at 4:07 PM, Richard Lynch <ceo_at_l-i-e.com> wrote:

> PHP DOM would probably be better IF the HTML is decent enough for DOM
> to read it...
>
> If the HTML is totally whack, then you're stuck with PCRE, probably.
>
> Neither is built-in to curl.
>
> Both are extensions for PHP.
>
> Questions about these would better be addressed to php-general
>
> Curl is about getting the document easily, but that's pretty much it,
> as far as I know.
>
> On Wed, April 16, 2008 2:23 pm, ryan pal wrote:
> > Hello Everyone. Being new to curl, I'm not sure if there are built in
> > functions that can help me automate what I'm looking to do.
> > Project:-------Automate
> > data entry. Details:-------Submit a specified search to a web site
> > (using
> > curl)-Obtain data back-Strip out all <a href> links-Navigate to these
> > pages-Obtain specified data Solutions:----------use curl to post to
> > web
> > pages-<extract data> (not decided)-import into database Extract Data
> > Possibilities:-------------------------use PHP preguse PHP regexuse
> > DOMuse
> > builtin curl functions (if exists?) After getting read to program my
> > script with regex, I was told to use DOM because it would be easier
> > and
> > handle messy HTML code better. I figured I would check here to see if
> > there are other recommended solutions considering this is a cURL
> > centralized script and perhaps some on this newsgroup have already
> > created something along these lines. Any feedback is appreciated.
> > Thanks!
> >
> > --
> > Want an e-mail address like mine?
> > Get a free e-mail account today at www.mail.com!
> >
> > _______________________________________________
> > http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
> >
>
>
> --
> Can you do me a favor?
> Sign up for http://Facebook.com
> Add http://apps.facebook.com/whereivebeen/
> Review it, and let 'em know Rich sent you.
> http://www.facebook.com/apps/application.php?id=2603626322
> (Scroll down to the middle of the middle column)
> Give it a 5-star rating please :-)
> (If you can't go 5-star, email me to tell me why)
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-04-16