someone told me to use CURL to bypass cloudflare for getting text on a site so i tried it but i just cant understand how i echo out
$link1 = "http://habmoon.org/moonstream/djlook?habbie={$r->habbo}";
$link2 = "https://www.habbo.com/habbo-imaging/avatarimage?figure={$link1}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $link1);
curl_exec($ch);
curl_close($ch);
The only thing it shows is $link1 because i dont know how to echo out the text from curl_setopt($ch, CURLOPT_URL, $link1);
in $link2.
Hello friend you need to use CURLOPT_RETURNTRANSFER to get the request output:
$ch = curl_init();
$opts = [
CURLOPT_URL => 'a site',
CURLTOP_RETURNTRANSFER => TRUE
];
curl_setopt_array($opts);
$response = curl_exec($ch);
var_dump($response);
And remember, if you need to request a https use a ca file or:
CURLOPT_SSL_VERIFYPEER => FALSE
CURLOPT_SSL_VERIFYHOST => FALSE
Good luck.