Squids my favorites

One of my best maritim meat is the squid, few days ago i cooked a recipe with risotto, egs, curry and squids and was delicious. Check here and tell me if you like it squids recipe

SEO powered by White Label SEO

calamari

Calamari

Wall songs app for facebook

Im sure that all the songs you are share on the facebook are lost in the timeline. Now you can listen all your wall songs in a very cool facebook app WallSongs.

Evaluating the management rights business opportunity is necessary to know the risks and the benefits. It allows prospective buyers to weigh their options first before signing the contract. The evaluation process would be easy if buyers will work with a company that specialises in the sale of management rights in Brisbane .

Wall Songs on Facebook

Zend Framework 2 Assets loader module

I recently released a module for zend framework 2, a module which helps you to automatically load assets like css, js, images and other types. All assets are filtred with JsMin, Packer, Less etc. and cached to a file and to browser by sending headers for caching. Take a look on the repository from github website.

PHP Dependency Injection

Simple but powerfull dependency injector based on phpdoc. It maps classes and instances into a injector instance. To inject classes and instances into a object instance just call the $injector->injectInto($instance);. This is a very simple aproach but when is used in a application si very powerfull.

The injector takes all public properties and check the @var phpdoc param, if params match a class maped in the injector the value is passed to the property. Dependincy injection reduces significantly the the code you write, you dont need to create or pass instances for all classes just put it in the injector map set the php doc and thats all.

Click on the show source to view the injector class. If you have some questions just leave me a comment.

Check this tool i found, play facebook wall shared music

Today i found very usefull facebook application, Wall play.

Wall play scan all your shared video music and put it in one player.

Facebook wall play

Using nodejs to read counter strike server info

NodeJs is a very powerfull tool for creating server side applications. Nodejs is a event-driven I/O JavaScript environment based on V8, wich is the engine for the chrome browser and is very fast, . This article shows how to read counter strike server info trought udp protocol wich the server runs. On default the server runs on the port 27015, and to read the info you need to send some pakets for the what you need: the server details, the players list or the server rules.

For every information wich server can serve you need to send a packet from above and you will receive the binary data. To read more about the counter strike server queries click here.

Here is the code to take a look and next i will explain much more about it.

As you see there is required the dgram package wich is used for udp communications. UDP uses a simple transmission model without implicit handshaking dialogues for providing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice.

In this code are two objects the XBuffer and Protocol, XBuffer simply increase the reading pointer when reading data, and the Protocol send all pakets, filter data and dispatched as event.

Example of requesting info from the server

The function gramRequest is used to make syncron request to the server, send the packet and wait for response. If the response not apear for 2 senconds will trigger the offline event

The requests are sent one after another, parsed for a human readable format and pushed to the data object, when all complete is dispatched the success event ( self.emit(“success”, data); )

For every kind of received info i used functions to parse the binary data, for example, the player data is parsed with parsePlayers function. See the code comments for see how its work.

Mini example to use this code

I hope this article helps you, and if you have some questions leave me a message.

Fist video for gatestebine.ro

Im very proud to announce the video section for my website with recipes. Take a look at the first video and tell me what you think about.

Gatesti bine?

Daca îti place sa gatesti si vrei sa arati lumii si prieteniilor ce capodopere faci în arta culinara, intra pe gatestebine.ro si publicati retetele.

Retete culinare, comunitate bucatari, gastronomie

Yahoo messenger in php

One of my articles was Yahoo Messenger Client with Action Script 3 now i will show you how to write a yahoo messenger application in php. The script flow its exactly like code from action script because its connect to the same yahoo messenger protocol. For binary working i used a zend package ( Zend_Io ). The implementation of yahoo messenger in php its very simple, use only minimal 6 base classes.

  1. ChallengeResponseV16 – Used to make the authentification
  2. Network – Used to communicate trought the socket
  3. Packet – Keeps human readable packet info
  4. PacketBody - Keeps human readable packet body info
  5. Protocol – Builds packets, make login and other yahoo messenger protocol implementation
  6. Service – Keeps constants with services provided by protocol

Try the yahoo messenger in php or download the source code

Web application versioning when using Zend Framework

This is a simple way to versioning a zend framework application using just two files, a ini file that keeps the current version and a proxy/model file wich load the current version from the ini file and test the user passed version for a new feature. The ini file is splited in three states: production, testing and development.

The good think about this is that you can set a version for each stage of application. While application is in development mode, just set a constant for enviroement and current version will be that from development block. The class wich handle this operations is a very simple singleton class with “version” method.

Also if you look closer in this class you can set a user version, for example when you want to let a limited numbers of users to test the next version of the application. To be more easy to use you can apply a shortcut in a view helper and access it with $this->version().

Or you can set a shortcut in a abstract zend controller action and load views depentds of version method.