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. Quote 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 Quote 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? Quote 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! Quote 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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/166110-file_get_contents-filtering/#findComment-876067 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.