Jump to content

SandySynaptik

Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by SandySynaptik

  1. Is it important to define body element first before defining div elements? like: body { background : #123456;} #div1 { foo: bar;} or is it also valid if div element is written first, like: #div1 { foo: bar;} body { background : #123456;}
  2. How can it effect if I don't include character encoding i.e.<meta http-equiv="Content-Type" content="text/html; charset=utf-8">(the above line) on my html page.
  3. I want to define http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js as $jquerylink in a variable, so that I can link them by just typing $jquerylink.
  4. How can I cut down/shorten the following code? looks like I have used too many PHP tags. <!DOCTYPE html><html lang="en-us"><head> <meta charset="utf-8"></head><body><?php$IP = $_SERVER["REMOTE_ADDR"];$geodata = file_get_contents('http://api.geoio.com/q.php?key=6wVGBk7TshKizPJI&qt=geoip&d=comma&q=$IP');$pieces = explode(",", $geodata);echo $geodata;?><br />Your city : <?php echo $pieces[0];?><br />Your State: <?php echo $pieces[1];?><br />Your Country: <?php echo $pieces[2];?><br />Your Location (Lat): <?php echo $pieces[4];?><br />Your Location (Long): <?php echo $pieces[5];?><br />Your Location: <a href="http://maps.google.com/?q=<?php echo $pieces[4],", ", $pieces[5];?>"><?php echo $pieces[4],", ", $pieces[5];?></a><br />Your Country Code: <?php echo $pieces[6];?><br /><br />* I can't guaranty geolocational data, don't rely on them.</body></html>
  5. Oh ######! I posted wrong thing. Actually I was trying to put a comma and space between pieces[4] and pieces[5] and the code was something like this <?php echo $pieces[4],", " $pieces[5];?>
  6. What is wrong in this script? <?php echo $pieces[4], $pieces[5];?> I am trying to echo 2 variable in same line.
  7. The problem is how do i sent this request for each of them who visits this page?Below is something I am up to: <!DOCTYPE html><html lang="en-us"><head><meta charset="utf-8"></head><body><?php$ip = $_SERVER["REMOTE_ADDR"];?></body></html>
  8. I am using a web service called Geo I/O which lets me locate an IP address and get their Country, State, City and Latitudinal and Longitudinal status.The request that is sent is something like:http://api.geoio.com/q.php?key=YOUR TOKEN&qt=&d=comma&q=IP ADDRESS The above request sent gives a string like:Calcutta,West Bengal,India,Bcl East,22.5697,88.3697,IN Now I want the above string arranged something like this in the webpage:City: CalcuttaState: West BengalCountry: IndiaLatitude: 22.5697Longitude: 88.3697 Please help me out.
  9. I know I know that I don't need to know about their browser to show their IP address. Showing IP address is just a part of that. Till now I have extended that page to show. User's IP address User's Browser User's Screen Resolution and user's User Agent I want to add more details as possible.
  10. I am trying to make my own "What's Your IP Address" page. There is nothing technical. So, how can I?
  11. I want to have the browser's version in a variable and show it somewhere on the page. Every browser have different version pattern I think. How can I do so?
  12. Problem is solved, what is HTTP_X_FORWARDED_FOR?
  13. The problem still exists. See the attachment.send.php
  14. I am using something like this for echoing: <ul><?phpecho '<li><strong>Browser:</strong> <span>'.$browser.'</span></li>';?></ul> But getting an error about Notice: Undefined variable: browser in...
  15. I have a PHP script something like this: <?phpif (strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== FALSE) { echo 'Firefox';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome') !== FALSE) { echo 'Google Chrome';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Iron') !== FALSE) { echo 'SRWare Iron';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Presto') !== FALSE) { echo 'Opera';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== FALSE) { echo 'Apple Safari';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { echo 'Internet Explorer';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'ChromePlus') !== FALSE) { echo 'ChromePlus';}elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'SeaMonkey') !== FALSE) { echo 'SeaMonkey';}else { echo '[Sorry, I can\'t recognise your browser, most probably because you might be on mobile device]';}?> Now I want it to store it (browser's name) in a variable so that I can echo it on appropriate place.
  16. I don't want my directory to be indexed/listed and want that request to error.html
  17. I was carrying an experiment and again this issue came upThis time I'm fighting with DIVs instead of iframe : http://synaptik.co.cc/random/color/generator
  18. OK, I will do the left click part later but there isn't any right click event i think.
  19. Is anything unclear??See this page: http://synaptik.co.cc/randomcolor Now I want that when I right click then that page reload, and when I left click then it copies whatever is in the <h1> tag.
  20. I want such a functionality where when user right clicks on the page then it should reload the page and when (s)he lft clicks then the content of that id/class should be copied.
  21. The idea is right, but I can still see the vertical scrollbar.http://synaptik.co.cc/example
  22. I have an iframe, I want it appear in full window (height and width) whatever is the user's resolution but want to prevent it from making any scrollbars.
  23. And what should be the length/value of that varchar of that field?
  24. I want a webpage that whenever a user visits that webpage it track/store its IP address and the time of the visit to the database. I think emailing the whole thing would be more easier than storing into database.
×
×
  • Create New...