Reply to Re: saving content from another site

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация