PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have problem that when i click to download the contents of a web page to a .doc file only text is getting stored but not images and graphs.The code for that is below.
can you compare the byte size of both documents? SAll you are doing is downloading whatever you have in your server, so they must be the same size. The is nothing in php to give you or not images, so I think you are looking in the wrong place.
When you call a web page, it consists of nothing but the file you call. It is up to the browser (ie your script) to then read and parse the document and figure what other files to read from the servers.
Parse the <img> tags looking for src="XXXXX" and then get each of those as well.
Many sites now use images in the background, so you have to parse the styles, and look for called style sheets (and called style sheets within those called style sheets...)
Now if you are needing the word document to LOOK like you would see it in the browser, well then that is a whole other challenge there, and you are best off looking for a 3rd party script/program to do that for you.