mysterbx Posted September 25, 2008 Share Posted September 25, 2008 Helloo, I want to ask if its possible to remake script like: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm to a script, that could open other domain instead mine? i searched lots of sites with ajax scripts, but none of them can do that... Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/ Share on other sites More sharing options...
RichardRotterdam Posted September 25, 2008 Share Posted September 25, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/#findComment-650383 Share on other sites More sharing options...
mysterbx Posted September 25, 2008 Author Share Posted September 25, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/#findComment-650392 Share on other sites More sharing options...
RichardRotterdam Posted September 25, 2008 Share Posted September 25, 2008 huh ??? include a file without ajax ,iframe, frameset or any type of serverside programming language? and what about catching the users ip on the local php file Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/#findComment-650393 Share on other sites More sharing options...
mysterbx Posted September 25, 2008 Author Share Posted September 25, 2008 for example if i would use curl, the users ip = server ip, if i use ajax, users ip=user ip (but ajax doesnt work for other domains) i need something that would open a page (for example google), and show the users ip, not the server's... Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/#findComment-650402 Share on other sites More sharing options...
RichardRotterdam Posted September 25, 2008 Share Posted September 25, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/#findComment-650404 Share on other sites More sharing options...
mysterbx Posted September 26, 2008 Author Share Posted September 26, 2008 i havent tried it before... but it works 10x Quote Link to comment https://forums.phpfreaks.com/topic/125778-solved-ajax-page-load-from-other-domain/#findComment-651285 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.