简体   繁体   中英

With PHP download full html with all files

When I download html code with php by using file_get_contents . I get a part of what I need.

In a page some images and html tag's are created by JavaScrip.

On a chrome by pressing f12 I can find a link, but if I print out php downloaded html there is none. Is there a way to get everything as if it was view on a browser? Or save everything, like on a browser Save as...

you can use wget

wget --page-requisites yourUrl

and use exec or system to invoke through php.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM