Difference between revisions of "User:Q-Owl"

From Geohashing
imported>Q-Owl
imported>Q-Owl
(PHP)
Line 69: Line 69:
 
== PHP ==
 
== PHP ==
 
I like programming PHP.  
 
I like programming PHP.  
If you need a little PHP function to link from your own homepage to the geohashes of a certain day in the past, here is it:
+
If you need a nice little PHP function to link from your own homepage to the geohashes of a certain day in the past, here it is:
 
<pre>
 
<pre>
 
   function geohashing_textlink( $my_date = -1 , $klasse = "" ){
 
   function geohashing_textlink( $my_date = -1 , $klasse = "" ){
 
       /* a text link to a special day  
 
       /* a text link to a special day  
         Parameters: $my_date (optional):  0 today
+
         Parameters: $my_date (optional):  2 the day after tomorrow
 +
                                          1 tomorrow
 +
                                          0 today
 
                                           -1 yesterday and so on
 
                                           -1 yesterday and so on
 +
                                          -2 the day before yesterday
 
                     $klasse (optional):  CSS Class for the link */
 
                     $klasse (optional):  CSS Class for the link */
  
Line 81: Line 84:
  
 
       //check inputs
 
       //check inputs
       if ( $my_date > 0 ){ $my_date = 0; }
+
       if ( $my_date > 3 ){ $my_date = 0; }
 
       $klasse = trim( $klasse );  
 
       $klasse = trim( $klasse );  
  

Revision as of 05:56, 3 June 2014

Lol-asg.png 68 / m / 49,8

About Me

I like Geocaching since 2011 and I discovered geohashing 2013-09-25.

My home graticule is Mannheim, Germany (see today's point on the peeron map). Meetups in this graticule: meetups.

My Homepage: www.KlickTipps.de

Expeditions

Plans and ideas

  • Visit my Birthdayhash 1955-11-28 49 8
  • Meet up with other Geohashers
  • Cross the border to: France (specially to the little triangle in 49,8), Swizerland, Austria and other countries
  • get some different Achievements

Achievements (first occurrence)

Landgeohash.png
Q-Owl earned the Land geohash achievement
by reaching the (49, 8) geohash on 2013-09-27.
Circusgeohash.GIF
Q-Owl earned the Circus Geohash Achievement
by juggling a diabolo at the (49, 8) geohash on 2013-11-14.
2013-11-14 juggling-kl.jpg
Ferry-pic44x44.jpg
Q-Owl earned the Ferry Achievement
by reaching and leaving the hash by ferry (49, 8) geohash on 2014-03-29.


Minesweeper geohash empty.png Minesweeper geohash empty.png Minesweeper geohash empty.png
Minesweeper geohash empty.png Minesweeper geohash 0.png Minesweeper geohash empty.png
Minesweeper geohash empty.png Minesweeper geohash empty.png Minesweeper geohash empty.png
Q-Owl achieved level 0 of the Minesweeper Geohash achievement
by visiting coordinates in Mannheim,_Germany and 0 of the surrounding graticules.

little joke ;-)

PHP

I like programming PHP. If you need a nice little PHP function to link from your own homepage to the geohashes of a certain day in the past, here it is:

  function geohashing_textlink( $my_date = -1 , $klasse = "" ){
      /* a text link to a special day 
         Parameters: $my_date (optional):  2 the day after tomorrow
                                           1 tomorrow
                                           0 today
                                          -1 yesterday and so on
                                          -2 the day before yesterday 
                     $klasse (optional):   CSS Class for the link */

      $complete_date 
          = mktime(0, 0, 0, date("m"), date("d") + $my_date, date("Y"));   

      //check inputs
      if ( $my_date > 3 ){ $my_date = 0; }
      $klasse = trim( $klasse ); 

      //build link
      $text   =  date("j.n.Y" , $complete_date );  
 
      $outp  = "<a href=\"http://wiki.xkcd.com/geohashing/";
      $outp .= date("Y-n-j" , $complete_date ) . "\"";
      $outp .= " target=\"_blank\"" ;

      if ( $klasse != "" ){ $outp .= " class=\"" . $klasse . "\""; }

      $outp .= " >" . $text .  "</a>" ;

      return( $outp );
  }

Other Version with Date as input:

  function geohashing_textlink2( $my_year , $my_month , $my_day , $klasse = "" ){
      /* a text link to a special day 
         Parameters: Year, Month and Day
                     $klasse (optional):   CSS Class for the link */
      $complete_date 
          = mktime(0, 0, 0, $my_month, $my_day, $my_year);   

      //... continue like the function above