This is a component to convert and encode videos in your CakePHP application. This was extracted from a live project. Requirements CakePHP 1.2+ ffmpeg flvtool2 How to install FFmpeg in Linux sudo apt-get install ffmpeg for more info http://linuxers.org/tutorial/how-install-ffmpeg-linux Installing FLVTool2 : Open the terminal and type following command to install FLVTool2: sudo apt-get install ...
How to show Image before upload using Jquery We’ve all seen the basic file upload form for uploading avatars, images, memes, etc. The problem with these is that once you upload your image it’s hidden from you. The solution is to use a little bit of JavaScript to upload the image as soon as it’s ...
One of the nice enhancement in HTML5 web form is being able to add placeholder text to inputfields. Placeholder attribute allows you to display text in a form input when it is empty and when it is not focused (it clears the field on focus). This is a nifty feature, but it is not supported ...
image resize with aspect ratio in CakePHP Installation Place the above script in a file named ImgResizerComponent.php within your app/controllers/components/ directory. Next, simply add ‘ ImgResizer‘ to your controller’s component property. ImgResizer Component Download Link Example $image = WWW_ROOT . ’img/myimage.png’; $w=100; $h=100; $this->ImgResizer->set_image($w,$h,$image );
The simplest way to send an email with PHP is to send a text email. In the example below we first declare the variables ($to, $subject, $message, $from, $headers), then we use the variables in the mail() function to send an e-mail: <?php $to = “someone@example.com”; $subject = “Test mail”; $message = “Hello! This is ...
To open a new window by clicking on the link, you will need to use window.open method of javascript. Sample of popup window <a href="javascript: void(0)" onclick="window.open('popup.html', 'windowname1', 'width=200, height=77'); return false;">Click here for simple popup window</a> Now you can open a simple window, also this function can have different features of that window to ...
This script highlight all text in textarea or text field (input tag) by clicking on it. It allows users to reduce their manual work. For instance when users need to copy to the clipboard all text quickly or quickly delete the text from the field. For example: to copy a piece of code or to ...
A database is your best choice for storing data in your web application, and the MySQL database server has always been the most popular choice among PHP developers. It’s supported by almost any hosting company offering PHP, which makes it easy to get started with, and you can even download and install it on your ...
Variables are one of the most important aspects of every programming language. They allow you to store a value within a named container, for later use or manipulation. Storing and retrieving something from memory is a complicated task, but fortunately, PHP hides all this low level stuff, and makes it super easy to declare and ...
PHP is an extremely popular, Open Source scripting language, most commonly used on webservers to produce dynamic pages. The name “PHP” is a recursive acronym for “PHP: Hypertext Preprocessor” and was initially created by Rasmus Lerdorf in 1994. As of today, the current version of PHP is version 5, with version 6 in the making. ...