1
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://www.rlsnet.ru/tn_alf_letter_1.htm');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$data = curl_exec($ch);
echo $data;
exit;

I use this code on my windows machine and the page is loaded well with code 200 ok, but if I put this code on my hosting linux, then I get 404 error, what can be the reason of that?

René Höhle
  • 26,716
  • 22
  • 73
  • 82
yeah its me
  • 1,131
  • 4
  • 18
  • 27

1 Answers1

0

Perhaps its easier to use file_get_contents if you only need the content of the page.

Sometimes curl is not enabled or its a bug in the curl module.

<?php
$res = file_get_contents('http://www.rlsnet.ru/tn_alf_letter_1.htm');
echo $res;
René Höhle
  • 26,716
  • 22
  • 73
  • 82