Forum Moderators: coopster
My objective is to figure out how to get the city and state as variables to be used within the RSS formatted URL. This way I can query the feed with a zip code and have a script convert it to city & state.
If you format the URL as follows:
http://domain/search?jumpsearch=1&jq=XXXXX (where X=zipcode)
The site will query the city and state and return a page with local news and the following URL format:
http://domain/city/CITY-ST (example: Baltimore-MD)
In order to get an RSS feed, the site requires the city and state URL and will not accept a zip code version:
http://domain/rss/city/CITY-ST.xml (and notice the added rss subdirectory)
HERE IS THE QUESTION I NEED ANSWERED:
Is it possible to conduct the initial page request 'behind the scenes' with PHP and get the resulting URL as a variable? Then I can parse and reconstruct the resulting URL into the RSS required format.