Updates from December, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • DerFichtl 8:24 pm on December 13, 2012 Permalink
    Tags: , , wrench   

    Wrench – The new HTML5 Websocket Class Hero for PHP 

    Wrench is an up-to-date websocket server implementation in php that works with current chrome and firefox versions. The library has no external dependencies, just php 5.3 is required. Some code says more than thousand words …

    A simple server looks like …

     
    #!/usr/bin/env php
    <?php
     
    require(__DIR__ . '/lib/SplClassLoader.php');
     
    $classLoader = new SplClassLoader('Wrench', __DIR__ . '/lib');
    $classLoader->register();
     
    $server = new \Wrench\Server('ws://0.0.0.0:8080/', array(
        'allowed_origins' => array('bohuco.net'),
    ));
     
    $server->registerApplication('echo', new \Wrench\Application\EchoApplication());
    $server->run();

    It’s important to bind the Socket on IP 0.0.0.0 … i first tried it with 127.0.0.1 then the socket is not reachable from external network. If you have a firewall like on Amazon EC2 you must configure it so, that the port (eg.: 8080) is open.

    The actual application …

    … is separated into another class/namespace … here is an example of a simple EchoApplication that echos the received message back:

     
    namespace Wrench\Application;
     
    use Wrench\Application\Application;
    use Wrench\Application\NamedApplication;
     
    class EchoApplication extends Application {
        public function onData($data, $client) {
     
            $client->send($data);
     
        }
    }

    The javascript part would look like this …

    The last part (/echo) of the websocket address is the application name, this name must be registered in server.php with the registerApplication-method (see above).

     
    if ("WebSocket" in window) {
        ws = new WebSocket("ws://46.51.177.248:8080/echo");
     
        ws.onopen = function() {
            ws.send('INIT');
        };
     
        ws.onmessage = function(evt) {
            console.log(evt.data);
        };
     
        ws.onclose = function(evt) {
        	ws.send('MESSAGE');
        };
     
        ws.onerror = function(evt) { }
     
    } else {
    	alert("WebSocket NOT supported by your Browser!");
    }

    More infos and documentation about Wrench:





     
  • DerFichtl 10:35 am on December 8, 2012 Permalink  

    Update WordPress and plugins with SFTP on Amazon EC2 

    On a FTP host wordpress updates are very straight forward, just fill your user credentials in the input fields and click the update-button. But what if you are on a amazon ec2 instance with SSH access only. There is no field for your private key or pem-file.

    The wordpress plugin “SSH/SFTP Updater Support” adds a text-field and an upload-field for your Amazon EC2 private key to the install-/update-screen. So you can then use the updater for plugin updates and installs and even wordpress system updates.

    Plugin Page:
    http://wordpress.org/extend/plugins/ssh-sftp-updater-support/

     
  • DerFichtl 6:57 am on November 25, 2012 Permalink  

    How to Licence Apple Fonts for Web Usage 

    … not so easy as first thought: Buy a “Web-Licence” or “Web-Font” and use it on your page … thats not possible with apple fonts.

    If you want browsersafe use one of more than 300 adobe webfonts like myriad, garamond or juniper you have to do it via typekit or webink. Just this two vendors can sell web licences for apple fonts.

     

    Both services are easy to use: Just select the fonts you want to use and then insert the provided snippet in your webpage. Typekit uses javascript to deliver the font, webink do it with css-tag. So i like the webink delivery version more.

    <!-- html head -->
    <link href="http://fnt.webink.com/wfs/webink.css/
        ?project=CD0700EA-B4D9-4AFA-A52E-1F3AB19287CF
        &fonts=73E6C83D-7F13-A8AE-4770-C315AE5061C3:f=MyriadPro-Regular" rel="stylesheet" type="text/css"/>
    /* in css */
    @import url("http://fnt.webink.com/wfs/webink.css/
        ?project=CD0700EA-B4D9-4AFA-A52E-1F3AB19287CF
        &amp;fonts=73E6C83D-7F13-A8AE-4770-C315AE5061C3:f=MyriadPro-Regular");

    The pricing is based  on website usage … typekit on pageviews and webink on unique users. The prices goes from free to 120 USD per year for larger websites. More Infos you can find on the Adobe web fonts site.

     
  • DerFichtl 7:46 pm on November 23, 2012 Permalink  

    Windows 8 – to app or not to app 

    Vor kurzem hatte ich ein nettes Gespräch mit einem Herrn von Microsoft Österreich der mir die zukünftige Windows 8 Welt näher erklärt hat.

    More …

     
  • DerFichtl 7:22 pm on November 22, 2012 Permalink  

    Neurale Netzwerke in PHP programmieren 

    Neural Network ist ein relativ einfacher Algorithmus mit dem man allerhand interessante Dinge anstellen kann. Grundsätzlich funktionierts so das man das Neuronen-Netzwerk mit Trainingsdaten füttert, aufgrund dieses Trainingssets kann das Netzwerk dann andere Daten auswerten.

    More …

     
  • DerFichtl 9:35 pm on August 8, 2012 Permalink  

    RE: 5 Things You … bla bla … PHP Performance 

    Hey guys, hey Gonzalo!

    i’ve read now this very, very long article from Gonzalo Ayuso on DZone about PHP performance.

    More …

     
  • DerFichtl 6:31 pm on August 3, 2012 Permalink
    Tags: , ,   

    How to find files and directories by modification date recursive on linux (debian):
    find /path/ -exec stat \{} –printf=”%y %n\n” \; | sort -n -r | head -25

     
  • DerFichtl 9:21 pm on June 1, 2012 Permalink
    Tags: , ,   

    Hassle-free Eventbinding with jQuery .on() 

    Reattaching eventhandlers after ajax requests produces ugly and very odd code. It’s better you use jQuery .live()-event-attaching which attaches automatically the handler to all new elements with the same selector. In the current version of jQuery 1.7 the live()-method is replaced by on() that combines all possible event-attaching features of jQuery.

    More …

     
  • DerFichtl 11:29 am on April 30, 2012 Permalink
    Tags: , geocoding, google maps,   

    Javascript MindFuck: Google Maps GeoCoder Callback with Parameters 

    If you have ever tried to geocode with google maps you have perhaps noticed that you can’t easy pass more data to the callback function. And geocoding on an array of addresses won’t work too, because you get always the result for the last entry of your array.

    More …

     
  • DerFichtl 11:00 pm on February 2, 2012 Permalink  

    New Bootstrap Version by Twitter 

    Today Twitter released a new version of their popular html/css boilerplate for webpages. A good time to introduce my favorite bootstrap features …

    1. Icons, Icons, Icons

    Bootstrap includes a fat icon sprite with 120 small icons from glyphicons.com. all have transparent background and are available in black and in white.

    2. Inline Labels

    Put some highlights in your texts with inline labels.

    3. Real Button Porn

    Buttons in different colors, with and without dropdown and in groups or lonely.

    … and what is your favorite feature from twitter bootstrap?

     
  • DerFichtl 8:28 pm on August 29, 2011 Permalink
    Tags: database, mssql,   

    7 Fields Every Database Table May Need … 

    No matter if you work with MySQL, MSSQL, PostgreSQL or another database system, there are some columns any database table most likely may need …

    More …

     
    • opensas opensas 1:29 am on August 31, 2011 Permalink | Reply

      I always have this fields
      id (obvious) totally transparent to the user
      code candidate unique key, known to the user
      description

      created_at
      created_by (user id)
      updated_at
      updated_by

      saludos

      sas

    • opensas 1:29 am on August 31, 2011 Permalink | Reply

      I always have this fields
      id (obvious) totally transparent to the user
      code candidate unique key, known to the user
      description

      created_at
      created_by (user id)
      updated_at
      updated_by

      saludos

      sas

    • Guest 7:33 am on August 31, 2011 Permalink | Reply

      Sorry… but three field doin the same… not really good database design..

      • Anonymous 8:03 am on August 31, 2011 Permalink | Reply

        sorry maybe i wrote it a bit mistakable … i use status OR hidden OR active … not all three together … that would be a bit much status-flags :)

    • Guest 7:33 am on August 31, 2011 Permalink | Reply

      Sorry… but three field doin the same… not really good database design..

      • MF 8:03 am on August 31, 2011 Permalink | Reply

        sorry maybe i wrote it a bit mistakable … i use status OR hidden OR active … not all three together … that would be a bit much status-flags :)

    • Anonymous 8:01 am on August 31, 2011 Permalink | Reply

      yes, userIds … i tought of it but don’t use it always … helps to find the guilty :)

    • MF 8:01 am on August 31, 2011 Permalink | Reply

      yes, userIds … i tought of it but don’t use it always … helps to find the guilty :)

    • Tomáš Záluský 8:56 am on August 31, 2011 Permalink | Reply

      Good checklist for designing new database but certainly not every table needs all columns stated here.
      I would append “version” column for Hibernate optimistic locking.

      • Anonymous 8:59 am on August 31, 2011 Permalink | Reply

        you are right but i needed a good article title :) … i don’t use hibernate … do you have a link how hibernate optimistic locking works?

    • Tomáš Záluský 8:56 am on August 31, 2011 Permalink | Reply

      Good checklist for designing new database but certainly not every table needs all columns stated here.
      I would append “version” column for Hibernate optimistic locking.

      • MF 8:59 am on August 31, 2011 Permalink | Reply

        you are right but i needed a good article title :) … i don’t use hibernate … do you have a link how hibernate optimistic locking works?

    • Concerned Global Citizen 7:09 pm on August 31, 2011 Permalink | Reply

      are you using an ORM that recognizes your Active columns? I imagine the WHERE clause if there are complex joins – it seems too complex to me. Also a description column in each table? talk about a candidate for normalization. This post has too much bad advice. – mec

      • Anonymous 7:34 pm on August 31, 2011 Permalink | Reply

        it’s just my experience that such fields can save you later headache … i avoid too complex joins … they are too slow (MySQL) and the ORM recognizes my status (active, …) as integer value (what do you mean with recognize?)

        discription in many tables like company, user, product, …

        btw: in general normalization is a good and important thing … but performance is (sometimes) better

        what is your … better … advice?

    • Concerned Global Citizen 7:09 pm on August 31, 2011 Permalink | Reply

      are you using an ORM that recognizes your Active columns? I imagine the WHERE clause if there are complex joins – it seems too complex to me. Also a description column in each table? talk about a candidate for normalization. This post has too much bad advice. – mec

      • MF 7:34 pm on August 31, 2011 Permalink | Reply

        it’s just my experience that such fields can save you later headache … i avoid too complex joins … they are too slow (MySQL) and the ORM recognizes my status (active, …) as integer value (what do you mean with recognize?)

        discription in many tables like company, user, product, …

        btw: in general normalization is a good and important thing … but performance is (sometimes) better

        what is your … better … advice?

    • Techbrainless 9:15 pm on September 3, 2011 Permalink | Reply

      Great post but i have got confused regarding the 3 columns
      active, inactive or deleted
      hidden or visible
      status

      1. ) can we merge them in a single column , because if we make test records then we can delete those test records and mark them as “deleted” ?

      2. ) in status column you have mentioned that some of the status are active , inactive , ….
      but this conflict with the colum called “active , inactive or deleted” could plz justify

    • Techbrainless 9:15 pm on September 3, 2011 Permalink | Reply

      Great post but i have got confused regarding the 3 columns
      active, inactive or deleted
      hidden or visible
      status

      1. ) can we merge them in a single column , because if we make test records then we can delete those test records and mark them as “deleted” ?

      2. ) in status column you have mentioned that some of the status are active , inactive , ….
      but this conflict with the colum called “active , inactive or deleted” could plz justify

    • Mymail 8:25 am on July 14, 2012 Permalink | Reply

      So many many bad advice !
      This is exactly what you MUST NOT do !
      I think you need to read about normalisation and you will increase performance !

  • DerFichtl 8:37 pm on June 2, 2011 Permalink  

    Image Watermarks in WordPress 

    Here a quick and easy way to put watermarks in your images. Just copy the code in the function.php of the active theme and you can watermark your pictures in wordpress admin.

    More …

     
    • Aneeq Tariq 11:34 am on June 6, 2012 Permalink | Reply

      Watermarking an image in PHP is very easy. If you follow the code below, you can do it in 2 minutes.

      <?php

      function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) {
      //$SourceFile is source of the image file to be watermarked
      //$WaterMarkText is the text of the watermark
      //$DestinationFile is the destination location where the watermarked images will be placed

      //Delete if destinaton file already exists
      @unlink($DestinationFile);

      //This is the vertical center of the image
      $top = getimagesize($SourceFile);
      $top = $top[1]/2;
      list($width, $height) = getimagesize($SourceFile);

      $image_p = imagecreatetruecolor($width, $height);

      $image = imagecreatefromjpeg($SourceFile);

      imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);

      //Path to the font file on the server. Do not miss to upload the font file
      $font = ‘arial.ttf’;

      //Font sie
      $font_size = 16;

      //Give a white shadow
      $white = imagecolorallocate($image_p, 255, 255, 255);
      imagettftext($image_p, $font_size, 0, 10, $top, $white, $font, $WaterMarkText);

      //Print in black color
      $black = imagecolorallocate($image_p, 0, 0, 0);
      imagettftext($image_p, $font_size, 0, 8, $top-1, $black, $font, $WaterMarkText);

      if ($DestinationFile”) {

      imagejpeg ($image_p, $DestinationFile, 100);

      } else {

      header(‘Content-Type: image/jpeg’);

      imagejpeg($image_p, null, 100);

      };

      imagedestroy($image);

      imagedestroy($image_p);

      };

      ?>

      <?php

      $SourceFile = ‘image.jpg’;//Source image
      $DestinationFile = ‘watermarked/image.jpg’;//Destination path
      $WaterMarkText = ‘www.phpHelp.co’;//Watermark text

      //Call the function to watermark the image
      watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile);

      //Display watermarked image if desired
      if(file_exists($DestinationFile)){
      echo “”;
      echo “The image has been watermarked at ‘”.$DestinationFile.”‘”;
      }
      ?>

      Note:

      This code is being provided to you as a help by http://www.phpHelp.co without any warranty and liability
      Place all the files in a folder on web server.
      Do not forget to upload the font file – arial.ttf.
      Once the image is watermarked, it will be placed in the folder named ‘watermarked’.
      You might need to give ‘write permission’ or ’777 permission’ to the folder named ‘watermarked’ as the new watermarked image will be written in this folder.

      Source:
      http://addr.pk/a730e
      AND
      http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/

    • Aneeq Tariq 11:34 am on June 6, 2012 Permalink | Reply

      Watermarking an image in PHP is very easy. If you follow the code below, you can do it in 2 minutes.

      <?php

      function watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile) {
      //$SourceFile is source of the image file to be watermarked
      //$WaterMarkText is the text of the watermark
      //$DestinationFile is the destination location where the watermarked images will be placed

      //Delete if destinaton file already exists
      @unlink($DestinationFile);

      //This is the vertical center of the image
      $top = getimagesize($SourceFile);
      $top = $top[1]/2;
      list($width, $height) = getimagesize($SourceFile);

      $image_p = imagecreatetruecolor($width, $height);

      $image = imagecreatefromjpeg($SourceFile);

      imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width, $height);

      //Path to the font file on the server. Do not miss to upload the font file
      $font = ‘arial.ttf’;

      //Font sie
      $font_size = 16;

      //Give a white shadow
      $white = imagecolorallocate($image_p, 255, 255, 255);
      imagettftext($image_p, $font_size, 0, 10, $top, $white, $font, $WaterMarkText);

      //Print in black color
      $black = imagecolorallocate($image_p, 0, 0, 0);
      imagettftext($image_p, $font_size, 0, 8, $top-1, $black, $font, $WaterMarkText);

      if ($DestinationFile”) {

      imagejpeg ($image_p, $DestinationFile, 100);

      } else {

      header(‘Content-Type: image/jpeg’);

      imagejpeg($image_p, null, 100);

      };

      imagedestroy($image);

      imagedestroy($image_p);

      };

      ?>

      <?php

      $SourceFile = ‘image.jpg’;//Source image
      $DestinationFile = ‘watermarked/image.jpg’;//Destination path
      $WaterMarkText = ‘www.phpHelp.co’;//Watermark text

      //Call the function to watermark the image
      watermarkImage ($SourceFile, $WaterMarkText, $DestinationFile);

      //Display watermarked image if desired
      if(file_exists($DestinationFile)){
      echo “”;
      echo “The image has been watermarked at ‘”.$DestinationFile.”‘”;
      }
      ?>

      Note:

      This code is being provided to you as a help by http://www.phpHelp.co without any warranty and liability
      Place all the files in a folder on web server.
      Do not forget to upload the font file – arial.ttf.
      Once the image is watermarked, it will be placed in the folder named ‘watermarked’.
      You might need to give ‘write permission’ or ’777 permission’ to the folder named ‘watermarked’ as the new watermarked image will be written in this folder.

      Source:
      http://addr.pk/a730e
      AND
      http://phphelp.co/2012/06/01/how-to-watermark-an-image-in-php/

  • DerFichtl 7:52 pm on April 5, 2011 Permalink  

    Firefox 4 – Neue HTTP Header 

    Mit der neuen Version des Firefox wurden einige neue HTTP Header eingeführt die Entwicklern die Arbeit etwas erleichtern sollen und den Benutzer besser schützen.

    More …

     
  • DerFichtl 7:31 am on March 24, 2011 Permalink
    Tags: , ,   

    Nebel des Grauens – PHPFog 

    Man will ja in diesen Tagen fast nicht von Gau oder Super-Gau sprechen aber der Herr Lucas Calson, Gründer und Inhaber von PHPFog, wird die Ereignisse der letzten Tage sicher so bezeichnen …

    More …

     
  • DerFichtl 1:14 pm on February 19, 2011 Permalink
    Tags: , , , translate   

    Translate your Site with Google Translate and jQuery 

    With the new Google Translate API and the jQuery Plugin from Balazs Endresz you can add more language versions within seconds.

    More …

     
    • Gordon 2:12 pm on February 19, 2011 Permalink | Reply

      Wir müssen das HTML für die Sprach-Auswahl, und eine kurze Javascript … ;)

      • DerFichtl 11:03 pm on February 20, 2011 Permalink | Reply

        :) Tja, die automatischen Übersetzungen … aber immer noch besser als gar keine Übersetzung …

  • DerFichtl 1:10 pm on February 12, 2011 Permalink
    Tags: oauth, ,   

    OAuth mit PHP am Beispiel der Twitter API 

    Auf den ersten Blick ist OAuth eine scheißkomplizierte Sache, aber mit dieser kurzen Anleitung und dem Zend Framework wird es plötzlich ganz einfach …

    More …

     
    • Philipp 8:41 pm on March 14, 2011 Permalink | Reply

      Hallo,
      Erstmal vielen Dank für das tolle Tutorial.
      Allerdings scheitere ich bereits am Anfang daran, da ich nicht weiß welche bzw. woher ich die dateien aus dem Zend Framework einbinden muss.
      Ich habe mir das Packet runtergeladen, jedoch finde ich dort eine vielzahl an dateien und ordner etc.
      Könntest du mir vl. sagen welche dateien ich da genau benötige?
      In dem Tutorial steht nämlich nichts dergleichen.

      Würde mich über eine möglichst rasche Antwort sehr freuen!

      Vielen Dank
      Lg,
      Philipp

    • DerFichtl 10:03 pm on March 15, 2011 Permalink | Reply

      man kann zend framework hinspeichern wo man will … im script wird dann mit set_include_path der pfad für die includes gesetzt, beispiel wenn du zend framework unter /var/www/yourpage/lib kopierst dann kannst du mit set_include_path(get_include_path().’:/var/www/yourpage/lib’) den include pfad richtig setzen und mit require_once(‘Zend/Oauth/Consumer.php’); die erforderliche Datei inkludieren … also einfach immer die Unterstriche des Klassennamen durch Slash ersetzen dann ist man meistens schon richtig dran.

      sorry … das ich nicht so schnell mitm antworten war

  • DerFichtl 11:11 pm on February 8, 2011 Permalink
    Tags: , , mongodb, , ,   

    PHP in der Cloud: cloudControl aus Deutschland bietet PaaS für PHP 

    Wer eine Webseite betreibt oder gar eine Webapplikation muss sich unweigerlich um Hosting und Server Administration kümmern. Dabei gibt es mittlerweile unendlich viele Möglichkeiten … aber jetzt kommt noch eine dazu: Platform as a Service (PaaS)

    Keine Hardware Investitionen, nie wieder Server administrieren oder Sicherheitspatches einspielen müssen, das System skaliert automatisch und das Deploy wird einfacher: Das klingt doch alles wunderbar und das alles bietet SaaS!

    Platform as a Service (PaaS) gibt es seit einigen Jahren für Java (Google AppEngine) oder für .NET (Microsoft Azure) aber für PHP sieht es derzeit noch etwas mau aus. Diese Lücke möchte jetzt cloudControl aus Potsdam schließen …

    More …

     
  • DerFichtl 8:53 am on February 8, 2011 Permalink
    Tags: cli, ,   

    PHP Commandline Script in Farbe 

    Bei PHP Gangster hab ich soeben eine kleine Klasse entdeckt mit der CLI Scripte farbige Ausgaben machen können …

    Usage:

     
    $color = new Color();
    $color->set('red');
     
    echo "red textn";
     
    $color->reset(); 
    $color->echoString("red text on bluen", 'red_u', 'blue');
     
  • DerFichtl 8:38 am on February 7, 2011 Permalink
    Tags: hint, ,   

    MySQL Hint: REPLACE / UPDATE 

    Replace strings with SQL in a field for all rows …

     
    UPDATE `table` SET `field` = REPLACE(`field`, 'search string', 'replace with this') WHERE 1=1;

    via @vogrim

     
  • DerFichtl 10:08 am on January 31, 2011 Permalink
    Tags: chat, example, , , ,   

    PHP5 WebSocket Example – A Simple Chat 

    The classic example for websockets is a chat. This chat example has only 200 lines of code (excl. the Websocket class), is really easy to understand and customizable.

    More …

     
  • DerFichtl 2:05 pm on January 16, 2011 Permalink
    Tags: aod, aop, , oop, ,   

    Der Erklärbär: Aspect-Oriented Programming mit PHP – Teil 1 – Signal Slot 

    Wiedermal was Neues!? Wiedermal wird die (Web-)Programmierer-Welt auf den Kopf gestellt!? Objektorientiert ist gelber Schnee von Vorgestern, Design-Patterns verwendet heute schon deine Oma fürs Putzen … und jetzt kommt: TaTaaaa! AOP – Aspect Oriented Programming.

    Der Erklärbär erklärt’s! (er versucht es zumindest)

    More …

     
  • DerFichtl 9:17 am on January 14, 2011 Permalink
    Tags: , , , , ,   

    New Google Ranking Checker with Locale-Support 

    A new release of the Google Ranking Checker Class is available now. The new version 1.2.0 is released under a Creative Commons license (by-sa 3.0) and supports locale settings for language and country.

    More …

     
    • Soren 6:54 am on January 20, 2011 Permalink | Reply

      Hi there

      Love the script – Although, I cant get it to work properly… For some keywords it’s ok, but for others it just dont return a result…

      I.e. I have a site called notebooktoshiba.net – I know for a fact that it is currently on position 13 on Google. The script turns up a blank for both “notebook toshiba” and for “notebooktoshiba” – Even “notebooktoshiba.net” gives a blank which should be a given 1st place position on Google. I have the same results for many other sites… What gives?

      I’ve set the locale to “$rankingChecker->setLocale(‘us’, ‘en’);”

      Good work btw ;) Would love to make this work and not jump on a Google scraper…

    • Google Search Rank Checker 4:20 pm on May 25, 2011 Permalink | Reply

      You can use Google search rank checker to check your rankings

    • Google Search Rank Checker 5:19 pm on May 25, 2011 Permalink | Reply

      You can use Google search rank checker to check your rankings

    • Zabbath 8:06 am on August 17, 2011 Permalink | Reply

      I just want to know how to modify your script become multi Ses, so I can chek rank using Google, yahoo and bing using your existing code

    • Zabbath 8:06 am on August 17, 2011 Permalink | Reply

      I just want to know how to modify your script become multi Ses, so I can chek rank using Google, yahoo and bing using your existing code

    • Roger Tschallener 2:49 pm on August 27, 2011 Permalink | Reply

      Ich habe eine kleine Anpassung in der Class vorgenommen, da diese ab dem zweiten Keyword des Arrays bei mir etwas gezickt hat.

      Folgender Bereich habe ich VOR das “foreach($keywords as $keyword) {” verschoben:
      if (! empty($this->country)) {
      $this->country = ‘&gl=’.$this->country;
      }

      Darfst du gerne für ein Update übernehmen ;)

    • Roger 2:49 pm on August 27, 2011 Permalink | Reply

      Ich habe eine kleine Anpassung in der Class vorgenommen, da diese ab dem zweiten Keyword des Arrays bei mir etwas gezickt hat.

      Folgender Bereich habe ich VOR das “foreach($keywords as $keyword) {” verschoben:
      if (! empty($this->country)) {
      $this->country = ‘&gl=’.$this->country;
      }

      Darfst du gerne für ein Update übernehmen ;)

    • Arthur J 11:15 pm on February 2, 2012 Permalink | Reply

      Does anyone know what’s the daily limit on querying Google?

    • Arthur J 11:15 pm on February 2, 2012 Permalink | Reply

      Does anyone know what’s the daily limit on querying Google?

    • Vmukul111 5:24 am on February 11, 2012 Permalink | Reply

      Thanks for the nice code!
      But I could not make it work properly. It always shows the same result unaffecting by locale settings.

      And Can I use your API in my code?
      I could not get one from the link given by you

    • Vmukul111 5:24 am on February 11, 2012 Permalink | Reply

      Thanks for the nice code!
      But I could not make it work properly. It always shows the same result unaffecting by locale settings.

      And Can I use your API in my code?
      I could not get one from the link given by you

    • Msathesh 6:25 am on March 29, 2012 Permalink | Reply

      Your script is accurately displaying the rankings but when I run it on my localhost, it’s getting me the rankings wrongly more often. I simply, do not understand why it’s display different results for same script. The only difference is API key. Which makes no sense to me. Do you know why? Thanks for the script though.

    • Msathesh 6:25 am on March 29, 2012 Permalink | Reply

      Your script is accurately displaying the rankings but when I run it on my localhost, it’s getting me the rankings wrongly more often. I simply, do not understand why it’s display different results for same script. The only difference is API key. Which makes no sense to me. Do you know why? Thanks for the script though.

    • stevo 5:02 pm on April 8, 2012 Permalink | Reply

      Hey there,
      I tried the script on my server and while it does return results, they are different from those shown in the Bohuco Labs example (which are actually correct in my case). In both cases I use de/de for lang/country. Any idea why the script shows different results?
      Cheers,
      Stefan

    • stevo 5:02 pm on April 8, 2012 Permalink | Reply

      Hey there,
      I tried the script on my server and while it does return results, they are different from those shown in the Bohuco Labs example (which are actually correct in my case). In both cases I use de/de for lang/country. Any idea why the script shows different results?
      Cheers,
      Stefan

    • Arthur J 11:13 pm on February 2, 2012 Permalink | Reply

      try ‘en’,'us’

  • DerFichtl 10:16 am on January 7, 2011 Permalink
    Tags: , ec2, ftp, ,   

    Mount Amazon Ec2 with Mac OSX 

    MacFusion is a free OSX app for mounting FTP and SFTP (SSH) drives into mac finder. Usually you use a user/password combination for authentification but if you want mount an amazon ec2 instance you have to use the pem-file you get here.

    More …

     
    • credes 11:16 am on November 11, 2011 Permalink | Reply

      Hey, how did you configure MacFusion? I can ssh into ec2 without problems, but macfusion tells me “authentication has failed”. I used “ec2-user” and the elastic ip address, but no password.

    • credes 11:16 am on November 11, 2011 Permalink | Reply

      Hey, how did you configure MacFusion? I can ssh into ec2 without problems, but macfusion tells me “authentication has failed”. I used “ec2-user” and the elastic ip address, but no password.

  • DerFichtl 7:02 pm on December 28, 2010 Permalink
    Tags: , , select,   

    MySQL/SQL: count chars in table field 

    SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,’-',”)) AS count FROM table

     
  • DerFichtl 11:40 pm on December 1, 2010 Permalink
    Tags: , ,   

    PHP Websocket Class new Version 

    Auf Anfrage einiger Leser habe ich jetzt die Klasse kommentiert und Informationen zur Lizenz hinzugefügt. An der Funktionalität hat sich nichts geändert. Die aktuelle Version 1.0.5 ist unter folgender URL zu finden: http://bohuco.net/labs/php-websocket-class/lib/WebSocketServer1.0.5.php.txt

    More …

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel