•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 373,915 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,653 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 12194 | Replies: 11
![]() |
•
•
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation:
Rep Power: 4
Solved Threads: 4
I wrote a PHP proxy script that has some applications relevant to this thread, so thought I'd update the thread with this....
If your webserver supports PHP, I have a script that is a solution to the cross-domain security issues when doing things such as AJAX requests, etc. Instead of directly requesting the content, request my proxy.php passing in the real URL that you want. The proxy.php script will go fetch the content for you and forward back that response to your client script. It echoes back the full headers and response body.
proxy.php
http://www.troywolf.com/articles/php...ttp/proxy.phps
One problem people run into when using a proxy to get content is that relevant URLs in links break. You can solve this by parsing the body text, look for links, and if the link does not start with 'http://', insert the original site url. It's not exactly a simple thing to do, but a solution I've built in the past.
If your webserver supports PHP, I have a script that is a solution to the cross-domain security issues when doing things such as AJAX requests, etc. Instead of directly requesting the content, request my proxy.php passing in the real URL that you want. The proxy.php script will go fetch the content for you and forward back that response to your client script. It echoes back the full headers and response body.
proxy.php
http://www.troywolf.com/articles/php...ttp/proxy.phps
One problem people run into when using a proxy to get content is that relevant URLs in links break. You can solve this by parsing the body text, look for links, and if the link does not start with 'http://', insert the original site url. It's not exactly a simple thing to do, but a solution I've built in the past.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Previous Thread: Loading Frame
- Next Thread: Calling Different Iframes in Page


Linear Mode