Jump to content

[SOLVED] ajax page load from other domain


mysterbx

Recommended Posts

If i am correct you wish to have a cross domain ajax call. this question has been discussed many times.

 

http://www.phpfreaks.com/forums/index.php/topic,210103.0.html

http://www.phpfreaks.com/forums/index.php/topic,210317.msg958743.html

 

these are just two links on this forum there are a lot more topics to be found on this subject just do a search on this forum

Link to comment
Share on other sites

AJAX is [currently] limited to the domain from which it's being served.

 

the other option is creating a php file (i already knew that one)

but if i do that, the ip will be server's, not user's...

 

is there a way to include (without ajax) the page to a html document...

something that doesnt involve php,iframe or cgi?

Link to comment
Share on other sites

but you can combine the techniques like this.

 

1. main.php(main page with ajax call to local ajax_page.php)

2. ajax_page.php which does the following

    - get the users ip adress

    - get content from a remote site(http://www.whatever.com/some_ajax_page.php)

 

and there you have it you get the users ip adress and the content of a remote page

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.