Error 403 from Google Calendar? Upgrade to the new Google Calendar support. See here for details. close
Welcome, Guest
Please Login or Register.    Lost Password?

dynamic URL and regular expression
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: dynamic URL and regular expression
#9623
dynamic URL and regular expression 5 Years, 7 Months ago  
I am attempting to create a geo-location weather skin.

I have the following code to retrieve, public ip, city, state, country

Code:

[MeasurePublicIP]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=http://www.find-ip-address.org/
;http://www.geoip.co.uk/
RegExp="ip \+\= "IP Address Lookup Location:";\n\t+ip \+\= "(.*?)";\n\t+ip \+\= "(.*?) \((.*?)\) in (.*?)

[MeasureLocation]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasurePublicIP]
StringIndex=2

[MeasureLocation2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasurePublicIP]
Substitute=" ":"_"
StringIndex=3

[MeasureLocation3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
URL=[MeasurePublicIP]
StringIndex=4



stringindex2 = city
stringindex3 = state
stringindex4 = country
Code:


[MeasureWeather]
Measure=Plugin
debug=2
Plugin=Plugins\WebParser.dll
URL=http://www.weather.com/outlook/weatherbystate/west_virginia-b
RegExp="/weather/local/(.*?)">Beckley"
StringIndex=1
UpdateRate=3600



I'm looking for how to modify the URL so that
west_virginia is provided by stringindex3
b is povided by left(stringindex2,1)
Beckley is provided by stringindex2

Is there a way to dynamically create the URL and regular expression?

I've tested the hardcoding and this would provide me with proper location code again, I would have to provide it as a dynamic input to the xoap.weather lookup.
beakmyn
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/04/08 07:53 By beakmyn.
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop