darkdmr Posted December 31, 2006 Share Posted December 31, 2006 About my site:Google finds it by some keywords. I want to make a php script to get the keyword by the GOOGLE URL.For examplehttp://www.google.bg/search?q=sportingbet+info&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:officialI see it found me by the keyword "Sportingbet info".I try it that way :preg_match_all ('/q=(.+)&/', $url, $matches)but in matches it returns :q=sportingbet+info&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:officialHow to make it returnq=sportingbet+info10x. Link to comment https://forums.phpfreaks.com/topic/32405-solved-reg-exp-for-google-keywords/ Share on other sites More sharing options...
darkdmr Posted December 31, 2006 Author Share Posted December 31, 2006 I solved it by replacing (.+) with (.+?) Link to comment https://forums.phpfreaks.com/topic/32405-solved-reg-exp-for-google-keywords/#findComment-150510 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.