[請益] 有關於禁止其他人抓html原始碼的問題
PHP 瀏覽其他網頁的html原始碼,方法很多
我找版上的的方法就一堆
舉例來說
<?
header('Content-Type: text/html; charset=utf-8');
$search_url = "網址";
$page = implode('', file($search_url));
echo $page;
?>
<?
$html = file('網址');
echo $html;
?>
<?
$url = "網址";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$content = curl_exec($ch);
echo $content;
?>
<?
$url = "網址";
$content = file_get_contents("$url");
echo $content;
?>
但是我用這些方法,去瀏覽露天拍賣的網站的時候,都會出現
HTTP request failed! Access Deny!! Detect your Browser to install malicious
plug-in or Illegal access
請問一下,我用上述的方法去瀏覽其他網站都算malicious的嗎?
再問一下,露天這樣的防禦手法,要如何撰寫?
這樣的話PHP是不是就永遠抓不到露天拍賣的html原始檔?
我的測試我的露天測試網址是
http://search.ruten.com.tw/search/s000.php?searchfrom=headbar&k=wii&t=0
是尋找Wii的賣家
請各位高手為小弟我解答,謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.130.189.30
→
07/08 18:20, , 1F
07/08 18:20, 1F
→
07/08 18:23, , 2F
07/08 18:23, 2F
→
07/08 18:23, , 3F
07/08 18:23, 3F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):