我想采集这个网站的列表商品http://www.taomanzu.com/category-16-4-1-10000-1.html,功能是,同时能采集商品的ID,和商品的名称,并且写入缓存中,如http://www.taomanzu.com/category-16-4-1-10000-1.html列表中的某个商品ID是:9914540199,标题是:纯棉磨毛卷边九分裤\工装九分裤\休闲九分裤 2色让后我需要的是同时能采集到商品ID,和商品标题,能合成一个链接如
< a href=http://www.xxxx.com/tshow-9914540199.html">纯棉磨毛卷边九分裤\工装九分裤\休闲九分裤 2色</a>下面的这代码只能采集商品ID或者标题,请问如何修改才可以同时采集并且合并成一个链接!<?php
//今日热门,10分钟更新一次
require 'global.php';
require 'gzdoc.php';
include 'config.php';
$id=$_GET["id"]; 
$pg=$_GET["pg"]; if($_GET['pg']==""){ $pg=0; }
$dir='cache';
if(!file_exists($dir)){ @mkdir($dir,0777); }
ob_start();
//女装
$lastflesh=@filemtime($dir."/Cache_NvZhuang_new.html");
if(!file_exists($dir."/Cache_NvZhuang_new.html") or ($lastflesh + ($flush * 60 * 60) <= $timestamp)){  //$flush * 60  一小时
$openurl="http://www.taomanzu.com/category-16-4-1-10000-1.html";
$file = curl($openurl);
//开始处理一条一条的条数!!!
$result='';
if (preg_match_all('/<p class="taoke_title"><a href="tshow-(.*?).html" target="_blank">/is', $file, $list))
{
foreach ($list[1] as $i=>$k1 ) if ($i<30)
{ //{ $result=$result . '<a href="/tshow-'.$k1.'.html" target="_blank">'.$k1.'</a>';
}
}
$result_utf=iconv("GB2312","GB2312",$result);
file_put_contents($dir."/Cache_NvZhuang_new.html",$result_utf);}else
{}?><?php
GzDocOut;
?>