Monday 6 June 2016

How to run URL Using exec, Shell_exec in php

function testf(){
        $url = 'http://www.google.com';
        $outputfile = "jems.html";
        $cmd = "wget -q \"$url\" -O $outputfile";
        exec($cmd);
        echo file_get_contents($outputfile);
    }

No comments:

Post a Comment