Subversion Repositories php_utils

Rev

Rev 5 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
<?php
2
 
3
define('UA_NAME', 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)');
4
 
5
function file_get_contents2($url) {
6
        $out = array();
7
        exec("vtor -- wget -q -U ".escapeshellarg(UA_NAME)." -O - ".escapeshellarg($url), $out, $code);
8
        if ($code != 0) return false;
9
        return implode("\n", $out);
10
}