SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need to check a cookie with JS, but run PHP code

    Long story short, I have 2 sites.

    1 site sets a cookie on your machine when you have logged in.

    The other site is a wordpress blog. In the index.php (at the root level), I wanted to basically shield the site from running if this cookie is not found on their machine. If it is, the blog will run like normal.

    Is there a way I can do this without doing a bunch of redirects or form postings?

    Thanks,
    Bryan

  2. #2
    SitePoint Addict ALL's Avatar
    Join Date
    Oct 2005
    Location
    South Dakota
    Posts
    215
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    depending on how you set it up, you should beable to just do something like:

    www.mainsite.com <-- that would be the main site...

    blog.mainsite.com <-- this would be the blog or whatever

    depending on how the cookies are setup, you should beable to just set the domin to blog.mainsite.com or www.mainsite.com which will cause it to only send the associated cookies. but if you set the cookies domin like this: .mainsite.com it will send it no matter what.

    If they are on completely different sites you shouldnt neeed to worry about it,
    -ALL
    Did I help you?
    You can repay me, support one of my projects (no money needed):
    JavaScript Wiki, Another Web Forum, Paranormal Site


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •