I got it.
after test that code you give me , it tell me this "PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in" so it has to be no open_basedir in the code and it worked.
thank you for your help
after test that code you give me , it tell me this "PHP Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set in" so it has to be no open_basedir in the code and it worked.
thank you for your help