a while back i was using visual basic progs to grab data from the internet
i would load a text file with web links, hit one at a time, grab the text, place the text in memory, find the text on the page i was looking for, save that to a file, and then loop to the next link until i was all done.
is there a way to do that using php?
eg
go to: site.com/page1.htm
read the html text into a variable $file_a
look for the term "widget" found between "small" and "large" on each page
store that item in a variable $found
go to next link
--
navigating a link, grabbing the text, parsing a string
Moderator: General Moderators
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: navigating a link, grabbing the text, parsing a string
To read a file into a string
http://www.php.net/manual/en/function.f ... ntents.php
For the searching option you can look at regular expressions;
http://www.php.net/manual/en/book.pcre.php
http://www.php.net/manual/en/function.f ... ntents.php
For the searching option you can look at regular expressions;
http://www.php.net/manual/en/book.pcre.php
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering