The Un-Official Proxomitron Forum

Full Version: can't we create our own global values ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been playing around using the Count.ptxt files and stuff to test out a site,
the problem is, these counters only assign counters and values which are flushed away after the request is finished.

My question is quite simple, ain't there a global value we can assign which remembers it's current values until Proxo is closed/restarted ?

I'm fiddling with the counter files trying to keep track how many times I have visited a certain url during the day, but i don't seem to find any variable that remains in memory and that we can alter using for example some counter.ptxt filter ?

Please, Am I missing something, or is there really not an option to do this ?
(Jan. 24, 2014 09:11 PM)Toppy Wrote: [ -> ]My question is quite simple, ain't there a global value we can assign which remembers it's current values until Proxo is closed/restarted ?

There ain't.

(Jan. 24, 2014 09:11 PM)Toppy Wrote: [ -> ]trying to keep track how many times I have visited a certain url during the day

(Jan. 24, 2014 09:11 PM)Toppy Wrote: [ -> ]Please, Am I missing something, or is there really not an option to do this ?

I can think of options.

Easiest would be to use the "Hits" column of the Proxomitron's http://local.ptron/.pinfo/lists/list-name-here page . For instance, http://local.ptron/.pinfo/lists/Bypass-List shows me 27 requests for "local.ptron" this session.

You would need a list match to increment the column. You could have a list of the urls that you wish to monitor.



Next would be creating a pseudo global variable with a list.
Set the list to nohash.
Each list entry represents a visit.
Each visit adds a list entry.

You would need to have an expression create the list.

An example list

Code:
#nohash

local.ptron $SET(visits=1)(^)
local.ptron $SET(visits=2)(^)
local.ptron $SET(visits=3)(^)
local.ptron $SET(visits=4)(^)

or even just

Code:
#nohash

$SET(visits=1)(^)
$SET(visits=2)(^)
$SET(visits=3)(^)
$SET(visits=4)(^)

if the list were exclusive to one url.

Explanation,
"nohash" tells the Proxomitron to use the list as written.
$SET(visits= ) creates the variable, even if the expression fails to match.
(^) never matches.
So, after the list is called, "visits" can contain the last entry's value.

This list could be temporary (in ram) or permanent (on disk).

Details depend, many variations are possible.
Sidki uses PrxFail$TST() for (^)

HTH
Thanks for the explanation JJoe, unfortunately this knowledge is way above my hat.Sad
(Jan. 30, 2014 04:28 PM)Toppy Wrote: [ -> ]Thanks for the explanation JJoe, unfortunately this knowledge is way above my hat.Sad

Nah, I'm sure my explanation was inadequate. Smile!

In the Proxomitron exe folder create a folder URLWatch.
In URLWatch folder create a file URLWatch.txt.
In URLWatch.txt add something like

Code:
# $LST(URLWatch)
# Purpose: URLs matched will index Hits column on
#  http://local.ptron/.pinfo/lists/URLWatch
#
# Suggested Use: Add $LST(URLWatch)(^) to Bypass List


[^/]++.yahoo.com

In "Bypass List.txt" add

Code:
$LST(URLWatch)(^)

On the Proxomitron's Main dialog click "Config", click "Blockfile", click "Add", navigate to URLWatch.txt, name the Blockfile "URLWatch", click ok.

http://proxomitron.info/45/help/Mainscreen.html
http://proxomitron.info/45/help/CfgT4.html#foo

Visit www.yahoo.com

View http://local.ptron/.pinfo/lists/URLWatch

I see 90 scans and 4 hits.
So, it looks like 1 hit for www.yahoo.com and 3 to associated yahoo.com addresses.

Don't forget to save new config, if you like.

Better?
Reference URL's