Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Styczeń, 2012

Hide Adsense Ads for specific countries

Hide Adsense Ads for specific countriesI tried most of the Adsense plugins for Wordpress and none of them provides a function to hide advertisements for visitors from one or more countries. This Wordpress tutorial shows you how-to place an ad with the short-code feature in Wordpress and how-to handle dynamic placement with the most common cache plugins.

Rating: 0.0/10 (0 votes cast)


Source: http://feedproxy.google.com/~r/WebDevelopmentBlog/~3/DGFzeeydNJI/

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

/Dev/Hell Podcast: Episode 4: The Cool Kids Club

/Dev/Hell Podcast: Episode 4: The Cool Kids Club

The latest episode of the “/dev/hell” podcast has been released – Episode 4: “The Cool Kids Club”.

Our fourth episode is all ready for your listening pleasure. In this exciting episode we focus on “The Conference Experience” and discuss why programming conferences are so important to developers. Chris talks about why CodeMash was so awesome and the awesome talks full of awesomeness that he attended. Ed talks about his own experiences with speaking and attending conferences, complete with a total derail by Chris on why a certain conference rubbed him the wrong way. Oh yeah, you also find out our opinions on what constitutes a “well-written PHP application”. I’m sure you will be surprised by our answers.

You can either listen to this latest episode either via the in-page player or you can download the mp3 directly.

Source: http://www.phpdeveloper.org/news/17459

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Project: Patchwork-UTF8 – UTF8 Support for PHP

Project: Patchwork-UTF8 – UTF8 Support for PHP

Nicolas Grekas has shared another tool that he’s pulled out of his “Patchwork” framework to make it a stand-alone tool: the Patchwork-UTF8 helper that provides matching functions to those PHP already has for regular strings, but a little smarter to work with UTF8 correctly.

The PatchworkUtf8 class implements the quasi complete set of string functions that need UTF-8 grapheme clusters awareness. These functions are all static methods of the PatchworkUtf8 class. The best way to use them is to add a use PatchworkUtf8 as u; at the beginning of your files, then when UTF-8 awareness is required, prefix by u:: when calling them.

In the README for the tool he talks about the functions included in the current release that match PHP’s string functions as well as some additional methods like “isUtf8″, “bestFit” and “strtocasefold”. It relies on the mbstring, iconv and intl extensions being installed, and if they aren’t, it falls back to other functionality (list of those methods included).

Source: http://www.phpdeveloper.org/news/17458

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Charles Sprayberry’s Blog: Why you should use DI

Charles Sprayberry’s Blog: Why you should use DI

In this recent post from Charles Sprayberry he explains why using dependency injection (DI) in your application is a good idea and can help make things easier in the long run.

Dependency Injection is just a fancy term for passing dependencies to the object needing them instead of letting the object create its own. Hopefully, you’ve watched this great Google Clean Code talk about dependency injection by Misko Hevery where he talks about why you should ask for things instead of looking for them. I’m gonna talk about some reasons to use DI beyond just those presented in the video.

He breaks it up into a few different sections:

  • It helps in the battle against global state
  • It helps your design
  • It makes using the single responsibility principle easier

Source: http://www.phpdeveloper.org/news/17457

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Mike Wallner’s Blog: Dropping server load with HTTP caching

Mike Wallner’s Blog: Dropping server load with HTTP caching

Mike Wallner has shared a quick and easy HTTP caching technique in a new post to his blog today. The key is in using the PEAR HTTP_Header package.

Ever watched youself browsing e.g. a web forum? Noticed that you viewed the same page several times? Well, this means extraordinary and useless load for your server if there’s no caching mechanism implemented in the web application. Even if there is some file or db cache you can still improve performance with implementing some http cache.

With a few simple lines of code using HTTP_Header, you can tell your scripts how long to set the “expires” header to on your requests. This increment (in seconds) is relayed to the browser to tell it when to next fetch the page and not reload from cache.

Source: http://www.phpdeveloper.org/news/17456

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Ibuildings Blog: 2011: A Year in PHP

Ibuildings Blog: 2011: A Year in PHP

On the Ibuildings blog today there’s a year in review post (from Ben Longden, Rowan Merewood and Alistair Stead) looking back at 2011 and everything that happened in the world of PHP.

2011 has flown by in a blur as we have been busy helping many new clients with large scale PHP projects – proof that PHP continues to gain traction with enterprise. [...] The ongoing financial climate only adds pressure for IT managers to cut costs and deliver more value from their existing infrastructure and therefore require enterprises to re-consider any prior aversion to open source and PHP. This is allowing our industry to consistently buck the trend of the markets and expand to support the increased demand.

They list some of the changes in PHP itself, like the Release Candidates for PHP 5.4 and the 5.3 requirements of some frameworks, as well as some community-related changes: Facebook’s Virtual PHP Machine (hhvm) and the number of PHP-related events in Europe and the UK. They mention some projects that become more prominent in 2011 including BDD testing, Platform as a Service products and the EBay acquisition of Magento.

Also included in the post are a few predictions for 2012 including a possible merging of frameworks along similar strategies, the increased use of dependency injection containers and a serious look into caching in PHP applications.

Source: http://www.phpdeveloper.org/news/17455

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Site News: Popular Posts for the Week of 01.27.2012

Site News: Popular Posts for the Week of 01.27.2012Popular posts from PHPDeveloper.org for the past week:

Source: http://www.phpdeveloper.org/news/17454

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

PHPMaster.com: Bending XML to Your Will

PHPMaster.com: Bending XML to Your Will

PHPMaster.com has a new tutorial posted today about “bending XML to your will” – working with XML data using the XML Parser and SimpleXML functionality already included with PHP.

If you’ve ever worked with the Twitter or Facebook APIs, looked at RSS feeds from a website, or made use of some type of RPC calls, you’ve undoubtedly experienced working with XML. [...] Knowing how to process XML data is a crucial programming skill today, and thankfully, PHP offers multiple ways to read, filter, and even generate XML. In this article I’ll explain what exactly XML is, in case you haven’t had any experience with it yet, and then dive into a few ways you can use PHP to bend XML to your will.

He introduces the concepts and syntax behind XML first for those not accustomed and quickly moves into the tools to parse it. First he looks at the XML Parser, an event-based parser, and SimpleXML, an easy way to access the contents of a well-formed XML document. Snippets of code are provided for each to show you how to put them into practice.

Source: http://www.phpdeveloper.org/news/17453

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Wojciech Sznapka’s Blog: Always use most latest versions for benchmarks

Wojciech Sznapka’s Blog: Always use most latest versions for benchmarks

In response to some criticism about his previous post with some framework benchmarks, Wojciech Sznapka has posted updated results using the latest versions of each framework.

In my previous post Modern framework comparison I presented performance tests, which compared Ruby On Rails, Django and Symfony2. After recieving a feedback in comments I decided to run this benchmark one more time on my own laptop (instead of on my hosting). The reason was simple: enviroment was outdated.

There were some overall performance increases were seen, but some statistics were higher – the “time per request” for all of them grew, some by quite a bit. He presents these benchmarks with a caveat, though:

You should never choose framework based on benchmarks. Those shows them from one point of view, but there are plenty of other aspects, such as support, community, maturity, number of ready to use components.

Source: http://www.phpdeveloper.org/news/17452

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Mike Purcell’s Blog: Use PHPUnit without PEAR

Mike Purcell’s Blog: Use PHPUnit without PEAR

Mike Purcell has a new post to his blog showing a method he’s followed to be able to use the popular PHPUnit unit testing software without having to go through the PEAR installer to get there.

PHPUnit is a great tool to protect us developers from introducing new defects when adding new features or re-factoring code. However there is one HUGE downside to PHPUnit; it must be installed using PEAR. Personally, I don’t like ‘auto-installers’, I’d prefer to know what exactly is happening behind the scenes with regards to which libraries are required and how they are being called. [...] After breaking down the PHPUnit source code, I realized it could be installed without going through PEAR, and without too much headache.

He walks you through the directories you’ll need to set up (test/vendor), the commands you’ll need to get the latest version and unpack it, changes to set up some symlinks and updating the PHPUnit source to modify the autoloader, bootstrap and phpunit executable.

Source: http://www.phpdeveloper.org/news/17451

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>