Skip to main content

Posts

GPS GIS Regarding Help

Analysis for the GPS Tracking websites 01. http://www.starg3.com/starg3/tracking.php?vid=demo&psw=000000&day=2007-07-12&tmz=8&sel=goo This Website track the gps receiver and draw the path. User name : demo Password : demo 02. http://www.starg3.com/starg3/tracking.php 03. http://70.169.216.3/map.aspx?cid=slservices 04. http://mars.amiindia.co.in/Guest/TrackInfo.aspx username : demo password : demo 05. http://www.gpstrackit.com/online_demo_confirm.php?product_id=21&productlabel=L2000-NAVPLUS&dealer= Demo presentation on flash 06. http://www.accutracking.com/members.php (Important website) username : demo password : demo 07. http://daytongps.com/login/index.php (important site) user name : demo password : demo 08. http://www.rodrik.co.il/gpslocation/harita/index.html 09. http://www.supatrak.com/demo.html (Good site but internet explore has some error so map is not displayed) 10. http://www.n2yo.com/ This Url display you real gps tracking (helicopter examp...

Upload file

Create an Upload-File Form To allow users to upload files from a form can be very useful. Look at the following HTML form for uploading files: enctype="multipart/form-data"> Filename: Notice the following about the HTML form above: * The enctype attribute of the tag specifies which content-type to use when submitting the form. "multipart/form-data" is used when a form requires binary data, like the contents of a file, to be uploaded * The type="file" attribute of the tag specifies that the input should be processed as a file. For example, when viewed in a browser, there will be a browse-button next to the input field Note: Allowing users to upload files is a big security risk. Only permit trusted users to perform file uploads. Create The Upload Script The "upload_file.php" file contains the code for uploading a file: if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"][...

Curl Example & fsockopen() Example

***************************** CURL Example **************************** $senthost = "http://s4.myvaluefirst.com/psms/servlet/psms.Eservice2?data=".$xmlcode."&action=send"; //echo "Path:".$path." "; //print $path." "; $user_agent=$_SERVER['HTTP_USER_AGENT']; $cookies = 'cookies'; $ch = curl_init($senthost); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookies); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); $line = curl_exec($ch); $error = curl_error($ch); echo (($error!= "")? ('Error: ' . $error) : $line); curl_close($ch); ******************************** Getting with fsockopen() function $senthost = "http://localhost/loginvalidate.php?username=demo&pass=123"; $host="127.0.0.1"; $ht...

Javascript & Form Validation

Total Form Validation First Name: Address: Zip Code: State: Please Choose AL CA TX WI Username(6-8 characters): Email: **************************************** One by One Validation with Javascript ******************** Validation 1.IsEmpty validaion Required Field: onclick="isEmpty(document.getElementById('req1'), 'Please Enter a Value')" value='Check Field' /> 2. Number validation using reguler expression Numbers Only: onclick="isNumeric(document.getElementById('numbers'), 'Numbers Only Please')" value='Check Field' /> 3. IsAlphabet validation only characters Letters Only: onclick="isAlphabet(document.getElementById('letters'), 'Letters Only Please')" value='Check Field' /> 4. Length Restriction Username(6-8 characters): onclick="lengthRestriction(document.getElementById('restrict'), 6, 8)" value='Check Field' /> 5. Comb...

XML Parsar

1. First Example //Initialize the XML parser $parser=xml_parser_create(); //Function to use at the start of an element function start($parser,$element_name,$element_attrs) { switch($element_name) { case "NOTE": echo "-- Note -- "; break; case "TO": echo "To: "; break; case "FROM": echo "From: "; break; case "HEADING": echo "Heading: "; break; case "BODY": echo "Message: "; } } //Function to use at the end of an element function stop($parser,$element_name) { echo " "; } //Function to use when finding character data function char($parser,$data) { echo $data; } //Specify element handler xml_set_element_handler($parser,"start","stop"); //Specify data handler xml_set_character_data_handler($parser,"char"); //Open XML file $fp=fopen("test.xml","r"); //Re...

Ajax & OOPs Concept

class test { var $myvar; function test($param) { $this->myvar = $param; } //function _construct() //{ // $this->$myvar = $param; //} function myfunction($mvar) { echo " Execute MyFunction".$mvar; return; } } $obj = new test("20"); echo $obj->myvar; $obj->myfunction("10"); ?> *********************** AJAX *************** <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> var http = false; if(navigator.appName == "Microsoft Internet Explorer") { http = new ActiveXObject("Microsoft.XMLHTTP"); } else { http = ne...

Database & Paging

******************* Db.php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $dbname = 'mydatabase'; $conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ($dbname); ?> ****************************** Paging ***************************** <html> <head> <title>Implementing Paging with next and prev</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php include 'library/config.php'; include 'library/opendb.php'; // how many rows to show per page $rowsPerPage = 3; // by default we show first page $pageNum = 1; // if $_GET['page'] defined, use it as page number if(isset($_GET['page'])) { $pageNum = $_GET['page']; } // counting the offset $offset = ($pageNum - 1) * $rowsPerPage; $query = "SELECT val FROM ra...