+ Reply to Thread
Results 1 to 3 of 3

Thread: PHP genius needed

  1. #1
    Newbie adzeds is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Bristol, UK
    Posts
    27

    Lightbulb 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:
    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
    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?

    I have tried using preg_match but I am hopeless with it. Hope someone can help ASAP

  2. #2
    Newbie adzeds is an unknown quantity at this point
    Join Date
    Oct 2009
    Location
    Bristol, UK
    Posts
    27

    Re: PHP genius needed

    Non-one has the answer?

  3. #3
    Moderator Orjan is a glorious beacon of light Orjan is a glorious beacon of light Orjan is a glorious beacon of light Orjan is a glorious beacon of light Orjan is a glorious beacon of light Orjan's Avatar
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Age
    35
    Posts
    2,688
    Blog Entries
    7

    Re: PHP genius needed

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. help needed
    By ahmed in forum ASP, ASP.NET and Coldfusion
    Replies: 2
    Last Post: 03-04-2010, 07:18 AM
  2. If you can answer this you are a genius
    By kareem100 in forum C# Programming
    Replies: 4
    Last Post: 12-15-2008, 10:07 PM
  3. Help Needed.
    By snoopy85 in forum PHP Forum
    Replies: 4
    Last Post: 07-20-2008, 05:01 AM
  4. rss fee needed
    By Billy123 in forum MarketPlace
    Replies: 1
    Last Post: 12-21-2007, 12:09 PM