Is there any solution to retrieve values from dynamic sites in to our site.
I m trying to spidering an auction site. any ideas regarding this please reply...
Accessing values from dynamic sites
Moderator: General Moderators
You should receive permission from the auction site, if you don't already have it. file() or file_get_contents() along with the use of preg_match() to find what you're looking for should do you some good.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
-
thewebdrivers
- Forum Commoner
- Posts: 41
- Joined: Fri Aug 17, 2007 3:32 pm
- Location: india
- Contact:
feyd | Please use
use it like this
$arr_data will have all the returned results in an array. 
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i have written a small function to parse pages. hope that will help you.Code: Select all
function str_between($str,$start,$end) {
if (preg_match_all('#' . preg_quote($start) . '(.*?)' . preg_quote($end) . '#s',$str,$matches)) {
return $matches[1];
}
// no matches
return false;
}Code: Select all
$data_mac = file_get_contents("http://www.yoururl.com/");
//die();
$start='<td valign="top" class="details">';
$end='<p class="availability">';
$arr_data=str_between($data_mac,$start,$end);feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]