... can be used for a lot of ... things, and is one of the most powerful ... ... ... on the web. Not to mention it's ... cheap and widely used. However, one t IntroductionPHP can be used for a lot of different things, and is one of the most powerful scripting languages available on the web. Not to mention it's extremely cheap and widely used. However, one thing that PHP is lacking, and in fact most scripting languages are, is a way to update pages in real-time, without having to reload a page or submit a form.The internet wasn't made for this. The web browser closes the connection with the web server as soon as it has received all the data. This means that after this no more data can be exchanged. What if you want to do an update though? If you're building a PHP application (e.g. a high-quality content management system), then it'd be ideal if it worked almost like a native Windows/Linux application.But that requires real-time updates. Something that isn't possible, or so you would think. A good example of an application that works in (almost) real-time is Google's GMail. Everything is JavaScript powered, and it's very powerful and dynamic. In fact, this is one of the biggest selling-points of GMail. What if you could have this in your own PHP websites as well? Guess what, I'm going to show you in this article.How does it work?If you want to execute a PHP script, you need to reload a page, submit a form, or something similar. Basically, a new connection to the server needs to be opened, and this means that the browser goes to a new page, losing the previous page. For a long while now, web developers have been using tricks to get around this, like using a 1x1 iframe, where a new PHP page is loaded, but this is far from ideal. Now, there is a new way of executing a PHP script without having to reload the page. The basis behind this new way is a JavaScript component called the XML HTTP Request Object. See http://jibbering.com/2002/4/httprequest.html for more information about the component. It is supported in all major browsers (Internet Explorer 5.5+, Safari, Mozilla/Firefox and Opera 7.6+).With this object and some custom JavaScript functions, you can create some rather impressive PHP applications. Let's look at a first example, which dynamically updates the date/time.Example 1First, copy the code below and save it in a file called 'script.js': Article Tags: Http Request Object, Without Having, Http Request, Request Object, Code Below, File Called, Make Sure Source: Free Articles from ArticlesFactory.com .
Top blog stories
A review of Idmobile.com
Idmobile.com offers both pay-as-you-go and contract plans. Pay-as-you-go plans are ideal for customers who don't want to be tied down to a long-term contract, and they can purchase bundles of data, minutes, and texts as and when they need them.
Idmobile.com offers both pay-as-you-go and contract plans. Pay-as-you-go plans are ideal for customers who don't want to be tied down to a long-term contract, and they can purchase bundles of data, minutes, and texts as and when they need them.
AO.co is a trusted expert in TVs, washing machines, clothes dryers and other household appliances. AO.com is one of the largest retailers in the UK and it specializes in electronics, clothes and home furniture.
At Three, we believe phones are good. They just make life better. Easier. And more fun. But
we all need to find a balance that works for us. Our mission is to help our customers use
their phones to live their best lives.
We make your life easier
Since 1992, we’ve been helping customers get the best deal on their dream phone. We firmly believe in giving you the highest quality, for the lowest price. That’s why we work with three of the UK’s leading networks to do all the haggling for you,...
At Halfords, we're all about the journey. With more than 700 stores with over 10,000 colleagues, we're the UK's leading retailer of automotive and cycling products. We are also the leading operator in MOT, tyres, car servicing and car repairs - pleasing more than 750,000 customers every year.
It's important to us that everyone gets great customer service and can enjoy our products, no matter their level of sight. So, if you're blind, partially sighted or struggle to see or read the screen, we’ve a range of features to help you get the most from our products and...
Look iconic, without the hassle— using Nasty Gal discount codes, you can shop your favorite pieces for way less by simply entering one of our promotional codes (of your choice) at the checkout. From delivery offers, to promo deals, we keep ‘em coming, so you always have the offer you...
The Covid-19 has caused the school and universities to shut down around the world creating a major issue in Learning and Education. As this virus spreads through the interaction and if social distanci... The Covid-19 has caused the school and universities to shut down around the world creating a major...
Why its Important to Manage Your Holiday Calendars?
A printable calendar 2021 is a prominent online platform where you download printable calendars of your choice. These calendars can be customized as per our client requirement with photo, text, logo, or any other image. If you are thinking of planning a dream vacation tour with family and kids but...
In this economy it is essential for everyone to watch every penny we spend and save as much as we can on all the items we need for our home and family. In this economy it is essential for everyone to watch every penny we spend and save as much...
Cardiovascular training is important for encouraging womens health. Cardiovascular exercise includes any kind of aerobic activity that boosts your heart rate up to 85 percent of its utmost heart rate. Source: Free Articles from ArticlesFactory.com
If you are not aware of what parabens are then you need to make sure that you do. You would never eat a paraben so why would you let them enter your body via your skin? Parabens are used as preservatives in the cosmetics and pharmaceutical industries, but the health...
There are many skin care ranges that exist these day that all claim to be natural and good for your skin. But how can you be certain? Most people do not have any idea on how to shop for natural skin care products. If you are looking, most likely you...
You and everyone wants to have skin that is beautiful, healthy and gives off a radiant glow. But with the huge range of products that are available how do you know what will work for you? Let us look at healthy skin care and methods to regain your skin's normal...
There are so many products to select when it comes to caring for your skin. But if you want the very best then you really need to be using products that are organic. Have you ever experienced being torn between two skin care products? Choose products with natural ingredients popular...
Ever since Jennifer Lopez took the plunge and wore satin pyjamas in public, ladies sleepwear and in particular satin lingerie has become far more intriguing and mainstream. These ladies pajamas have catapulted to superstardom in womens sleepwear when it dawned on the world that they are more than just sleepwear....
From Milan to Minsk, chic ladies sleepwear has never been as feminine nor as popular as it is today. Cotton nightgowns, bathrobes, chemises, and yes, even pyjamas can be found in every conceivable style from trendy to classic. These days fabulous ladies sleepwear has raised the bar on lingerie style....
We have dreams and goals to achieve, but the only thing that limits us from realizing them is the bad habits that we possess. These habits must be dropped now and forever. Source: Free Articles from ArticlesFactory.com
Eye creams and eye gels come in a variety of forms and also prices. But what should you really be looking for if you want to care for the delicate skin around your eyes? Well, I have an answer to this, using an under eye wrinkle cream to treat your...
Search topic
What To Look For In An Eye Cream
Eye creams and eye gels come in a variety of forms and also prices. But what should you really be looking for if you want to care for the delicate skin around your eyes? Well, I have an answer to this, using an under eye wrinkle cream to treat your...