homepage Welcome to WebmasterWorld Guest from 107.22.78.233
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Content Fetching?
McBlack




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

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]

 

Mohamed




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

One way to do is first get content of the page using file_get_contents or similar function and then parse returned string.

coopster




msg:3556541
 4:22 am on Jan 24, 2008 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved