Reply to Re: Get code from another site

Your name:

Reply:


Posted by Geoff Berrow on 07/11/07 15:05

Message-ID: <f72qc7$fl9$1@north.jnrs.ja.net> from Steve Ray contained
the following:

>Is it possible in PHP to take a piece of code from this website and
>reference it on my page, I was thinking of something along the lines of:
>
>GREP from sitename | referencing this page | inside these markers

LOL, that would have been covered in the follow-up PHP course Steve. Had
there been one. :-(

It's called screen scraping. Experiment with this

$html_content = implode('', file('http://www.example.com'));
$begin="begin marker";
$end="end marker";

preg_match("/$begin(.*)$end/i", $html_content, $match[]);

print_r($match);

--
Regards,

Geoff Berrow

[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

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