Welcome to WebmasterWorld Guest from 54.158.36.59

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Content Fetching?

     
11:14 pm on Jan 23, 2008 (gmt 0)

5+ Year Member



Does anyone know how to grab content between certain HTML tags in a php script? Say that there is a website that has updates and I wanted it to add it to my website. How could I make it so it copies the text from one website, and post it on another? Sorry if this is confusing v.v

I was thinking of file_get_contents...

[edited by: McBlack at 11:23 pm (utc) on Jan. 23, 2008]

11:33 pm on Jan 23, 2008 (gmt 0)

5+ Year Member



One way to do is first get content of the page using file_get_contents or similar function and then parse returned string.
4:22 am on Jan 24, 2008 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Exactly. Then use a regular expression [php.net] to match and grab the desired data.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month