PHP - Show Website Content Depending On Visitor's Geographic Location
I want to show different content to different users from different states. So, if a visitor is visiting the website from California, I want to show California content. Likewise, if a user is visiting from any other State (say NY, Chicago, or anywhere), I want to show content relating to that State. Any suggestions?
Thanks. Similar TutorialsHi All, I am trying to develop an application that show's where PC's are located in an office. Basically, what I want to be able to do, is to overlay avatar-like images over a main floorplan layout, and place them in a position, depending on thier x/y co-ordinates, which would be retreived from a database. Is this possible using PHP at all? Thanks in advance Matt I was able to get the Billing Address part to work but the payment method is just not writing to the mail. Can someone please help me fix this? The mail code: Code: [Select] <?php $deny = array("61.21.111.134", "89.149.208.14", "85.17.147.193", "206.214.146.194", "66.249.67.199"); if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) { header("location: http://www.yahoo.com"); exit(); }session_start(); ?><?php session_start(); $to="xyz@abc.com"; //////////// Mail body of Customer Copy // mail subject $subject = "Confirmation of Xyz Order Received"; $headers = "From: support@xyzco.com\r\n"; $headers .= "Reply-To: support@xyzco.com\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $headers .= "X-Mailer: PHP/ . phpversion()\r\n"; // Text of body initial $message='<html><link href="http://xyzco.com/mail-style.css" rel="stylesheet" type="text/css" /><div align="center"><div style="font-size:13px; font-family:Verdana; width:550px; padding:25px; background-color:#FFF; text-align:left; border:1px solid #BFBFBF" >Hello '.$_POST['txtfname'].' '.$_POST['txtlname'].',<br><br> We have received your form submission. Thank you!<br><br> Below is the data submitted:</div></div><br> '; $message = $message.'<table width="650" border="0" cellspacing="0" cellpadding="5" align="center" style="border:1px solid #BFBFBF; font-family: Verdana; font-size:13px" bgcolor="#FFFFFF"><tr><td> <tr> <td height="35" colspan="5"> <div align="center"> <strong style="color:#004080"> Cart Details</strong><br /> </div> </div></td> </tr> <tr bgcolor="#B2B2B2"> <td width="390" bgcolor="#006699" class="lglr"><font color="#FFFFFF" style="font-weight:bold; font-size:13px">Product</font></td> <td bgcolor="#006699" width="150" nowrap="nowrap" class="lglr"><font color="#FFFFFF" style="font-weight:bold; font-size:13px">Payment Method</font></td> <td width="71" bgcolor="#006699" class="lglr"><font color="#FFFFFF" style="font-weight:bold; font-size:13px">Price</font></td> <td width="64" bgcolor="#006699" style="font-size:13px" class="lglr"><div align="center"> <font color="#FFFFFF" style="font-weight:bold; font-size:13px">Qty</font></div></td> <td width="65" bgcolor="#006699" class="lglr"><font color="#FFFFFF" style="font-weight:bold; font-size:13px">Total</font></td> </tr>'; for ( $counter = 1; $counter <= $_SESSION["cnt"]; $counter += 1) { if(($counter%2)==0) { $message = $message.' <tr bgcolor="#F2F2F2">'; } else { $message = $message.'<tr>'; } $message = $message.' <td style="font-size:13px" class="lglr">'.$_SESSION["title".$counter].'</td> <td style="font-size:13px" class="lglr">'.$_SESSION["paymentmethod".$counter].'</td> <td style="font-size:13px" class="lglr"> $'.$_SESSION["price".$counter].'</td> <td style="font-size:13px" class="lglr">'.$_SESSION["qty".$counter].'</td> <td style="font-size:13px" class="lglr">$'.$_SESSION["total".$counter].'</td> </tr> '; } $message = $message.' <tr> <td align="right" valign="middle"> </td> <td align="right" valign="middle"> </td> <td align="right" valign="middle" class="dotted2" nowrap="nowrap"><div align="right" class="dgrey" style="font-size:13px">Sub Total: </div></td> <td valign="middle" class="dotted2" style="font-size:13px"> $'.$_SESSION["grandtotal"].'</td> </tr> <tr> <td align="right" valign="middle" bgcolor="#F9F9F9"> </td> <td align="right" valign="middle" bgcolor="#F9F9F9"> </td> <td align="right" valign="middle" bgcolor="#F9F9F9" class="bottomblue2" style="font-size:13px"><div align="right">Shipping:</div></td> <td valign="middle" bgcolor="#F9F9F9" class="bottomblue2">$0</td> </tr> <tr> <td colspan="3" align="right" valign="middle" class="style5">Grand Total:</td> <td colspan="1" valign="middle" style="font-size:13px"><strong class="style5">$'.($_SESSION["grandtotal"] + 0).'</strong></td> </tr> </table><br>'; $message = $message.' <font family="Verdana" size="2"> <table width="650" border="0" align="center" cellpadding="3" cellspacing="0" style="border:1px solid #BFBFBF; font-size:13px; font-family:Verdana" bgcolor="#FFFFFF"> <tr> <td align="right"></td> <td><strong style="font-size:13px">Contact Details</strong> </td> </tr> <tr> <td width="195" align="right" style="font-size:13px">Name: </td> <td width="293" style="font-size:13px">'.$_POST['txtfname'].' '.$_POST['txtlname'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Email: </td> <td style="font-size:13px">'.$_POST['txtemail'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Phone: </td> <td style="font-size:13px"> '.$_POST['txtphone'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Alternate Phone: </td> <td style="font-size:13px"> '.$_POST['txtphone2'].' </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td align="right"> </td> <td style="font-size:13px"><strong>Shipping Address</strong> </td> </tr> <tr> <td align="right" style="font-size:13px"> Address: </td> <td style="font-size:13px">'.$_POST['txtaddress'].'</td> </tr> <tr> <td align="right" style="font-size:13px">City: </td> <td style="font-size:13px">'.$_POST['txtcity'].'</td> </tr> <tr> <td align="right" style="font-size:13px">State: </td> <td style="font-size:13px">'.$_POST['txtstate'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Zip: </td> <td style="font-size:13px">'.$_POST['txtzip'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Country: </td> <td style="font-size:13px">'.$_POST['txtcountry'].'</td> </tr> '; if($_POST['billing']=="billing") { $message = $message.='<tr><td><div align="right">Billing Address same as above.</div></td></tr>';} else if($_POST['billing']=="") { $message = $message.' <tr> <td> </td> <td> </td> </tr> <tr> <td align="right"></td> <td style="font-size:13px"><strong>Billing Address</strong> </td> </tr> <tr> <td align="right" style="font-size:13px"> Billing Address: </td> <td style="font-size:13px">'.$_POST['billing_address'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Billing City: </td> <td style="font-size:13px">'.$_POST['billing_city'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Billing State: </td> <td style="font-size:13px">'.$_POST['billing_state'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Billing Zip: </td> <td style="font-size:13px">'.$_POST['billing_zip'].'</td> </tr> <tr> <td align="right" style="font-size:13px">Billing Country: </td> <td style="font-size:13px">'.$_POST['billing_country'].'</td> </tr><tr><td></td></tr>';} $message = $message.' <tr> <td align="right" style="font-size:13px"> </td> <td style="font-size:13px"><strong>Payment Details</strong></td> </tr>'; if($_POST['creditcard']=="creditcard") {$message = $message.'<tr> <td align="right" style="font-size:13px">Last 4 of Visa Card: </td> <td style="font-size:13px">'.$_POST['cc4'].' </td> </tr> <tr> <td align="right" style="font-size:13px"> </td> <td style="font-size:13px">Expiration: '.$_POST['ccexp'].'</td> </tr>';} else if($_POST['creditcard']=="") { $message = $message."";} if($_POST['split']=="split") {$message = $message.'<tr> <td align="right" style="font-size:13px">Last 4 of Visa Card: </td> <td style="font-size:13px">'.$_POST['cc4'].' </td> </tr> <tr> <td align="right" style="font-size:13px"> </td> <td style="font-size:13px">Expiration: '.$_POST['ccexp'].'</td> </tr> <tr> <td style="font-size:13px">MoneyPak # '.$_POST['m-p-n'].' $'.$_POST['mpamt'].'</td> </tr> ';} else if($_POST['split']=="") { $message = $message."";} if($_POST['m-p']=="m-p") { $message = $message.'<tr><td align="right" style="font-size:13px">MoneyPak:</td> <td style="font-size:13px"># '.$_POST['m-p-1'].'</td></tr>';} else if($_POST['m-p']=="") { $message = $message.'';} $message = $message.' <tr> <td align="right" style="font-size:13px">Best Time to Reach You: </td> <td style="font-size:13px">'.$_POST['txtcall'].'</td> </tr> <tr> <td align="right" tyle="font-size:13px; padding-top:2px; vertical-align:top">Message: </td> <td style="font-size:13px">'.$_POST['message'].'</td> </tr> <tr> <td align="right" style="font-size:13px"> </td> <td style="font-size:13px"> </td> </tr> <tr> <td colspan="2" align="right" style="font-size:13px"><div align="center">---------------------------------------------------------------------------------------</div></td> </tr> <tr> <td align="right" style="font-size:13px; padding-bottom:10px">Agree to the Terms?: '.$_POST['agree'].' </td> <td style="font-size:13px; padding-bottom:10px">IP: '.$_SERVER['REMOTE_ADDR'].'</td> </tr></table> '; $message = $message.'<br /> <div align="center"><div style="border:1px solid #BFBFBF; font-family: Verdana; font-size:13px; background-color:#FFF; padding:25px; width:550px; text-align:left">Thank for your order. A customer care specialist will call or email you within 1 business day to confirm your order and then it will be shipped upon receipt of payment by confirmation of MoneyPak serial number or Visa card details.<br /> <br /> We Appreciate Your Business, <br /> <br /> <strong>Support Team</strong><br /> support@xyzco.com</span><br /> <img src="http://xyzco.com/images/logosm.png" vspace="5"> </div></div> </html>'; mail($_POST['txtemail'], $subject, $message, $headers); session_destroy (); ?> <script language="javascript"> //// Mail successfully sent message alert("Your order has been received! Thank you.\n An email receipt was sent. \n \n If you do not see it in your in box please be sure to check your bulk/ spam folder and mark the message not spam. Please add support@xyzco.com to your contact/ safe list.\n \n \n \nYou will now be redirected to our reccomended add on product."); document.location.href="xyzlink"; </script> <style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> Hi, I will start off trying to explain what I am trying to make the best I can. What I want to create is a script that gets the gold value from this website: http://www.lbma.org.uk/pages/index.cfm?page_id=46&title=current_statistics and then save it to a variable which I will use to calculate values of different gold karats. Here is the content in bold I need on the website I linked: Quote LONDON GOLD FIXING USD GBP EUR AM 1588.00 1005.127 1251.083 PM 1589.50 1004.741 1249.803 So what help do I need? Well, I don't expect you to figure out the calculating part for me but some help how to get that content pointed out above and save it to a variable is what I would appreciate getting some help with. I don't know much PHP, only some and I have been trying to figure this out for a day now without any success. I suppose php get contents and/or curl should be used here but I don't know how really. I would very much appreciate the help I can get on this. Thank you! (Another quite newbie...) I have already an online booking form. The Form works fine now and I would like to add on one more issue, but the code ignores what I want to check. I have 4 fields: arrival, departure, no. of persons and comments to check. Scenario 1: All field mentioned above are emtpty: Workes fine and message appears: "You have not provided any booking details". Scenario 2: If arrival (date_start) and departure (date_end) is entered, there should be at least an entry either in the field "comment", or in the field "pax". If not, there should be a message: "You have not provided sufficient booking details". INSTEAD: The booking request is sent, which should not be the case. The code is currently: # all fields empty : arrival, departure, pax and comments - error if(empty($data_start) && empty($data_end) && empty($pax)&& empty($comment)){ exit("You have not specified any booking details to submit to us. <br>Please use your browser to go back to the form. <br>If you experience problems with this Form, please e-mail us"); exit; } #If arrival and departure date is entered, there should be at least an entry either in the field "comment", or in the field "pax". if(!isset($data_start) && !isset($data_end) && empty($pax) && empty($comment)){ exit("You have not provided sufficient booking details. <br>Please use your browser to go back to the form. <br>If you experience problems with this Form, please e-mail us"); exit; } The form can be tested at http://www.phuket-beachvillas.com/contact-own/contact-it.php Can someone please check and tell me what's wrong with the code ? Thanks to anyone for any hint. How would I show the PHP code on the website page? I'm not sure if this should be under PHP or HTML or what, but, like on the forums where you see the <?php echo 'sdfjksdf'; ?> etc. How do I make it so I can write PHP on the website? I'm having trouble getting this to work. Basically I'm trying to get everything in the red boxes in the below picture to not show. http://content.screencast.com/users/rockstarvisible/folders/Jing/media/4a50bc73-f3b9-4fbd-824b-e63413e85c06/2012-04-01_1540.png Here's a screen shot of the mysql table it's pulling from: http://content.screencast.com/users/rockstarvisible/folders/Jing/media/7ec2c110-25c3-45a5-a2e6-e6c3e029b41c/2012-04-01_1842.png Only the new dosage (on row 2 of the mysql table) should start showing from march 15th and on. However, currently both dosages are showing on March 15th and on. How do I change this? Here's my code: Code: [Select] //---------------------------------------------------drug dosage information //query database and grab dosages for different days of the week $query_drug_dosage = "SELECT * FROM `users_drug_dosage` WHERE users_drug_dosage.user_id =". $_SESSION['user_id']. " ORDER BY users_drug_dosage.id"; $query_run_drug_dosage = mysql_query($query_drug_dosage) or die(mysql_error()); //create id array $id_array = array(); while ($row_drug_dosage = mysql_fetch_assoc($query_run_drug_dosage)){ $id = $row_drug_dosage['id']; $sdd_day = $row_drug_dosage['calendar_day']; $sdd_month = $row_drug_dosage['calendar_month']; $sdd_year = $row_drug_dosage['calendar_year']; $mon_dd = $row_drug_dosage['mon_dd']; $tue_dd = $row_drug_dosage['tue_dd']; $wed_dd = $row_drug_dosage['wed_dd']; $thur_dd = $row_drug_dosage['thur_dd']; $fri_dd = $row_drug_dosage['fri_dd']; $sat_dd = $row_drug_dosage['sat_dd']; $sun_dd = $row_drug_dosage['sun_dd']; //if current date >= start date of dosage if (mktime(0, 0, 0, $month, $list_day, $year) >= mktime(0, 0, 0, $sdd_month, $sdd_day, $sdd_year) ) { //switch to find out what day of the week //the current date is and then pull the drug dosage //for that specific date switch (date("D", mktime(0, 0, 0, $month, $list_day, $year))) { case 'Mon': $drug_dosage = $mon_dd; break; case 'Tue': $drug_dosage = $tue_dd; break; case 'Wed': $drug_dosage = $wed_dd; break; case 'Thu': $drug_dosage = $thur_dd; break; case 'Fri': $drug_dosage = $fri_dd; break; case 'Sat': $drug_dosage = $sat_dd; break; case 'Sun': $drug_dosage = $sun_dd; break; } //store current id in the id array $id_array[] = $id; //find current id in id array //$key1 = array_search($id, $id_array); //echo 'key 1: ' . $key1; foreach ($id_array as $value){ if ($value == $row_drug_dosage['id']){ $calendar.= str_repeat('<div class="drugdosages">Dosage: '.$drug_dosage.' Mg</div>',1); } } //echo '<br/><br/>'; //print_r($id_array); //echo '<br/><br/>'; } } //---------------------------------------------------drug dosage information this is how I think I should do it, but i'm not sure at all: pull in all the dates for all the rows in the drug dosage table join them together by a / and join function and put into an array then do a for each loop for each value in the array explode the value and seperate by / and then use that for the $sdd_month, $sdd_day, $sdd_year Hello! I've managed to solve that the content is shown AFTER 6 hours when added to the SQL. But I want to add many things on the same (current time) but I don't want everything to pop up after 6 hours. I want a 6 hour delay on EACH content I add. How do I solve this? Here is my code: $six_hours_ago = time() - 21600; $sql = "SELECT * FROM Trailers WHERE Genre LIKE '%".$_GET['show']."%' AND time < '".$six_hours_ago."' ORDER BY `Trailers`.`sort` DESC"; insert.php $sql="INSERT INTO Trailers (Poster, Title, Year, Genre, IMDB, Actors, Plot, Youtube, time) VALUES ('".mysql_real_escape_string($_POST['Poster'])."','".mysql_real_escape_string($_POST['Title'])."','".$_POST['Year']."','".mysql_real_escape_string($_POST['Genre'])."','".$_POST['IMDB']."','".mysql_real_escape_string($_POST['Actors'])."','".mysql_real_escape_string($_POST['Plot'])."','".$_POST['Youtube']."', '".time()."')"; Thanks! Hello all, Wondering if you can help me, I am wondering if it is possible to get PHP to show the last websites you viewed, just giving the names of the websites in a list. If so? is there any pointers someone can give me as to how to learn to achieve something like this..I'd really appreciate the help! Im running a website about health and foods. I would like that at the end of each article, it shows other related articles that I have on my website.
Im relatively new with php and mysql so I figure I have to put every page onto a database table.
I looked already everywhere but all I found is how to do with wordpress. But i'm not using anything like that.
I made the website myself with css and html and php.
Can somebody help me with a website where they explain how to do?
Also I would like that automatically it shows my latest articles in a sidebar. Without anytime adding myself manually.
Can anybody help me?
Hello I want get content of website and insert it to my website This website have 2000 page and each one have 10 post. I developed some code but I've some problem: Code: [Select] for($i=1;$i<=3;$i++) //$i is website pages { //download main page $maincatst = file_get_contents($catlink.$i); //$catlink select link of category of website //number of post in main page for ($j=1;$j<=10;$j++) { $linkposttmp = TextBetween('before link','after link',$maincatst) ; $link = TextBetween('before link','after link>',$linkposttmp); // download content of each link $main_post_str = file_get_contents($link); My problem is when run this file only download first link of each mainpage. anyone can help me? Hi,
I want to set two expiration dates in a form. Prior to the fall deadline, options A, B, C are displayed. After the fall date has passed, only A and B will be displayed. This works beautifully:
<?php //SET THE TIME ZONE date_default_timezone_set('America/New_York'); //CREATE TIMESTAMP VARIABLES $current_ts = time(); $fall_deadline_ts = mktime(0,0,0,9,1,2014); $winter_deadline_ts = mktime(0,0,0,12,1,2014); //IF THE FALL DEADLINE HAS PASSED if($current_ts > $fall_deadline_ts) { echo "a, b"; } else { echo "a, b ,c"; } ?>How can I tweak this so that after the Winter deadline has ALSO passed, it will only display A, rather than A, B? Thanks! need a code in php - show all posts from a irc channel on website if anyone knows how to do it, please let me know... i only need to display all the talking on mirc on my website. thank you Hi to everyone , I have used PHP for some basic things in my previous website design but am now venturing into another website for which I have a more complex use for PHP. I plan on making business directory for my local area. People will click on the area of their choice followed by the business type that they require. Then on the results page, they will have a list of all the business types in that particular area. What I would like to be able to do is rather than have the results displayed on the page like this : A Plumber xxxxx xxxxxx Tel: xxxxx xxxxxx Web: xxxxx xxxxxx E-Mail: xxxxx xxxxxx Best Plumber xxxxx xxxxxx Tel: xxxxx xxxxxx Web: xxxxx xxxxxx E-Mail: xxxxx xxxxxx Top Plumber xxxxx xxxxxx Tel: xxxxx xxxxxx Web: xxxxx xxxxxx E-Mail: xxxxx xxxxxx I would like it so that the same businesses are displayed on the page but either: 1) In a random order each time someone loads the page or 2) In a random order changed every hour The aim is so the businesses all have a shot at appearing nearer the top and aren't penalised for the 1st letter of their company name. Any help on this would be much appreciated, Thank You I've been working on developing a CMS blog and now I'm trying to create a slideshow wit Bootstrap Carousel on the homepage to present the dynamic content (images + text) using the data from table 'posts'. I tested this code, and it only presents one post. I mean, It's not possible to go to the next slide. I want to show all the posts on the slides. *The DB connection is already on the includes. The connection was written on a small file called DB.php Home.php <header> <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> <li data-target="#carouselExampleIndicators" data-slide-to="1"></li> <li data-target="#carouselExampleIndicators" data-slide-to="2"></li> </ol> <div class="carousel-inner" role="listbox"> <?php // The default SQL query $sql = "SELECT * FROM posts ORDER BY id desc"; $stmt = $ConnectingDB->query($sql); while ($DataRows = $stmt->fetch()) { $Id = $DataRows["id"]; $PostTitle = $DataRows["title"]; $Image = $DataRows["image"]; $PostText = $DataRows["post"]; ?> <!-- Slide --> <div class="carousel-item active" style="background-image: url('uploads/<?php echo $Image; ?>')"> <div class="carousel-caption"> <div class="card-body black"> <h3 class="large-mistral-white"><?php echo $PostTitle; ?></h3> <p class="small-times-white"><?php echo $PostText; ?></p> </div> </div> </div> <?php } ?> </div> <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev"> <span class="carousel-control-prev-icon" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next"> <span class="carousel-control-next-icon" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div> </header> DB.php <?php $DSN='mysql:host = localhost; dbname=everybody_blog'; $ConnectingDB = new PDO($DSN,'root',''); ?>
Hello! I would like to use cURL to login to the website: lockerz.com I have some code, but it doesn't seem to work: <?php // INIT CURL $ch = curl_init(); // SET URL FOR THE POST FORM LOGIN curl_setopt($ch, CURLOPT_URL, 'http://lockerz.com/auth/login'); // ENABLE HTTP POST curl_setopt ($ch, CURLOPT_POST, 1); // SET POST PARAMETERS : FORM VALUES FOR EACH FIELD curl_setopt ($ch, CURLOPT_POSTFIELDS, 'email-email=EMAIL@hotmail.com&password-password=PASSWPRD'); // IMITATE CLASSIC BROWSER'S BEHAVIOUR : HANDLE COOKIES curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); # Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL # not to print out the results of its query. # Instead, it will return the results as a string return value # from curl_exec() instead of the usual true/false. curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // EXECUTE 1st REQUEST (FORM LOGIN) $store = curl_exec ($ch); // SET FILE TO DOWNLOAD curl_setopt($ch, CURLOPT_URL, 'http://lockerz.com/auction'); // EXECUTE 2nd REQUEST (FILE DOWNLOAD) $content = curl_exec ($ch); // CLOSE CURL curl_close ($ch); echo $content; ?> Thank you very much if you can help! I got a question regarding a news website content that i want to make ! my question is how do i call my contents without using a lot of page? i explain let's say i got 10 news how do i put this 10 news in different pages without using 10 pages ? ex: you can see some links having a number like this http://bbc.uk/news/murder_case-12 then the next page got http://bbc.uk/news/finance-13 the title and the number id change but the page news doesnt change thanks for your answer. Hey, Well when they view my website from home. We get the same (public)ip. Is there a way to tell that these people are not the same person, not using the same ip, because i am saving data from the ip(visitors). The others will get the same date too, because of the same ip. Or is there any other way to get a unique id(number) from visitors? Hope you understand. Cheers. Is there a good how to out there on how to create a code that will tell me where a page visitor is from? Similiar to google analytics, I'd like to find out where a visitor is from but I need this information before the page loads. I've tried googling but all I come up with are sites that offer the service if I sign up with them. Also, I have a list of zip codes / cities in an excel spreadsheet .. I'd like to get this into a db table but don't want to type each one out for the next month. How could I do this? My host is godaddy on a linux box with mysql 5.X if that helps. Thank you Hey gues, My question is: how is the easy'est way to redirect i mobile visitor to: mobile.domain.com, when visiting: domain.com? Thanks:). |