Web Scrapeing Help Needed. Maybe Regular Expressions?
Posted: Fri Oct 13, 2006 2:01 pm
Hi everyone. I haven't a bit of trouble with a new script I am trying to write. Here is what is going on...
I am using cURL to grab the source of a html. I'm trying to write a function that is sent the display text of a link and then returns the url of that link.
For example, somewhere in the source file there is a link <a href="file.html">Click Here</a>
In this case I would want to be able to send the function "Click Here" and it return "file.html"
I have tried trying to use regular expressions all morning, but I usually do database e-commerce stuff and can't figure this stuff.
Thanks guys for any help you can offer!!
-Bradly
I am using cURL to grab the source of a html. I'm trying to write a function that is sent the display text of a link and then returns the url of that link.
For example, somewhere in the source file there is a link <a href="file.html">Click Here</a>
In this case I would want to be able to send the function "Click Here" and it return "file.html"
I have tried trying to use regular expressions all morning, but I usually do database e-commerce stuff and can't figure this stuff.
Thanks guys for any help you can offer!!
-Bradly