0

I am trying to list the contents of a webpage contents using file_get_contents. Page type seems to be a ashx?

However if I were to use a url such as http://stackoverflow.com/questions/3629504/php-file-get-contents-very-slow-when-using-full-url. it works

the code

$lines = file_get_contents('http://finviz.com/screener.ashx?v=321&f=sh_price_u1&r=11');
echo $lines;
hakre
  • 193,403
  • 52
  • 435
  • 836
chineerat
  • 97
  • 2
  • 12
  • 1
    it generates simple html so you can easily do what you want to –  Oct 20 '11 at 10:49
  • also you get your html in just one line, if you want to get it line-by-line you should use [file](http://php.net/file) –  Oct 20 '11 at 10:56
  • So what's wrong? What happens that isn't supposed to or doesn't happen that is supposed to? – daiscog Oct 20 '11 at 12:39

1 Answers1

1

Please try the below code, the file length should be increased

Please find the function load() and call it,

<?php
$url = "http://finviz.com/screener.ashx?v=321&f=sh_price_u1&r=1";
$result = load($url,$options);
print_r($result);
?>
Ashok KS
  • 365
  • 2
  • 14