Something " truly dangerous " to play with: a proxy file able to understand everything via XMLHttpRequest, enabling any sort of cross site requests (no COMET yet, it could arrive soon). Dunno even why I am posting this " little monster ", but I am sure a lot of people would like to have " access to the entire web " simply using Ajax, and nothing else, something like this: function website_exists(url){ var xhr = new XMLHttpRequest; xhr.open("HEAD", "proxy.php?url=" + (url), false); xhr.send(null); return 199 }; if(website_exists("http://gogle.com")) alert("Of Course, It's Big G!"); WebReflection PHP Proxy <?php /** XMLHttpRequest PHP Proxy * @author Andrea Giammarchi * @blog http://webreflection.blogspot.com/ * @license Mit Style License * @requires curl and Apache webserver * @description basic authentication, GET, POST, HEAD, PUT, DELETE, others ...
Comments
Post a Comment