Testei, me retorna isso no console (No localhost:8001):
localhost/:1 Access to fetch at 'http://localhost:8003/destino.php' from origin 'http://localhost:8001' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. (índice):12
Uncaught (in promise) TypeError: Failed to fetch at doRequest ((índice):12:9) at (índice):21:7 doRequest @ (índice):12 (anônimo) @ (índice):21 Promise.then (assíncrono) doRequest @ (índice):18 (anônimo) @ (índice):21
(índice):18 Warning: file_get_contents(http://localhost:8003/destino.php): Failed to open stream: Cannot assign requested address in /var/www/html/proxy.php on line 28 Warning: Undefined variable $http_response_header in /var/www/html/proxy.php on line 29 Warning: foreach() argument must be of type array|object, null given in /var/www/html/proxy.php on line 31
Está usando qual navegador?
Coloquei online em https://inteligenciaplena.com.br/teste/proxy.php e não me retornou mais esse erro, talvez seja a verão do php local! Mas como pode ver no console ainda tenho erros relacionados a Compartilhamento de Recursos de Origem Cruzada: https://inteligenciaplena.com.br/teste/proxy.php?url=https://joveminventor.com.br/
São referentes a recursos do site, como css e js... Como poderia resolvê-los? Talvez mudar o url para mandar para o proxy, isso seria viável?