I literally have similar cURL scripts running on other areas of this PHP page, and they work just fine. But for some reason, this one is different enough to be causing me problems. No error message, it just doesn't seem to be hitting the endpoint for some reason. Can you see any reason why this wouldn't work?
ob_start();
$destination = "https://www.example.com/record_serial_number.php?serial_number=" . $serial_number . "&employee_name=" . $employee_name . "&scan_purpose=Barcode printed&value=";
$destination = urlencode($destination);
$url = $destination;
$ch = curl_init();
// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "hidden_username:hidden_password");
$response = curl_exec($ch);
curl_close($ch);
$response .= ob_get_contents();
ob_end_clean();