I guess I wasn't clear on what I want to do.

Yes I understand s.htm, but s.htm doesn't do what I want to do. Instead I 
need to make a small modification to the actual code in datasource.cpp where 
it presents cached documents which ultimately sends the output of this to 
the template.

In the actual code, aspseek sends the "BASE" header with this statement:

aspseek_printf(r, "<BASE HREF=\"%s\">\n", url.c_str());

The above statement simply prints this at the top of the page so graphics 
and everything appear correctly. This is what it prints:

<BASE HREF="http://cached.url/";>

So that means this "url.c_str()" contains the URL for the document being 
presented. If this "url.c_str()" means the URL, how can I fetch what I need 
so I can do my "own" thing? Information I need to use is:

last_modified
charset
docsize

If I can get this information I would then write something like this in 
datasource.cpp:

aspseek_printf(r, "This is the guys URL: \"%s\"\n", url.c_str());

aspseek_printf(r, "last_modified on: \"%s\"\n", last_modified.c_str());

aspseek_printf(r, "Charset is: \"%s\"\n", charset.c_str());

aspseek_printf(r, "Document size is: \"%s\"\n", docsize.c_str());

I might not even use the template to print the top. Get the idea?

I don't belong in the development list because I'm not a developer. I'm just 
a hacker trying to fetch out specific information about the document that 
does not appear to be available in the s.htm (like the charset of the 
document. At the time of indexing this information is stored in the database 
worldurlnn field name charset. So the information is there, but how do I get 
at it?

So that's what I want to do. Can anyone help me?

Thanks,
John

J and T wrote:
>
>Just hacking away and wondering how to extract different information.
>Example;
>
>In datasource.cpp when printing the cache there is this line:
>
>aspseek_printf(r, "<BASE HREF=\"%s\">\n", url.c_str());
>
>in the "CTcpDataSource::PrintCached(aspseek_request *r, CCgiQuery& query)"
>function. Now what I want to do is fetch something else. What I would like
>to fetch is a couple of other things like this about the cached site:
>
>last_modified
>charset
>docsize

You are looking at the wrong place. The right place is manual page s.htm(5).

Say, $DD in s.htm gives you last modification date.
$DS - document size in bytes.
$DB - document size in kilobytes.
$DZ - contents of template section sizeb if document size
is less than 1024, otherwise contents of template section sizek.
$DC - document Content-type (like text/html). May include charset info.

See http://www.aspseek.org/man/s.htm.5.html#lbAF

end

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Reply via email to