hi i have a vps windows server 2008 i installed php on it
i want use httputils2 or http or some method to tell server a link of a webpage
and server download that and return utf-8 of the webpage to the user b4a
i konw httputils2 download method can do this directly
but some webpage in my country very slow like google image
i want solve this problem by server
i found this code on the web
how can i use it i am new in webserver
if this code wrong tell me tnx alot
i want use httputils2 or http or some method to tell server a link of a webpage
and server download that and return utf-8 of the webpage to the user b4a
i konw httputils2 download method can do this directly
but some webpage in my country very slow like google image
i want solve this problem by server
i found this code on the web
how can i use it i am new in webserver
if this code wrong tell me tnx alot
B4X:
function get_url_contents($url){
$crl = curl_init();
$timeout = 5;
curl_setopt ($crl, CURLOPT_URL,$url);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
$ret = curl_exec($crl);
curl_close($crl);
return $ret;
}