Jump to content

curl instead of fopen?


superkeest

Recommended Posts

I have a script that uses fopen, except the site doesn't allow it.

does any one know how i can rewrite this using curl?

 

f(isset($_REQUEST['l']) && $_REQUEST['l'] <> ''){
$link = VAR.'/blah/blaf/blah/'.rawurlencode($_REQUEST['l']).'/blah/1';
$fp = fopen($link,'r');
foreach($http_response_header as $v){if(substr($v,0,7)=='Content'){header($v);}}
fpassthru($fp);
fclose($fp);
}else{echo 'Parameters not set';}

 

Im kindof a noob.

Link to comment
https://forums.phpfreaks.com/topic/213083-curl-instead-of-fopen/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.