This is my code and when running from my program it keeps replacing the . with _
<?php
if(!isset($_GET["fig"]) || empty($_GET["fig"])) {
echo "No fig request";
exit;
}
$ch = curl_init("https://www.habbo.com.br/habbo-imaging/avatarimage?hb=img&figure={$_GET["fig"]}&action=wav&direction=2&head_direction=3&size=m");
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => false,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => "",
CURLOPT_USERAGENT => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36",
CURLOPT_AUTOREFERER => true,
CURLOPT_SSL_VERIFYPEER => false
));
$content = curl_exec($ch);
$type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
curl_close($ch);
if(!isset($content) || empty($content) || strpos($content, 'Not Found') !== false) {
echo "Not found!";
exit;
}
header("Content-Type: {$type}");
echo $content;
?>
I've tried doing this
$figure = str_replace('_', '.', $_GET["fig"]);
$ch = curl_init("https://www.habbo.com.br/habbo-imaging/avatarimage?hb=img&figure={$figure}&action=wav&direction=2&head_direction=3&size=m");
But it just doesn't seem to want to fix the issue that I'm having and I can't seem to figure out why so if anyone would be able to help me fix this it would be greatly appreciated