itisme Posted August 20, 2007 Share Posted August 20, 2007 I have been told that PHP w/ Curl would allow be to scape and parse information from another site. I am looking to retrieve four lines from: tvkeyz.info and display on the four lines on my internal site. I am looking to just display information in this format: (Last Update: Sun. Aug 19, 2007 8:59 PM EST) 86: 26 5B B7 4E D1 44 ED DE A0 E5 54 A5 0F FE C1 CE 96: FA BF 24 D4 E9 6D CB 23 96 16 41 62 A8 05 37 C5 (Last Update: Mon. Aug 20, 2007 10:15 AM EST) 86: 26 A2 6B 80 A5 79 BD 39 B0 23 86 66 EE A5 03 0E 96: 56 D2 D0 C4 8A BC 0D D0 CA AB 86 5F 83 1A 83 5F I am unable to determine what I need to specify in CURL to pull only those four lines above Quote Link to comment https://forums.phpfreaks.com/topic/65819-php-curl-scrape-format/ Share on other sites More sharing options...
trq Posted August 20, 2007 Share Posted August 20, 2007 Unless you need to login to get this information a simple call to file_get_contents will get you the file into a string. Then all you need do is parse the string using preg_match (or similar) to get the data you want. Quote Link to comment https://forums.phpfreaks.com/topic/65819-php-curl-scrape-format/#findComment-328862 Share on other sites More sharing options...
itisme Posted August 20, 2007 Author Share Posted August 20, 2007 in other words, I can grab the whole page and then use regex to parse? Quote Link to comment https://forums.phpfreaks.com/topic/65819-php-curl-scrape-format/#findComment-328869 Share on other sites More sharing options...
trq Posted August 20, 2007 Share Posted August 20, 2007 Indeed. Quote Link to comment https://forums.phpfreaks.com/topic/65819-php-curl-scrape-format/#findComment-328874 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.