$script = file_get_contents('http://www.domain.com/scripts/script.js');
$ch = curl_init('http://closure-compiler.appspot.com/compile');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'output_info=compiled_code&output_format=text&compilation_level=SIMPLE_OPTIMIZATIONS&js_code=' . urlencode($script));
$output = curl_exec($ch);
You can find more details on using Closure Compiler with PHP 5 here.
I wrote a C# wrapper for the Google Closure Compiler:
C# wrapper for the Google Closure Compiler
Kentico CMS is a powerful, flexible and complete content management system which provides a complete set of features with an affordable price.
Kentico CMS – built on the Microsoft ASP.NET platform - comes with an easy-to-use WYSIWYG editor for creating/editing the content for building web sites, blogs, community sites, intranets and online stores. It has various modules that make building any type of website and manage its content possible. It comes with an API that allows you to script operations such as creating a new document, user, or editing an existing document. The API is great for integrations with any 3rd party software.
Kentico CMS WYSIWYG Editor
Kentico CMS lets you create and maintain articles, newsletters, forums, blogs, polls, news, wikis, product listings, FAQs, and knowledge-base articles. It also comes with a module for implementing e-commerce functionality into your website with support for search-engine optimization (SEO). In addition, Kentico generates SEO-friendly URLs, has full-text search support, a powerful role-based security system. Also, it supports multiple languages including Chinese and languages written from right-to-left such as Hebrew and Arabic.
Kentico CMS promises to fix any bug within 7 days, and in addition they plant a new tree with the name of the bug reporter. You can find more details here.
Kentico CMS for ASP.NET is available in four editions: Free, Professional Edition, Enterprise Edition and Social Networking Edition. The core features are the same for all these editions, but some advanced features are not available in the Free and Professional editions. The free edition have no time limitation and can be used for commercial purposes without aqny extra cost. It can be downloaded from here.
Kentico CMS is available in four editions
Besides TRIAL and FREE editions, the Virtual Lab service allows users to test Kentico CMS on-line for 7 days, without the need of installing anything on users’ local PC. To sum up, Kentico CMS is a powerful, flexible and reliable content management system, used by more than 4000 web sites in 83 countries and the clients include Microsoft, Brussels Airlines, Vodafone, Audi, Mazda, Subaru, Samsung, Gibson, Bayer, ESPN, Guinness, DKNY, Abbott Labs, Medibank Private (Australia), Ireland .ie and others.
If you try to use Enter key in ASP.NET, according to your browser type, you can get really weird results. In my previous article Default Button in ASP.NET 1.1, I described two methods to make enter key default button for form inputs in ASP.NET 1.1.
Fortunately, ASP.NET 2.0 makes this easier by introducing a concept of "default button" that can be used with either a <form> or <asp:panel> control. What button will be "clicked" depends of where acutally cursor is and what button is choosen as a default button for form or a panel.
For example, with the below sample:
<form defaultbutton=“button1” runat=“server”>
<asp:button id=“button1” text=“btn1” runat=“server”/>
<asp:panel defaultbutton=“button2” runat=“server”>
<asp:textbox id=“textbox1” runat=“server”/>
<asp:button id=“button2” text="btn2" runat=“server”/>
If the enter key is selected the first time the page is loaded, "button1" will be the button that receives the post-back event. If the enter key is hit while the user has their cursor focus within the "textbox1" textbox (contained within the <asp:panel>), then "button2" will be the button that receives the post-back event.
Hitting the enter key in a TextBox may sometimes cause undesired effects in ASP.NET 1.1. For example, the wrong submit button's click event may be triggered or no click event of any button is triggered.
Suppose that, you have one ASP.NET textbox and a button in a web form and OnClick event of the button contains the following code:
If you press the enter key when the textbox has focus, the form will be submitted but button's click event will not be executed.
Place an HTML textbox into the form (it may be invisible):
<INPUT type="text" style="visibility:hidden"/>
If you press the enter key when the textbox has focus, form will submit and the button's click event will be executed.
If you have a single button in a form, the solution described above may be useful. However, for forms with more than one button, we need to specify exactly what button will be clicked when visitor presses the enter key.
The method below describes the way to specify a default button to submit when the user hits the enter key in a textbox.
function clickButton(e, buttonid)
var evt = e ? e : window.event;
var bt = document.getElementById(buttonid);
if (evt.keyCode == 13)
When you press a key, OnKeyPress event is fired on the client side. This calls a function (clickButton) to which we pass the default button's id. The function simulates a mouse click on the button.
TextBox1.Attributes.Add("OnKeyPress", "return clickButton(event,'" + Button1.ClickID + "')");
The above code snippet generates the following HTML code:
<input name="TextBox1" type="text" id="TextBox1" onkeypress="return clickButton(event,'Button1')" />
This causes Button1 to be clicked when the enter key is hit inside Textbox1.
Place the following snippet to the code behind:
The code snippet given above, renders an extra attribute for Textbox1 that checks for a key press and if it's the enter key, it fires ASP.NET's __doPostBack method with the unique id of the default button that virtually presses it.