1)
{
$newurl=trim(urldecode($url)).'&p='.$i;
}else
{
$newurl=trim(urldecode($url));
}
//print_r($newurl.'
');
$var = sgt_ag_fread_url($newurl);
preg_match_all ("/a[\s]+[^>]*?href[\s]?=[\s\"\']+".
"(.*?)[\"\']+.*?>"."([^<]+|.*?)?<\/a>/", $var, $matches,PREG_PATTERN_ORDER);
$matches = $matches[1];
$list = array();
foreach($matches as $var)
{
$hasil=explode("/",$var);
if (count($hasil)>=5)
{
if ($hasil[2]=='product-reviews')
{
if ($cekakhir !== $hasil[3])
{
$asin_area .= $hasil[3]."\n";
//print_r($hasil[3]."
");
$cekakhir=$hasil[3];
$cnt++;
}
}
if ($hasil[4]=='dp')
{
if ($cekakhir !== $hasil[5])
{
$asin_area .= $hasil[5]."\n";
//print_r($hasil[5]."
");
$cekakhir=$hasil[5];
$cnt++;
}
}
}
}
}
$retval='
| Grab : | '.$cnt.' Asin |