It is currently September 23rd, 2020, 11:56 am

Using a measure as Url for WebParser

Help with creating, editing & fixing problems with skins
Miyako
Posts: 23
Joined: November 10th, 2009, 4:17 pm
Location: Antwerp, Belgium

Using a measure as Url for WebParser

Post by Miyako »

Hi, I'm trying to find an easy way to make a calendar skin by a PHP-script I wrote. The only input it needs is the current day, month and year but that's where my problem begins. Is it possible to use a measure in the Url for a WebParser?

Something like this for example:

Code: Select all

Url=http://localhost/calendar.php&d=[MeasureDay]&m=[MeasureMonth]&y=[MeasureYear]
I tried it already several times but it's acting really strange. The value of the WebParser-data is returning my [MeasureYear] (or if I use another measure it will show that one) but not the result.

This is what my measures look like:

Code: Select all

[MeasureUrl]
Measure=Time
Format=http://localhost/Calendar/calendar.php?d=%d&m=%m&y=%Y
UpdateDivider=6000

[MeasureData]
Measure=Plugin
Plugin=Plugins\WebParser
Url=[MeasureUrl]
RegExp=(?siU)<y>(.*)</y>
StringIndex=1
UpdateRate=6000
I'm sure the problem is not the webpage because when I enter normal digits (not measures) it works fine.
User avatar
kenz0
Developer
Posts: 264
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: Using a measure as Url for WebParser

Post by kenz0 »

Miyako wrote:Is it possible to use a measure in the Url for a WebParser?
Something like this for example:
Url=http://localhost/calendar.php&d=[MeasureDay]&m=[MeasureMonth]&y=[MeasureYear]
Unfortunately, it is impossible at the present time.
.
Image
User avatar
jsmorley
Developer
Posts: 21386
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using a measure as Url for WebParser

Post by jsmorley »

kenz0 wrote: Unfortunately, it is impossible at the present time.
Are you quite sure there is no way he can do this? It seems pretty similar to: http://rainmeter.net/cms/Tips-WebParserImageRelative which does work.
User avatar
kenz0
Developer
Posts: 264
Joined: July 31st, 2009, 2:23 pm
Location: Tokyo, JPN

Re: Using a measure as Url for WebParser

Post by kenz0 »

jsmorley wrote:Are you quite sure there is no way he can do this? It seems pretty similar to: http://rainmeter.net/cms/Tips-WebParserImageRelative which does work.
Because uses are different in this case, that method is useless, and it has some limits.

1). Url=http://example.com/[Measure].html
You can handle such URL as download URL. However, you cannot parse from this URL as a source. I mean you can only download a file.

2). Url=http://example.com/[Measure1]&[Measure2]&[Measure3].html
You cannot include multiple [Measure] in URL like ↑
.
Image
User avatar
jsmorley
Developer
Posts: 21386
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Using a measure as Url for WebParser

Post by jsmorley »

kenz0 wrote: Because uses are different in this case, that method is useless, and it has some limits.

1). Url=http://example.com/[Measure].html
You can handle such URL as download URL. However, you cannot parse from this URL as a source. I mean you can only download a file.

2). Url=http://example.com/[Measure1]&[Measure2]&[Measure3].html
You cannot include multiple [Measure] in URL like ↑
I see. That makes sense.