shergold Posted July 15, 2009 Share Posted July 15, 2009 Hey, i was just wondering if anyone could give me a way to get specific data from file_get_contents, basicly there is a page that says Hours played: amountoftimehere. how can i filter the the webpage to get just the text after the hours played?. Thanks, Shergold. Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/ Share on other sites More sharing options...
shergold Posted July 15, 2009 Author Share Posted July 15, 2009 bump Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/#findComment-876034 Share on other sites More sharing options...
shergold Posted July 15, 2009 Author Share Posted July 15, 2009 Anyone? Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/#findComment-876040 Share on other sites More sharing options...
jsschmitt Posted July 15, 2009 Share Posted July 15, 2009 I tried, but couldn't come up with anything... sorry! Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/#findComment-876047 Share on other sites More sharing options...
shergold Posted July 15, 2009 Author Share Posted July 15, 2009 no problem Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/#findComment-876056 Share on other sites More sharing options...
mattal999 Posted July 15, 2009 Share Posted July 15, 2009 Well, this is only a theory, but it may work, but you need to know how far in the data you need is (in bytes ). 1) Use cURL, for a start. 2) Use the curl option: CURLOPT_RANGE or something like that. May be CURLOPT_RESUMEFROM 3) Then you have the data you need, without downloading loads of extra bytes. This is just theory, may not even be possible this way. Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/#findComment-876067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.