darjsuas Posted June 16, 2010 Share Posted June 16, 2010 Ok now there is a problem, that I need to copy dynamicaly generated web pages text (it must work like search crawler). In simple pages it's not difficult, just opening the webpage with fopen() or file() and copying content to array. And the thing is that text is equal to browsers outputed view->page source and in dynamically generated web pages there are no needed text for me using this functions. What I need is text that browser outputing with function view selection source. How can I copy geberated text? Please help me, I don't now where to start. Thank you in advance Link to comment https://forums.phpfreaks.com/topic/204917-how-to-copy-dynamically-generated-web-page-source/ Share on other sites More sharing options...
trq Posted June 16, 2010 Share Posted June 16, 2010 You just need to call the file in question via a url. This will allow the server to process the php and will return any dynamically generated html. $text = file_get_contents('http://domain.com/file.php'); Link to comment https://forums.phpfreaks.com/topic/204917-how-to-copy-dynamically-generated-web-page-source/#findComment-1072829 Share on other sites More sharing options...
darjsuas Posted June 16, 2010 Author Share Posted June 16, 2010 Thanks for the reply, but that doesn't work, maybe I described problem in bad way. I try to cover it with couple examples. First picture is what I get, second is what I need. I gues, maybe it's difficult or impossible to build solution in php, but I don't know what language could help me. [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/204917-how-to-copy-dynamically-generated-web-page-source/#findComment-1072853 Share on other sites More sharing options...
trq Posted June 16, 2010 Share Posted June 16, 2010 Source code that is manipulated by Javascript client-side does not show up within the normal source because it needs to be parsed by the browsers Javascript engine which then manipulates the dom. I'm not sure you could capture this without using some sort of browser plugin. Link to comment https://forums.phpfreaks.com/topic/204917-how-to-copy-dynamically-generated-web-page-source/#findComment-1072882 Share on other sites More sharing options...
darjsuas Posted June 16, 2010 Author Share Posted June 16, 2010 well, I gues I need to try some open source crawlers ant maybe I'll find fitiing to me. thanks alot for the help Link to comment https://forums.phpfreaks.com/topic/204917-how-to-copy-dynamically-generated-web-page-source/#findComment-1072965 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.