News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Asset Access Restriction Methods - Block Unwanted Visitors
September 05, 2014 @ 10:11:45

In a new tutorial from the SitePoint PHP blog today Jeroen Meeus looks at a way to protect parts of your application from being used and abused. He shows you how to protect various parts of you site, including images and actual pages, with the help of either your web server or bits of code.

When building an awesome web app or website, we sometimes want people to be able to embed parts of our web app/website into their own. That could be an iframe holding a 'like' button, a simple image that they want to reuse or even our entire app embedded in an iframe. But how do we control who has access, who is allowed to use up our bandwidth and query our service? We define the problem as controlling access to assets. By assets we mean: anything that can be queried from our site.

He talks about the problem of "lifting" content and how to fall back to a "deny all, allow some" mentality. He starts with examples of Apache configurations that use mod_rewrite to only allow requests that come from the current domain (trusted) and the "files" directive coupled with Deny/Allow. He also includes an nginx example, showing the same request handling. The code examples show how to use PHP and Javascript to prevent access the same way.

0 comments voice your opinion now!
asset protection method webserver configuration code tutorial

Link: http://www.sitepoint.com/asset-access-restriction-methods-block-unwanted-visitors/

SitePoint PHP Blog:
Getting Started with Assetic
April 14, 2014 @ 10:37:00

The SitePoint PHP blog has a new post from Lukas White today looking at the Assetic asset management library and how you can get started using it in your application.

There was a time when asset management meant little more than inserting a <link> tag or two and a couple of <script> tags into your HTML. Nowadays, though, that approach just won't cut it. There's performance, for one thing. [...] Also, as client-side applications have become more and more sophisticated, managing dependencies amongst scripts and libraries has become increasingly complex. Furthermore, technologies such as Less, Compass and Coffeescript require assets to be compiled, adding yet another step to the process of managing assets. In this article I'm going to look at a PHP package called Assetic which helps manage, compile and optimize assets such as scripts, stylesheets and images.

He briefly discusses asset management first, just to get everyone on the same page as far as what "assets" are and some considerations about their use. Next is an introduction to the Assetic library itself and the install/usage of a simple "AssetCollection" object. He also shows how to add assets to the object and how to configure compression and generation of the files (like with LESS). He also shows how to use the AssetManager and FilterManager object types along with the AssetFactory handler. Finally, he talks about some of the sample output and caching the tool can do with file-based cache handling.

0 comments voice your opinion now!
assetic introduction asset tutorial javascript css less compress

Link: http://www.sitepoint.com/getting-started-assetic

DZone.com:
Assetic JavaScript and CSS files management
August 05, 2011 @ 09:19:26

On DZone.com today Giorgio Sironi introduces you to Assetic, an asset management tool that helps you keep things organized and easily requested by your application.

Assetic is a PHP library for managing the deployment of your assets: JavaScript, CSS and other resources which will be requested by the browser. The library has been created by Kris Wallsmith from OpenSky, an e-shop where many of the active members of the PHP community work, or worked (see Jonathan Wage/Doctrine 1 and Bulat Shakirzyanov/Imagine.)

Giorgio compares it to the more traditional method (putting them in a public folder) and how Assetic gives you an advantage over this setup. The main feature of the tool is to bundle all of your assets into one file that is then sent to the browser and interpreted there reducing the need for HTTP calls to request multiple files. An example is included showing the creation of an asset collection and the output of the files all combined into one string.

1 comment voice your opinion now!
assetic asset management css javascript public organize


Paul Reinheimer's Blog:
IIS7 The Leap of Faith
November 09, 2007 @ 07:52:00

Paul Reiheimer has set a goal for himself in light of some of the recent advancements that Microsoft has made on the PHP front - to create a successful PHP-driven, IIS served website.

In an effort to learn more about IIS (which a number of my students and contracting contacts seem to use), I have decided to challenge myself: To design, build, and launch a PHP based site, and receive at least 1,000 unique visitors a day by Feb 28, 2008, served from an IIS7 server.

Among his assets are a license to use the IIS software and a designer help with the look and feel. He also sets out requirements for the project including a local testing server, the public web host and that PHP has to be used (not something like phlanger).

2 comments voice your opinion now!
project microsoft iis server leapoffaith asset requirement project microsoft iis server leapoffaith asset requirement



Community Events





Don't see your event here?
Let us know!


tool opinion list laravel voicesoftheelephpant release conference series version interview composer podcast library framework artisanfiles community introduction security symfony language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework