Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

cURL not working correctly??


ghost's Avatar
0 0

With this as my PHP code to fetch a website, in this case, google.nl

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://www.google.nl/");

curl_exec($ch);

curl_close($ch);

?>

It returns the page http://www.google.nl/

But if I change the google.nl to google.com, and refresh the page, I get

"301 Moved The document has moved here."

I'm hosting this on http://110mb.com/

What could be causing the page to change from A. Loading the page, to B. Telling me that the page was moved


ghost's Avatar
0 0

maybe it's the host, I just did it on xampp and it worked fine.