static string transformEPNRSSUrl(string inputUrl) { string transformed = "http://rest.ebay.com/epn/v1/find/item.rss?"; //split url by ? string[] splitUrl = inputUrl.Split(new char[] { '?' }); //split second by & string[] splitParams = splitUrl[1].Split(new char[] { '&' }); //new params string newParams = ""; //transform params foreach (string s in splitParams) { string retID = ""; string retVal = ""; string[] sV = s.Split(new char[] { '=' }); //mostly :p retVal = sV[1]; //see if tis required if (sV[0] == "sacat") { retID = "categoryId1"; } if (sV[0] == "satitle") { retID = "keyword"; } if (sV[0] == "afepn") { retID = "campaignid"; } if (sV[0] == "customid") { retID = "customid"; } if (sV[0] == "saprclo") { retID = "minPrice"; } if (sV[0] == "saprchi") { retID = "maxPrice"; } if (retID != "") { if (newParams != "") { newParams += "&"; } //for all but first newParams += retID + "=" + retVal; } //last few additions 24/06/2011 if (sV[0] == "fts" && sV[1] == "2") { newParams += "descriptionSearch=true"; } if (sV[0] == "sascs" && sV[1] == "2") { newParams += "listingType1=AuctionWithBIN&listingType2=FixedPrice"; } } transformed += newParams; //following is some defaults for me, check these yourself, use: //http://woodylabs.com/scripts/ebay-epn-rss-url-converter.php transformed += "&sortOrder=EndTimeSoonest&programid=15&toolid=10039&listingType1=All&lgeo=1&feedType=rss"; return transformed; }