I know this question has been asked a lot, however the issue I'm facing is quite specific and there aren't any topics covering this particular problem.
I'm currently using: file_put_contents("$writeFile, file_get_contents($website)) to download websites. My aim is to create a simple website that merges two websites on top or beside each other (I find this extremely useful for "potato" quality devices, and it's for practice purposes).
However, it does not seem to be downloading the websites completely. If you try downloading Google's front page with the method above, then try again downloading by just using Ctrl + S and saving as HTML, the output is visibly different. The downloaded website using the method above seem to be missing the newer layout and some sripts. However, the traditional Ctrl + S method seem to be doing fine (with exception to broken links, which I am writing a code to fix).
What is causing the impartial downloads using the PHP method? How do I get PHP to download websites completely, just like how websites are saved using Ctrl + S?
Aucun commentaire:
Enregistrer un commentaire