HTTP Request class By Martin Fasani ![]() August 2005 Nominee Vote |
XML HTTP Request is the Magic behind Gmail and many other sites that use it to retrieve information as the user navigates without the need to reload the whole page.
Http Request makes javascript requests generation easier from your php pages.
The javascript is exposed and generated for the target browser. This class was intended for the first steps in learning to use HTTP Request, hence the exposed Javascript code, it really lacks OOP integration between javascript and Php where other classes focus.
| File: | Description: |
| classhttpreq.php | Main class ( source ) |
| democlass.php | Demo of class implementation |
| democlassheaders.php | Demo of the class in combination with proxyHead in order to make head requests |
| democlassmethods.php | Properties and Methods of the class |
| xmlhttpclass_article.doc | Article with comments and explanations about the class [Also available as PDF and plain text] |
Download: |
| Class: HTTP Request class |
| Feedback: |
| Leave comments and suggestions |
| Contact |
Xml http request is lately kind of a buzz-word, it became trendy and popular after Google introduced Gmail last year 2004, thus enlightening minds of many developers that started playing and releasing code.
It's now a new technology, it's been years there, as you can see in this
article written in April 2002. What I would like to advice before implenting Http Request in any site, it's to put in the balance the pros and cons, not just to use it because it's trendy and cool at the moment. It's not supported in the 100% of the browsers, and if you 've ActiveX disabled in Internet Explorer, it will fail work. Hence, you need always to provide an alternative, if possible non-javascript at all, to make sure your page works in the 100% of the browsers.