2

We're running the following php code:

function downloadwebsite($url, $nobody=false) {

$ch = curl_init();

// FLAGS
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_NOBODY, $nobody);
curl_setopt($ch, CURLOPT_HEADER, $nobody);

$content = curl_exec($ch);  
curl_close($ch);

return $content;
}


$website = downloadwebsite("www.imdb.com", true);
echo nl2br($website);

At one line in the response it says: "Cneonction: close". Why is it misspelled? Is it on purpose?

AntonNiklasson
  • 1,719
  • 1
  • 15
  • 28

1 Answers1

3

According to this StackOverflow thread, it's done on purpose for load balancers. It's done to help with keepalives, it seems.

Community
  • 1
  • 1
Carlos
  • 1,897
  • 3
  • 19
  • 37