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

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?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.