while($row = mysql_fetch_array($result)) {
$id = $row['id'];
$timestamp = $row['timestamp'];
// Convert that UNIX timestamp to something a little more useable
$date = date('M j, Y', $timestamp);
$time = date('g:i:s a', $timestamp);
$visitor_ip = $row['visitor_ip'];
$disp_url = urldecode($row['disp_url']);
$targ_url = $row['targ_url'];
$arr=explode(" ",$targ_url);
$url=$arr[count($arr)-1];
?>
<tr class="odd">
<th scope="row"><a href="./click_info.php?id=<?php echo $id; ?>"><?php echo number_format($id); ?></a></th>
<td><?php echo $date; ?></td>
<td><?php echo $time; ?></td>
<td><?php echo $visitor_ip; ?></td>
<td><?php echo shortenURL($disp_url); ?></td>
<td><a target="_blank" href="http://<?php echo $url; ?>"><?php echo $targ_url;?></a></td>
</tr>
<?php } /* End the loop. */ ?>
ส่วนที่เพิ่มจากต้นแบบแรกสุดคือ
$targ_url = $row['targ_url'];
$arr=explode(" ",$targ_url);
$url=$arr[count($arr)-1];
แล้วก็
<td><a target="_blank" href="http://<?php echo $url; ?>"><?php echo $targ_url;?></a></td>
ข้างล่างๆนะครับ สำหรับไฟล์ archive.php ก็แก้ได้เหมือนกัน แต่อย่าลืมเพิ่มตรงนี้ด้วย
<thead id="greythead">
<tr>
<th scope="col">Click ID</th>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">IP Address</th>
<th scope="col">Display Page URL</th>
<th scope="col">Target Ads</th> </tr>
</thead>
จริงๆอยากให้มัน group ตามเว็บเหมือนกัน เพราะว่า adsense มัน group เหมือนกัน
ผมสงสัยแฮะ บางอันไม่เป็น go to แต่เป็น View ads