I need to integrate a tracking system with a few clients, the clients
agree to place <img src="....."tags but not to place a file on there
servers.
I need to set a cookie on the visitor computer and when the visitor
preform an action to read the cookie and send the cookie infotmation to
my server.
I tried everything, and I cant read the cookie, I can set the cookie
using a javascript file that I placed on my server.
But to read the cookie and send the information I need to use PHP or
ASP file, and I cant do that unless the visitor has 3rd party cookies
enable.
How can I intergrate the systems? 8 1829 mu******@gmail. com wrote:
I need to integrate a tracking system with a few clients, the clients
agree to place <img src="....."tags but not to place a file on there
servers.
I need to set a cookie on the visitor computer and when the visitor
preform an action to read the cookie and send the cookie infotmation to
my server.
I tried everything, and I cant read the cookie, I can set the cookie
using a javascript file that I placed on my server.
But to read the cookie and send the information I need to use PHP or
ASP file, and I cant do that unless the visitor has 3rd party cookies
enable.
How can I intergrate the systems?
You can not.
Cookies are domainbound.
So if you set a cookie from www.yourfirstdomain.com, you cannot retrieve
that cookie from www.yourseconddomain.com.
The reason is simply that the browser (if it is not broken) only sends that
cookies set by some domain (via JavaScript, or PHP), along with its request
for some page, if the domains match.
If this was not the case, you could read all cookies from all domains, which
is not desirable.
Maybe IE's 'trusted domains' can overcome this valid limitation, not sure.
Regards,
Erwin Moller
Ok, if it can not be done that way,
and I know many tracking and conversions system does that, how can I do
that? mu******@gmail. com wrote:
Ok, if it can not be done that way,
and I know many tracking and conversions system does that, how can I do
that?
Tracking across domains is not easy.
If you want to catch a user coming from www.w1.com that goes to www.2w.com,
or vise versa, both domainowners must agree to the tracking.
We you go to w2 from w1, w2 receives the information where you come from,
nothing more or less. (HTTP_REFERER)
If w2 wants to share this information with w1, fine.
If they don't, there is no way for w1 to find out where the visitor went.
What is it excactly you want to achieve?
If you want to pass information from w1 to w2, you can also use the url
itself by appending some info, eg:
[from w1]
<a href="http://www.w2.com?id=3 8726487234">go to w2</a>
[from w2]
if (isset($_GET["id"]){
// do something with $_GET["id"]
}
This can also be done with a form and method POST.
Regrads,
Erwin Moller
I use the url to pass w2 the value to put in the cookie (if i want it
to be written from w2...),
that's not the problem, the problem is if i want to do the same thrue
an IMG TAG (for example)...
When im not actually moving to w1...
On w2 (in Another page, not the landing page) i want to call a php file
on w1, but NOT redirecting to it,
i can read the cookie in w2 (only by JS) but i cant put the value in
the query string of the file im calling...
btw. i tried to read the cookie from the php file that im calling, but
it says that there is no cookie set (apperantly its trying to read it
from w1-Domain).
so i need a way to do one of two:
1. transfer the value of the cookie (which read by w2 -JS) to a file on
w1...
2. read the cookie from the file in w1 (whose been called by IMG TAG on
w2).
--
Thanks. mu******@gmail. com wrote:
I use the url to pass w2 the value to put in the cookie (if i want it
to be written from w2...),
that's not the problem, the problem is if i want to do the same thrue
an IMG TAG (for example)...
Hi
You can pass information with the imagetag just fine, eg:
[from w1]
<img src="http://www.w2.com/images/doimage.php?id= 762357">
and vise versa
[from w2]
<img src="http://www.w1.com/images/doimage.php?id= 762357">
It works the same as GET as far as PHP is concerned.
doimage.php can retrieve the value with $_GET["id"]
When im not actually moving to w1...
On w2 (in Another page, not the landing page) i want to call a php file
on w1, but NOT redirecting to it,
i can read the cookie in w2 (only by JS) but i cant put the value in
the query string of the file im calling...
btw. i tried to read the cookie from the php file that im calling, but
it says that there is no cookie set (apperantly its trying to read it
from w1-Domain).
so i need a way to do one of two:
1. transfer the value of the cookie (which read by w2 -JS) to a file on
w1...
2. read the cookie from the file in w1 (whose been called by IMG TAG on
w2).
I am not sure if you need file for that, but I do not know your setup.
Summarizing:
If you want to pass the value of the cookie from w1 to w2 via an image that
is displayed on the w1 page:
JS:
var cookiename, cookievalue;
// fill them with appropriate values
var theImgURL = "http://www.w2.com/images/doimage.php?";
theImgURL += "cookiename="+e scape(cookienam e);
theImgURL += "&cookievalue=" +escape(cookiev alue);
document.images .mycookiegif.sr c=theImgURL;
<img src="0.gif" name="mycookieg if">
Then from w2 doimage.php:
[php]
$cookiename = $_GET["cookiename "];
$cookievalue = $_GET["cookievalu e"];
[not tested, just the bare idea]
Does that help?
Regards,
Erwin Moller
>
--
Thanks.
mu******@gmail. com wrote:
I need to integrate a tracking system with a few clients, the clients
agree to place <img src="....."tags but not to place a file on there
servers.
I need to set a cookie on the visitor computer and when the visitor
preform an action to read the cookie and send the cookie infotmation to
my server.
I tried everything, and I cant read the cookie, I can set the cookie
using a javascript file that I placed on my server.
But to read the cookie and send the information I need to use PHP or
ASP file, and I cant do that unless the visitor has 3rd party cookies
enable.
How can I intergrate the systems?
In this case, ur act 3rd part cookie.
3rd part cookie was denied by browser by default.
add a HTTP header named P3P in your HTTP response, like below:
NAME: P3P
VALUE: CP="NOI DSP COR CURa ADMa DEVa PSAa PSDa OUR IND UNI PUR NAV"
thats kind of what i did:
<img id="cookies" src="" style="display: none;"/>
<script language="JavaS cript" type="text/javascript"
src="http://he.wesell.co.il/Scripts/CookieFuncs.js" ></script>
<script type="text/javascript">
function sendCook()
{
document.getEle mentById('cooki es').src =
'http://domain.com/file.php?param1 =1¶m2=2&Coo kie=' +
readCookie(name );
}
sendCook();
</script>
it works just fine...
thanks =]
thats kind of what i did:
<img id="cookies" src="" style="display: none;"/>
<script language="JavaS cript" type="text/javascript"
src="http://domain.com/Scripts/CookieFuncs.js" ></script>
<script type="text/javascript">
function sendCook()
{
document.getEle mentById('cooki es').src =
'http://domain.com/file.php?param1 =1¶m2=2&Coo kie=' +
readCookie(name );
}
sendCook();
</script>
now it works just fine.
thanks =] This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Navin |
last post by:
hi,
guys
my website is on server say servera.
i have a website on serverb
now servera and serverb are on different domians...
if serverb website creates a cookie on client pc with domain say
..xyz.com
now if try to read the cookie on client pc when servera website is run
|
by: Kuldeep |
last post by:
Hi,
I implemented Forms authentication for my apps (more than one). Since it'll
be hosted on a webfarm, I set cookie.domain = "nnn.nnn.com". This works fine.
I can signin and then go to other servers in same domain.
My problem is the Signout. I know FormsAuthentication.Signout() won't work
in this case. So I'm trying to explicitely expire authentication cookie. But
it won't signout and will come back every time. It's driving me crazy....
|
by: Wysiwyg |
last post by:
After a server created cookie is processed on the client I want it removed,
cleared, or expired in the javascript block but have been unable to do this.
If I set a cookie value in the server code behind and don't use a domain
then I can not change or remove that cookie's value on the client. If I
subsequently create the cookie again in the codebehind then I actually end
up with TWO cookies with the same name in the response. The cookie...
|
by: Paul |
last post by:
My site does not have a domain name, just an IP address.
I set a cookie in ASP.Net and I can read it with no problem on subsequent
pages.
My problem is that I want to actually see the file on my local workstation
(Windows XP) but I can not seem to find it?
I have looked in the Temporary Internet Files folder and the Cookies folder
for my network user within Documents and Settings. But when I create the
|
by: patilj |
last post by:
OK, here's the deal.
Let's say I got a website called:
https://www.blah.com/~account/application/login.php
When the user arrives they see a https which is more secure than just
http alone.
The problem for me is it is too slow because it's shared with others
(but at least it's free), and I'm too cheap to shell out the money for
my own, etc.
| |
by: Bruno |
last post by:
I have a feature that is hosted on a different domain from the primary one
in a frame, and need to retain values in a cookie.
example: A web page at one.com contains a frame which has a page hosted at
two.com
If I view the frameset from one.com in Firefox, all works well with the
content from two.com. But if trying to view this using IE (with standard
security settings), the cookie set by two.com is not accessible.
|
by: ulabala |
last post by:
I was trying to retrieve the cookie collection and display the domain
to which those cookies were written to, but I always see a NULL value
for the domain property. Can anyone shed some light?
This is in Framework 2.0.
|
by: kelly.pearson |
last post by:
Is this a bug? I am trying to write a cookie that can be accessed by
various .Net applications on our domain. However, whenever I add the
domain property to the cookie, no errors get thrown but the cookie
doesn't get written. I am trying this from my localhost using
vs2003, .net framework 1.1, windows xp prof. Sample code I am testing
with is below.
Public Class WebForm1
Inherits System.Web.UI.Page
|
by: =?Utf-8?B?YzY3NjIyOA==?= |
last post by:
Hi all,
Is there an easier way to handle that? I used Javascript to handle this when
our two domains are hosted on two different servers(on different networks)
and our search engine marketing people don't like the javascript links since
they think the links are not favorable to a search robot.
Now our company is thinking about hosting these two domians on the same
server,
So I am wodering if there is any easy way to do that. Would you...
|
by: Stevo |
last post by:
I'm guessing this is a laughably obvious answer to many here, but it's
not to me (and I don't have a server or any knowledge of PHP to be able
to try it). It's not strictly a PHP question, but something that PHP
guys would know the answer to. I can't think of a more appropriate forum
to try. I've heard the ASP and JSP guys aren't as friendly ;-)
Let's say we have a HTML page from domain example.com, and that HTML
page makes a request to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |