Results 1 to 2 of 2

Thread: urlencode help (plz)

  1. #1
    Join Date
    Aug 2005
    Posts
    5

    urlencode help (plz)

    hi guys,
    i'm stumped here
    i'm writing a script for extracting xml info from amazon on music

    the album names that i have to work with have brackets and parenthacies

    like Band Name (REMASTERED) or [REMASTERED]
    some have (UNLEASHED) (2002) etc

    the brackets and parenthacies are giving me errors etc
    amazon xml search don't know what to do with the %28 - %29 etc
    the + works in string for space and %20 i think

    i've tried urlencode() and trim - i'm outta options here

    can someone help me get the P's - B's out of the string?
    i open the text file and assign to array
    then access each one array[0] etc
    album
    artist
    song title
    time

    i'm just doing a search with album and song title

    here is what text i get...
    Album: Hotel California [ORIGINAL RECORDING REMASTERED]

    here is what it looks like in url string after urlencode...
    Title=Hotel+California+%5BORIGINAL+RECORDING+REMASTERED%5D

    i don't know how to get rid of the different %'s

    all help would be greatly appreciated guys
    tx
    RD

  2. #2
    Join Date
    Nov 2000
    Location
    Dublin, Ireland
    Posts
    2,491
    You could try rawurlencode and if that fails try using ereg_replace to replace the symbols.

Posting Permissions

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