Read code from another site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cammet
Forum Newbie
Posts: 22
Joined: Thu Sep 23, 2004 8:00 am

Read code from another site

Post by Cammet »

Hi all,
How would i go about reading into a mysql database all the html code on a page that is between certain tags? IE:

Code: Select all

<html>
<body>
<p> Hey All</p>
Just wanted to say hi.
</body>
</html>
How would i copy All the code between the and including <body> </body> tags?
User avatar
mudkicker
Forum Contributor
Posts: 479
Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:

Post by mudkicker »

you can do it with [php_man]preg_match[/php_man]()
Cammet
Forum Newbie
Posts: 22
Joined: Thu Sep 23, 2004 8:00 am

Post by Cammet »

If its not too much trouble could you give me a small example?
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Click that link. It has tons.
Post Reply