"; $needle=','; $trig=strpos($products[$i],$needle); $brand=substr($products[$i],0, $trig); $rest=substr($products[$i], $trig+1);$rest=trim($rest); $trig=strpos($rest,$needle); $network=substr($rest, 0, $trig); $rest=substr($rest, $trig+1); $brand_l=strlen($brand); $model=substr($rest, $brand_l+1); $trig=strpos($model, $needle); $rest=substr($model, $trig+1); $model=substr($model, 0, $trig); $needle='",'; $trig1=strpos($products[$i], $needle); $tariff=substr($products[$i], $trig1+2); $rest=$tariff; $needle=','; $trig=strpos($tariff, $needle); $tariff=substr($tariff, 0, $trig); $details=substr($rest, $trig+1); $trig=strpos($details, $needle); $details=substr($details,0, $trig); $description=$tariff." ".$details; $needle="htt"; $trig=strpos($products[$i], $needle); $url=substr($products[$i], $trig); $needle=','; $trig=strpos($url, $needle); $url=substr($url, 0, $trig); $url="http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=1480&merchantID=1202&programmeID=3462&mediaID=0&tracking=&url=".$url; $needle="jpg"; $trig=strpos($products[$i], $needle); $price=substr($products[$i], $trig+5); $needle=','; $trig=strpos($price, $needle); $price=substr($price, 0, $trig); echo $brand, "|", $network, "|", $model, "|", $description, "|", $url, "|", $price, "
"; //echo $products[$i], "
"; $link_id=open_database(); $inser=mysql_query("INSERT INTO simply3g VALUES ('$brand', '$model', '$network', '$description', '$price', '$url', '$date')", $link_id); mysql_close(); } ?>