Search code examples
phpashx

php file_get_contents from ashx url


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;

Solution

  • 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);
    ?>