|
Posted by Steve on 02/27/07 16:00
"javelin" <google.1.jvmail@spamgourmet.com> wrote in message
news:1172549204.330607.13680@p10g2000cwp.googlegroups.com...
|
|
| > echo file_get_contents($url);
| >
|
| Thanks for this idea. It works well for the top level, but it I now
| need each sub link to be opened via the same echo
| file_get_contents($url) function. Any chance I can easily parse this
| and dynamically create a new page for each link? (I don't ask for
| much, do I).
no you don't ask for much. the question is 'any chance *i* can easily...' to
which the response is yes. so no, you aren't asking for much. as for writing
it for you, that's another story.
you need to learn the preg functions and write a regular expression that
catures html tags such as src= and href=, etc. once you get your matches,
get the contents using file_get_contents. it looks like you're either
screen-scraping or hacking...either way, there are tons of examples of the
regex you'll need. just google 'php screen scraping'.
hth
Navigation:
[Reply to this message]
|