Hi all
I want to place cookies on visits to my affiliate sites. The cookies should be set by my script on my server but the visitiors are calling on my affiliate's sites that are not connected to mine!
So, my question is... can I set a cookie on a users computer when they are not visiting my site? I think it can be done if the site they are on calls a image file(?) and this could trigger my script? Anyone know how this is done?
Thanks.
Lawrence.
Setting Cookies
Moderator: General Moderators
I have to ask, what is the point in setting a cookie and then not accessing it?lazersam wrote:
I do not wish to access any cookies just set them![]()
Actually, what you are trying to do is quite easy, however I also consider it to be the biggest misuse of cookies, and it completely goes against the privacy nature of cookies as most users understand them.
If you show me an accurate P3P file that will accompany your intended cookie then I'll show you how to do it.
Not 100% sure, but this would qualify under 3rd part cookies. And if so, have in mind that alot of users have the "Ignore 3rd part cookies" option turned on in their browsers, firewalls, 3rd part protection software etc.
---
Just shooting another idea on the subject:
You can make a php script an image, and inside the code handling that add database functions.
If you have access to a database, you can collect user-ip/afil-sitename and so forth with the image, before displaying it, and insert that info into the database. Can be used to count hits, and depending on how much (and what) information you are to use in your cookie perhaps more.
---
Just shooting another idea on the subject:
You can make a php script an image, and inside the code handling that add database functions.
If you have access to a database, you can collect user-ip/afil-sitename and so forth with the image, before displaying it, and insert that info into the database. Can be used to count hits, and depending on how much (and what) information you are to use in your cookie perhaps more.
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
umm..
have them send their users to 'http://www.yoursite.com/aff.php?id=theirid'
and then on aff.php:
no need for cookies..
have them send their users to 'http://www.yoursite.com/aff.php?id=theirid'
and then on aff.php:
Code: Select all
<?php
//connect to DB
$id = $_GET['id'];
$sql = "UPDATE `table` SET `in` = in+1 WHERE `id` = '$id'";
mysql_query($sql) or die("Error in updating...");
header("location:index.php");
?>no need for cookies..
JAM is spot on with that idea, that is exactly how it works.
A P3P file is essentially an xml file associated with the cookie which contains various bits of info on how you use the cookie and the type of info that is stored in it.
Cookies of this nature do qualify as 3rd party and although many users reject 3rd party cookies many do not.
A P3P file is essentially an xml file associated with the cookie which contains various bits of info on how you use the cookie and the type of info that is stored in it.
Cookies of this nature do qualify as 3rd party and although many users reject 3rd party cookies many do not.