gr8gatzb Posted January 31, 2010 Share Posted January 31, 2010 I am trying to create something like this: http://dayprime.com/?q=apple The box at the top is taking data (the first paragraph) and a picture from wikipedia based on a keyword. However, when I use the opensearch action in the wikipedia API (http://en.wikipedia.org/w/api.php), it returns just one line and a much smaller picture. Any ideas or code or links to show me how I can take an image and the first paragraph of a wikipedia article? Thanks! Link to comment https://forums.phpfreaks.com/topic/190485-wikipedia-api-with-php/ Share on other sites More sharing options...
plznty Posted February 1, 2010 Share Posted February 1, 2010 Preg_match can look through domains contents and extract data that you select. http://php.net/manual/en/function.preg-match.php Although it is fairly slow, however gets the job done. Link to comment https://forums.phpfreaks.com/topic/190485-wikipedia-api-with-php/#findComment-1004972 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.