note 57576 deleted from ref.http by nlopess

From: Date: Fri, 02 Dec 2005 18:20:25 +0000
Subject: note 57576 deleted from ref.http by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-99478@lists.php.net to get a copy of this message
Note Submitter: expertphp at yahoo dot com ---- For more features using JavaScript XML HTTP Request Object components (AJAX) visit this page : http://expert.no-ip.org/?ajax example.php <?php require_once 'Ajax.php'; // header information $headers[] = array("TEST1", "test one"); $headers[] = array("TEST2", "test two"); // javascript code $cmd[200] = "alert({ajax})"; $cmd[404] = "alert('Error 404 - File not found !')"; $obj = new Ajax; // get test.php body source using method GET $obj->request("test.php", "GET"); // set header information $obj->headers($headers); ?> <html> <head> <?=$obj->head();?> </head> <body> <?=$obj->get($cmd);?> Example.php </body> </html> test.php <?php // print header information HTTP_TEST1 & HTTP_TEST2 echo "HTTP_TEST1: ".$_SERVER['HTTP_TEST1']."\n". "HTTP_TEST2: ".$_SERVER['HTTP_TEST2']; ?>

« previous php.notes (#99478) next »