Getting content from external website by a div id
Posted: Fri Jan 21, 2011 1:23 am
Hi
I am developing a website on social engine. I have created a menu item for News and need to get the content for that menu item from an external website by a div id.
Here the problem is I am getting the content between the particular div id and as well as particular div class.
<div class="clearfix" id="ja-zinfp"> this is the source div.
<div class="something"> working good
<div id="something"> working good
<div class="clearfix" id="ja-zinfp"> not working
This is the line of code what I have wriiten for this task
preg_match_all ("/<div class=\"ja-content-top clearfix\">([^`]*?)<\/div>/", $data, $matches);
print_r($matches[1]);
Can anybody help me in this issue
Thanks
Sateeesh.
I am developing a website on social engine. I have created a menu item for News and need to get the content for that menu item from an external website by a div id.
Here the problem is I am getting the content between the particular div id and as well as particular div class.
<div class="clearfix" id="ja-zinfp"> this is the source div.
<div class="something"> working good
<div id="something"> working good
<div class="clearfix" id="ja-zinfp"> not working
This is the line of code what I have wriiten for this task
preg_match_all ("/<div class=\"ja-content-top clearfix\">([^`]*?)<\/div>/", $data, $matches);
print_r($matches[1]);
Can anybody help me in this issue
Thanks
Sateeesh.