[Slogger] Feature request: submit to custom script
Ken Schutte
kschutte at csail.mit.edu
Sun Jan 7 08:05:32 PST 2007
Robin Smidsrød wrote:
> I've recently started using slogger, and it looks great.
>
> But as I am a bit skeptical to divulging browsing history to any third
> party, I was wondering how I could go about submitting the URLs to a
> custom CGI script I'm going to build myself using either PHP or
> Perl/Catalyst or some other simple web application framework and run
on my own server.
>
Robin,
This should be possible with a fairly short Custom Script. Try
something like this: (and select "run at the end of loggin process"):
var url = "http://mylogprog.xxx?";
url += "&title=" + sloggerGetVar("title");
url += "&url=" + sloggerGetVar("url");
url = encodeURI(url);
// alert(url);
var req = new XMLHttpRequest();
req.open('GET', url, true);
req.send(null);
The first, construct the URL you want with sloggerGetVar() and
encodeURI(). Uncomment the 'alert' call to debug. To make the request,
you can use XMLHttpRequest. I think the above should basically work,
but I haven't tried this.
Handling the GET responses would be more complicated. See,
http://developer.mozilla.org/en/docs/XMLHttpRequest
good luck,
Ken
More information about the Slogger
mailing list