Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: capture data - html

by dorward (Curate)
on Jun 29, 2006 at 08:55 UTC ( [id://558259]=note: print w/replies, xml ) Need Help??


in reply to capture data - html

I'm going to try to clarify what I think the question is before attempting to answer it:

There are four parties

  • You
  • A provider of webspace (X) that gives very limited access to what you can add to the page
  • A provider of webspace (Y) that lets you run server side Perl
  • A visitor

You want to know when a someone visits your page on site X.

Since you have no access to the logs of X, cannot add JavaScript to X, cannot run server side scripting on X, then the only way to get the information is to cause the visitor to make a request to something on Y.

About the only way to do this is to include an image on that page which is loaded off server Y. This isn't entirely reliable as users can disable iamges, disable images from remote sites, etc, etc

Without putting a seperate URL to the image for each id on X you can't reliably know the ID.

HTTP provides a referer header, this will tell you the URL that referred the user agent to another URL (i.e. the URL of the page that linked to the image).

The referer header is, however, optional and many personal firewall products munge it.

There is no reliable way to do what you want.

Replies are listed 'Best First'.
Re^2: capture data - html
by shmem (Chancellor) on Jun 29, 2006 at 09:12 UTC
    You make good points, but instead of images I would rather include a link to a css residing on Y, which is more likely to be loaded. And then, for IE Browsers there's a way to sneak JavaScript in via a css statement, eg.
    css: a { behaviour: url('http://example.com/sneak.htc'); } sneak.htc: <PUBLIC:ATTACH EVENT="onmouseover" ONEVENT="DoHover()" /> function DoHover() { // JavaScript statements... }
    but as said, that only works with buggy browsers full of holes... ;-)

    But! that could just be cheating the provider and should not be lightly undertaken, and if they have a clue, they may block offsite CSS as well (ah, and offsite images.. ) .

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
      Thanks Shmem....

      I am try this later this afternoon :) I informed the provider that I was able to place a mortgage calculator that I created in perl on their website, that I did not think should be permitted. I guess they dont check for perl because most kids trying to hack sites dont know perl. I would not want to hurt their site in anyway. They are trying to make money and they are offering a free service. Now if it was Bill Gates web site ... hmmmm :)

      Thanks,
      Kevin
Re^2: capture data - html
by kevyt (Scribe) on Jun 29, 2006 at 16:13 UTC
    dorward,

    You are exactly right with your assumption... thanks
Re^2: capture data - html
by kevyt (Scribe) on Jun 29, 2006 at 16:05 UTC
    ahhhh.... You are exactly right.... The site that I am trying to do this on is my-space.. I added the "-" so someone wont find this posting on a google. I will give this a try :)

    I always try to find ways to do things when people say it cant be done. I guess I like a challenge :)

    Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://558259]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-29 04:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found