Posts

Showing posts with the label XML

Live Search / AutoComplete Using XML & PHP

index.php:- <html> <head> <script type="text/javascript"> function showResult(str) { if (str.length==0)   {   document.getElementById("livesearch").innerHTML="";   document.getElementById("livesearch").style.border="0px";   return;   } if (window.XMLHttpRequest)   {xmlhttp=new XMLHttpRequest();   } else   {xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");   } xmlhttp.onreadystatechange=function()   {   if (xmlhttp.readyState==4 && xmlhttp.status==200)     {     document.getElementById("livesearch").innerHTML=xmlhttp.responseText;     document.getElementById("livesearch").style.border="1px solid #A5ACB2";     }   } xmlhttp.open("GET","livesearch.php?q="+str,true); xmlhttp.send(); } </script> </head> <body> <form> <input type="text" size="30" onKeyUp="showResult(this.value)" /> <div id="li...

Creating UPS Rating ( XML,PHP using curl method)

index.php:- <?php // ini_set ('display_errors', 'true'); // error_reporting(E_ALL); /* Valid domestic values:  "14" = Next Day Air Early  AM   "01" = Next Day Air   "13" = Next Day Air Saver  "59" = 2nd Day Air AM   "02" = 2nd Day Air  "12" = 3 Day Select  "03" = Ground  Valid international values:  "11"= Standard   "07" = Worldwide Express   "54" = Worldwide Express Plus "08" = Worldwide Expedited "65" = Saver  Required for Rating and  Ignored for Shopping  Valid Poland to Poland  Same Day values: "82" = UPS Today Standard "83" = UPS Today Dedicated Courier "84" = UPS Today Intercity "85" = UPS Today Express "86" = UPS Today Express Saver    Packaging Type Codes "00" = "UNKNOWN" "01" = UPS Letter "02" = Package "03" = Tube "04" = Pak "...