Results 1 to 3 of 3

Thread: .htm or .html relay to external .php

  1. #1
    Join Date
    Oct 2006
    Posts
    183
    Thanks
    0
    Thanked 11 Times in 11 Posts

    Question .htm or .html relay to external .php

    is it possible to make a site using an html page check anohter site for data without php, such as using JavaScript?

    I want to make a form that when someone goes to a page on a site using html pages, it goes to my site, checks if a cookie exists, then display something if it does exist... Such as iff I had a user with site "theirsite.com" and they have something on "theirsite.com/secret.html" then if someone goes to the secret.html page it has a JavaScript that can ask my site if the cookie exists so it knows whether to show the page or redirect somewhere else...

    Thanks to all who read this to see if they can understand it.

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I believe you could probably accomplish this with AJAX (a form of javascript) to interact between the two sites, then use Javascript to read the cookie information and whatnot.

    Hope this helps.
    Last edited by thetestingsite; 04-05-2007 at 02:30 AM.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    You cannot use AJAX to get data from another site, due to security reasons.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

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
  •