background preloader

PHP

Facebook Twitter

Zend Framework from Scratch – Models and Integrating Doctrine ORM. Ready to take your PHP skills to the next level?

Zend Framework from Scratch – Models and Integrating Doctrine ORM

In this new “From Scratch” series, we'll focus exclusively on Zend Framework, a full-stack PHP framework created by Zend Technologies. This second tutorial on our series is entitled “Models and Integrating Doctrine ORM”. Review Welcome back to our Zend Framework from Scratch series! In our last tutorial, we learned some basic things about Zend Framework, such as: Where to download the latest Zend Framework filesWhere and how to set it up locallyCreating your first Zend Framework project and setting up a VirtualHost on your web serverHow exactly Zend Framework implements the MVC pattern and its default application routingPassing data from a controller to its viewCreating a site-wide layout for your Zend Framework applicationCreating new controllers and actions If you haven't yet, you should give the previous tutorial a read.

In this second part of the series, we'll be talking about a crucial part of any web application — the MODELS.

Zend Framework

Login with Facebook and Twitter using PHP — Tech Blog. Use your Facebook account to sign into other sites and see what your friends are doing across the web. Facebook and Twitter have become large in the social network world and both networks offering oAuth support. Use your Facebook account to sign into other sites and see what your friends are doing across the web. Visitors will be far more likely to become members and participate on your site if all they have to do is login with their existing Facebook account. “Sign in with Twitter” is the pattern of authentication that allows users to connect their Twitter account with third-party services in as little as one click. It utilizes OAuth and although the flow is very similar, the authorization URL and workflow differs slightly as described below. 9lession developed a system to login with Twitter and Facebook.

The code is in PHP which can easily migrate in other like asp.net. 1) Source code download for Login with Facebook and Twitter 2) Demo for Login with Facebook and Twitter. Securimage PHP Captcha. Securimage requires no configuration after downloading.

Securimage PHP Captcha

All you need to do is display the captcha image somewhere in your form, and validate the code submitted from within your form processor. Customising the image is also very easy. Der RegExp-Evaluator - RegExp-Tutorial. Hier finden Sie ausführliche Informationen zum Aufbau und zur Verwendung von Regulären Ausdrücken.

Der RegExp-Evaluator - RegExp-Tutorial

Der größte Teil des Tutorials bezieht sich dabei auf die Verwendung von Regulären Ausdrücken im Zusammenspiel mit PHP. Da es sich hierbei um die PCRE (PERL Compatible Regular Expression) handelt, sind viele Aspekte auch auf andere Sprachen übertragbar, manche sind PHP-eigen. Sollten Sie irgendwo im Tutorial falsche oder mißverständliche Informationen finden, so können Sie mir das gerne mitteilen. Vorschläge zu neuen Themen und Anregungen sind natürlich auch gern gesehen. Das Tutorial gliedert sich in mehrere Abschnitte, die dem Anspruch an der Leser nach geordnet sind. Für Vollständigkeit möchte ich an dieser Stelle nicht garantieren - ich bin aber bemüht, fehlende Informationen zu ergänzen. GeoLocation mit PHP. GeoLocation ist das herausfinden des Standortes einer IP-Adresse.

GeoLocation mit PHP

So funktionieren zum Beispiel die standortspezifischen Anzeigen mittels Google AdWords. Wenn ihr mittels GeoLocation auch auf eurer Seite den Standort des Lesers ermitteln wollt habe ich heute etwas für euch: GeoLocation funktioniert mit PHP in nur einer Codezeile! Basis hierfür ist ein Webservice von GeoPlugin.net. Dem muss man einfach über einen GET-Parameter die IP-Adresse übergeben. Zurück bekommt man einen serialisierten String. Als Ergebnis bekommt man folgendes Array zurück: (mit print_r($location)): Wie auch beim Kartenoverlay von Google sind die Angaben nicht ganz genau. Ich denke eine wirkliche Genauigkeit ist auch nicht ganz so wichtig.