2011-10-20 55 views
0

我想用file_get_contents列出網頁內容的內容。頁面類型似乎是ashx來自ashx url的php file_get_contents

但是,如果我要使用一個網址,如http://stackoverflow.com/questions/3629504/php-file-get-contents-very-slow-when-using-full-url。它的工作原理

代碼

$lines = file_get_contents('http://finviz.com/screener.ashx?v=321&f=sh_price_u1&r=11'); 
echo $lines; 
+1

它生成簡單的HTML所以你可以輕鬆地做你想要的東西 – user973254

+0

也可以在一行中得到你的html,如果你想逐行得到它,你應該使用[file](http:// php .net/file) – user973254

+1

確實有什麼問題? – dmitry

回答

1

請嘗試下面的代碼,文件長度應增加

請查收功能load()並調用它,

<?php 
$url = "http://finviz.com/screener.ashx?v=321&f=sh_price_u1&r=1"; 
$result = load($url,$options); 
print_r($result); 
?> 
+0

這個工程。感謝 載入函數的地址是:http://www.bin-co.com/php/scripts/load/ – chineerat