~~NOCACHE~~ ====== Colorimetry ====== $options = [ CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => "", CURLOPT_CONNECTTIMEOUT => 3, CURLOPT_TIMEOUT => 3, CURLOPT_MAXREDIRS => 10, CURLOPT_NOSIGNAL => 1, ]; if (isset($_FILES["file"])) { $file = file_get_contents($_FILES["file"]["tmp_name"]); $options[CURLOPT_POST] = true; $options[CURLOPT_POSTFIELDS] = ["file" => $file]; } $ch = curl_init("127.0.0.1:8165"); curl_setopt_array($ch, $options); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $content = curl_exec($ch); if ($content === false) echo "Error: " . curl_error($ch); else echo $content; curl_close($ch);