ChiragJhaveri Posted September 8, 2015 Share Posted September 8, 2015 Hi, I am learning PHP and trying to read webpages using PHP. I am trying to read http://www.sonyliv.com/channel/sony-sab The problem is that the website doesn't load all the shows until you scroll down. It slowly loads the shows when you scroll down. Is there any way to handle this and get the complete list via PHP? I believe it uses java script to load the following data. However I am very new and not sure how to handle this. Please help........ Thanks Quote Link to comment https://forums.phpfreaks.com/topic/298091-php-file_get_contents-for-lazy-loading-websites/ Share on other sites More sharing options...
QuickOldCar Posted September 8, 2015 Share Posted September 8, 2015 I you have permission to scrape the contents of this site, the owner of that site can supply you a better means to get the data as in a feed or api. Otherwise....nope. Quote Link to comment https://forums.phpfreaks.com/topic/298091-php-file_get_contents-for-lazy-loading-websites/#findComment-1520469 Share on other sites More sharing options...
hansford Posted September 8, 2015 Share Posted September 8, 2015 If they waned their content to be shared they would have an API which you could tap into. Site scraping can open you up to legal battles etc.. Not a place a legitimate web development operation wants to be. Quote Link to comment https://forums.phpfreaks.com/topic/298091-php-file_get_contents-for-lazy-loading-websites/#findComment-1520480 Share on other sites More sharing options...
scootstah Posted September 8, 2015 Share Posted September 8, 2015 You could manually build the offset yourself and send a request for each "page". Quote Link to comment https://forums.phpfreaks.com/topic/298091-php-file_get_contents-for-lazy-loading-websites/#findComment-1520487 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.