Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save Bhavya8181/846dee45006d56f930154a389d7e424d to your computer and use it in GitHub Desktop.

Select an option

Save Bhavya8181/846dee45006d56f930154a389d7e424d to your computer and use it in GitHub Desktop.
try {
$result = '';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'http://54.185.108.244:5000/doAIImageProcessing?img_URL=' . $image_url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
));
$response = curl_exec($curl);
$httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($httpcode == 200) {
$result = $response;
}
} catch (\Exception $e) {}
//dd($result, $httpcode, $image_url);
return $response;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment