Closed Thread
Results 1 to 3 of 3

Thread: PHP genius needed

  1. #1
    adzeds is offline Newbie
    Join Date
    Oct 2009
    Location
    Bristol, UK
    Posts
    27
    Rep Power
    0

    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. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    adzeds is offline Newbie
    Join Date
    Oct 2009
    Location
    Bristol, UK
    Posts
    27
    Rep Power
    0

    Re: PHP genius needed

    Non-one has the answer?

  4. #3
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    41

    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.
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

Closed 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. Help needed
    By ahmed in forum Linux Installation & Configuration
    Replies: 6
    Last Post: 02-27-2010, 07:56 AM
  3. 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
  4. help needed
    By aerosmith in forum General Programming
    Replies: 0
    Last Post: 12-22-2007, 07:21 PM
  5. rss fee needed
    By Billy123 in forum MarketPlace
    Replies: 1
    Last Post: 12-21-2007, 12:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts