Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3319168
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:47:34+00:00 2026-05-17T22:47:34+00:00

I am unable to set a cookie in one domain and read it in

  • 0

I am unable to set a cookie in one domain and read it in another. I have tried a million different examples but i have had no luck at all.

can someone please point out what is going wrong?

domainone.com

setcookie('testcookie','cookie example',time()+30*24*60*60,'/','domaintwo.com',false,true)

domaintwo.com

echo $_COOKIE[testcookie];

var_dump($_COOKIE);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:47:35+00:00Added an answer on May 17, 2026 at 10:47 pm

    This is impossible. Search for Cross Domain Cookie related questions on SO to see workarounds (though none is trivial).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Perhaps I haven't found the right post but I have been unable to set
I tried transferring a working login system from one domain to another. It works
I have created a divider in JSplitPane . I am unable to set the
I have a horribly coded set of controllers which I am unable to refactor
Using Jetty 7.0.2, I am unable to set a custom session cookie path. I
I want to set a cookie with the country name and city location but
My PHP is unable to read a cookie like this: 1010081-COP-9-20-20110606172032 echo $_COOKIE[SubmCookie]; It
I am unable to get the cookie to unset. cookie set: (id, alias) setcookie(id,$data['id'],
I have a site on CGI and working fine yesterday but suddenly its cookie
I have been trying like this - // ================ // = set a Cookie

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.