Hi all, can someone help me get the content of a div in a web site in another domain?
Im a little lost with this.
thanks
razstec
31
Junior Poster in Training
Recommended Answers
Jump to Post==IGNORE==
Well this is what I would do.$file = file_get_contents("http://website.com/thepage"); $div = preg_match('#<div id="id">(.*)</div>#',$file); echo $div;
With a regular expression it's quite simple. That should work, if not sorry it's my best guess.
==SORRY==
OH I'm sorry, I saw this on the …
All 4 Replies
NardCake
30
Posting Pro in Training
razstec
31
Junior Poster in Training
JorgeM
958
Problem Solver
Team Colleague
Featured Poster
razstec
31
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.