Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

78
Vistas
Local http/https request via Javascript with PHP

I want to make requests to an esp32 at the clients location (local-network). The Idea is to control an esp32 via the webbrowser. I want to use PHP for the backend. How can I control the esp32 without using a forwarded port.

My idea was to let a javascript-script make the http call to the local-ip from the esp32 with a simple http server on it. Localy it worked, but I wondered if this is still working if the server is outside of my local network, but I dont have a webserver, so ive uploaded a test file to github pages and tried to access my esp32 via githubpages. But unfortunately the request got blocked:

Even though the initial HTML page is loaded over a secure HTTPS connection, some resources like images, stylesheets or scripts are being accessed over an insecure HTTP connection. Usage of insecure resources is restricted to strengthen the security of your entire site. To resolve this issue, load all resources over a secure HTTPS connection.

Ive installed a basic https server on the esp32: https://techtutorialsx.com/2019/04/07/esp32-https-web-server/

but i got the same error again.The request is made in this code:

document.write("Mate");
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://ip_esp32/", false);

xmlHttp.send(null);
document.write("Try:" + xmlHttp.responseText);

How can I make a request with javascript without using Node.js? If this is not possible, can I controll the local esp32 otherwise with PHP?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda