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

227
Vistas
the code of some page is cut when using curl or display the source code of the page

I explain my problem to you:
When I do PHP curls on some site or want to display the source code of the page element is missing a lot. I think some part is called by a script or something.
Could someone help me view the entire code with Curl PHP.


To duplicate my problem go to Facebook or LinkedIn and right click on the page and "View the source code of the page", in this you don't see all the page content but when for example you right click and "inspect an element" You can. Thank you in advance

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

CURL can't do this. It's not designed to render HTML or execute JavaScript.

A lot of the content on Facebook, LinkedIn, Twitter and many other pages is loaded through different ways. (like fetch()-requests or WebSocket-Events)

Some nodes you can see in the inspector are not part of the original document (which you are viewing with "view source" or curl downloads). What you see on the inspector is everything currently held in memory, which was partially (or completely) created with a scripting language.

This is basically done to

  • reduce the load on servers as it doesn't have to generate the whole page on every request
  • reduce traffic on clients and servers (no need to reload the header-data and/or scripts over and over again)

If you need data from a rendered site, you should either check if the website provides an API which gives you the data you are looking for or use one of the cli-rendering-engines from this answer.

about 4 years ago · Juan Pablo Isaza Denunciar
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