:::

16-1 index.php

<?php
$url = "http://www.mobile01.com/";
$ch = curl_init();
$options[CURLOPT_URL]=$url;
$options[CURLOPT_HEADER]=false;
$options[CURLOPT_RETURNTRANSFER]=true;
$options[CURLOPT_USERAGENT]="Googlebot/2.1";
$options[CURLOPT_FOLLOWLOCATION]=true;

curl_setopt_array($ch, $options);
$output = curl_exec($ch);
curl_close($ch);
//echo "<base href='$url'>";
//echo $output;

preg_match_all("/newtopics\[.*\] = \'(.*)';/m", $output, $match);
$main="<table>\n";
foreach($match[1] as $link){
    $list=str_replace("topicdetail.php","{$url}topicdetail.php",$link);   
    $list=str_replace('" title="','" rel="lyteframe" rev="width: 1000px; height: 400px; scrolling: auto" title="',$list);
    preg_match("/title=\"(.*)\"/", $link, $title);
    $main.= "<tr><th>{$title[1]}</th><td>$list</td></tr>\n";
}
$main.="</table>";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel='stylesheet' href='style.css' type='text/css' />
  <title></title>
  <script type="text/javascript" language="javascript" src="lytebox.js"></script>
  <link rel="stylesheet" href="lytebox.css" type="text/css" media="screen" />
  </head>
  <body>
  <div id="news">
  <?php echo $main; ?>
  </div>
  </body>
</html>
 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp27.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D310%26tbsn%3D9

書籍目錄

展開 | 闔起

線上使用者

578人線上 (123人在瀏覽線上書籍)

會員: 0

訪客: 578

更多…