Non-one has the answer?
Thread: PHP genius needed |
I need help from a PHP master!
I am trying to get the search keywords from a google image search result but am having great problems.
Here is an example of the referral url:
The words in red show where the search keywords are in the string. I need to extract those so that I can save them in a database, how can this be done?Code:http://images.google.it/imgres?imgurl=http://www.eaguingamp.co.uk/wp-content/uploads/2009/03/logo_coupe_de_france.jpg&imgrefurl=http://www.eaguingamp.co.uk/2010/02/09/cdf-boulogne-a-preview/&usg=__GhT0TcW-SiSBtx6-TuR_EKQB-Uw=&h=241&w=237&sz=38&hl=it&start=6&sig2=alRzLqtodZqLOEb0dgbVlw&um=1&itbs=1&tbnid=6Mz7HeF8nEFv7M:&tbnh=110&tbnw=108&prev=/images%3Fq%3Dcoupe%2Bde%2Bfrance%26um%3D1%26hl%3Dit%26sa%3DN%26tbs%3Disch:1&ei=8FuOS5HYOIuI_Aa3gO3kDA
I have tried using preg_match but I am hopeless with it. Hope someone can help ASAP
Non-one has the answer?
I'd try this preg pattern: "/%3D(.+?)%26/", that way, you get out "coupe%2Bde%2Bfrance"
then I'd do a explode on "%2B" to get all parts of the query.
__________________________________________
Ask me: Orjan | Contribute to the Wiki! | Make your own Programming blog!
I usually play eRepublik and Travian when I'm not on CodeCall
There are currently 1 users browsing this thread. (0 members and 1 guests)