Page 1 of 2

getting pages walked per base url

Posted: Fri Oct 29, 2004 1:53 pm
by KMandalia
I want to generate a report that will give me no. of pages walked per base url.

I am not quite sure if webinator saves base urls somewhere and if it doesn't,the only way to get the base urls is to do some rex filtering so that I only get back the string upto the first '/'.

Let me know how I can query the html table "efficiently" that would give me the accurate no. of pages walked per base url.

CAN TESTDB AND OPTIONS TABLE HELP?

getting pages walked per base url

Posted: Fri Oct 29, 2004 4:17 pm
by John
The options table in testdb will be able to get a list of base urls. Depending on the URLs you use as base urls you may be able to loop over them, and uses matches, e.g.

select count(*) from html where Url matches 'BASEURL%';

where the % is the wildcard.

getting pages walked per base url

Posted: Mon Nov 01, 2004 12:33 pm
by KMandalia
ok,

what would be the name of the setting that I would use to pull the base urls from options table in the testdb for my profile?

getting pages walked per base url

Posted: Mon Nov 01, 2004 2:01 pm
by mark
SSc_url

Hint: On the settings page look at the url for the ? next to a setting. At the end there's #h_SETTINGNAME

getting pages walked per base url

Posted: Mon Nov 01, 2004 3:15 pm
by KMandalia
got it.

thanks for the hint !

getting pages walked per base url

Posted: Mon Nov 01, 2004 4:43 pm
by mark
Also, the settings in multi-line boxes generally need extra processing. See dowalk's applysettings function for how it processes them. eg SSc_url needs to be broken up into a list:
<split nonempty "\space+" $SSc_url></split>
<$SSc_url=$ret>
Then you can loop over them with
<loop $SSc_url>
...
</loop>

getting pages walked per base url

Posted: Fri Nov 05, 2004 10:11 am
by KMandalia
Trying to get no. of pages walked per base url. I must be doing something wrong. Can you point it out for me?

<script language=vortex>
<timeout=-1></timeout>
<a name=main public urllisting mydb>
<SQL "select String from options where Profile='myprofile' and Name='SS_db'"></sql>
<$mydb=$string>
<SQL "select String from options where Profile='myprofile' and Name='SSc_url'"></sql>
<$urllisting=$string>
<split nonempty "\space+" $urllisting></split>
<$urllisting=$ret>
<loop $urllisting>
$urllisting
<sql db=$mydb "select count(*) No from html where Url matches '%$urllisting%'">
$urllisting,$No
</sql>
</loop>
</a>
</script>

getting pages walked per base url

Posted: Fri Nov 05, 2004 11:07 am
by John
In the quotes the $urllisting loses its meaning. You probably want:

<strfmt "%s%%" $urllisting><$pattern=$ret>
<sql db=$mydb "select count(*) No from html where Url matches $pattern">

getting pages walked per base url

Posted: Fri Nov 05, 2004 12:37 pm
by KMandalia
thanks, John.

It did the job. Very Cool.

getting pages walked per base url

Posted: Tue Nov 09, 2004 10:07 am
by KMandalia
if I split the base url as explained and then take out the http://www. part of it out and if I then do the following

<sort $urllisting>
<$urllisting=$ret>

it doesn't sort... What am I doing wrong?