Happy New Year 2010


Hits: 1666  

1+2-(3-4-5)*6*7*8-9 = 2010
http://www.svnlabs.com

May Peace be your gift at Christmas and your blessing all year through!

Merry Christmas! Santa is here with media, games, music, recipes, stories, jokes and much, much more. Come on in and check us out!

Couldn’t find video filter ‘x264’


Hits: 2439  
X264
X264

x264 is a free software library for encoding video streams into the H.264/MPEG-4 AVC format. It is released under the terms of the GNU General Public License.

x264 itself provides a command line interface as well as a library-level interface.

x264 is used to encode video files in mp4, m4v, h.264 (HD) output format.

Install x264
------------

*  Download the latest snapshot(tarball) here:
# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090113-2245.tar.bz2

* Extract tarball
# bzip2 -cd x264-snapshot-20090113-2245.tar.bz2 | tar xvf -
# cd x264-snapshot-20090113-2245

* Build and install
# ./configure
# make
# make install

Some problems with mplayer & x264

Install/compile mplayer with x264 support

-x264encopts is not an MEncoder option
Checking for x264 ... no (in libavcodec: no)   (./configure)

# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

# cd /usr/local/src/mplayer

# svn update

# ./configure

After configure make sure you got

Checking for x264 ... yes (in libavcodec: yes)

# make && make install

Try latest version of video tools ffmpeg, mplayer, mencoder, flvtool2, mediainfo  🙂

Find correct path where you installed these components try …..

# locate command

“make sure you are using /usr/bin/mencode and NOT /usr/lib/bin/mencode”

🙂

sh: /mencoder: No such file or directory


Hits: 1474  

This is the problem caused due to PHP safe_mode restrictions to execute linux commands.

If safe mode is on we can not run linux commands by exec() PHP function.

Try safe mode Off when you want to execute linux tools with PHP….

Disable dangerous function from executing to exec().. that will cause application non functional 🙁

# php mencoder.php

sh: /mencoder: No such file or directory

# cat mencoder.php
<?php exec("mencoder -ovc help"); ?>
# mencoder -ovc help

PHP Safe Mode
PHP Safe Mode

We wish you a merry christmas


Hits: 1702  

I wish all my Friends and their Families and my Relatives and my Well-Wishers a very happy and enjoying New Year..
May all your unfulfilled and desired wishes be completed in the coming year..
Have a successful year ahead..!!!

Merry Christmas Everyone

Better Solution for Filtering Bad Words in PHP


Hits: 1814  

I was searching for filtering Bad Words from my site……

I have visited so many links on google but…. 🙁

Here is my simple logic for filtering Bad Words from site or any search engine

First you have to make a txt file “badwords.txt” or you can search from google

Google Keyword: badwords + filetype:txt

Copy “badwords.txt” to your site and use below code for removing these words from site…..

<?php

// here file_get_contents() used for getting $badwords as a string

$badwords = strtolower(file_get_contents(“badwords.txt”));

// here $q is string used for checking against badwords

$pos = strpos($badwords, strtolower($q));

if ($pos !== false)
{

if(strstr($badwords, strtolower($q)) || strchr($badwords, strtolower($q)))
die(‘Website has blocked unwanted contents…. please try for legal keywords!’);
}

?>

Enjoy with svnlabs.com 🙂

Oscommerce – Features


Hits: 1624  

Features of Oscommerce
Features of Oscommerce

* Multi language

* Content Management

~ WYSIWYG editor integrated into the shop admin to allow easy entering    of    HTML and uploading of images
~ Add text to your category pages – great for SEO and providing information
~ Content Management System – no more FTP and working with PHP files – amend text for information pages (homepage, delivery, about us etc) from the shop admin
~ Enable / Disable categories (and all contained products) at the click of one button
~ Take control of your product display and choose the sort order for each product
~ Select which products appear on your homepage with “showcase”
~ NEW! Reports for orders, sales, tax, products in HTML and CSV (Excel) format
~ NEW! Attribute Manager with Ajax & bulk management

* Marketing tools
~ Affiliate Scheme integrated into your shop, allowing you to offer commission on successful referrals
~ Discount Coupons & Gift Vouchers integrated into shop
~ Downloadable PDF Catalogue: create a PDF catalogue from your shop’s database
~ Professional Mail List Manager with HTML templates, subscribe/unsubscribe links and option to set up multiple mailing list. Customers can subscribe to the mail list with their name & email address (without the need to set up an account). Double opt in option (verify email).
~ NEW! Multiple product images (up to 4) with lightbox effect
~ NEW! Cross Sell module with Ajax & category bulk application

* Search-engine friendly
~ Ultimate SEO URLs: built in search-engine friendly URLs for best spider results
~ Dynamic Metatags: automatically create metatags from the product description
~ Site Map / All Products: two additional pages featuring your shop’s products

* Online payment facilities
~ Multi-currency support
~ VAT support
~ Pay Pal IPN, Nochex, Pay by cheque, Pay by bank transfer are included
~ Other payment modules are available on request (see add-on section)

* Delivery options
~ Charge shipping as flat rate, per item, per weight or per order total
~ Or base your Delivery charges on weight or price and the delivery country, inc. an “email for quote” message for defined countries
~ UK Royal Mail shipping module for 1st & 2nd Class Standard / Recorded, Special Delivery, Standard Parcels, Surface Mail, Parcel Force 48

😉

Get Mobile Information Header


Hits: 2320  

The User Agent Profile (UAProf) is used for capturing capability and preference information for wireless devices. This information can be used to detect various types of HTTP headers and other properties for visitor’s mobile device.

Apache provide some useful HTTP X Header information for WAP… which detect user-agent and other hardware/software information.

Mobile - Header Information on WAP
Mobile - Header Information on WAP

Source:

http://en.wikipedia.org/wiki/UAProf
http://code.google.com/p/mobiledevicedetector/
http://mobiforge.com/developing/blog/useful-x-headers
http://wapreview.com/?id=149
http://mobiforge.com/developing/story/device-detection-cloud-deviceatlas-personal
http://mobiforge.mobi/developing/story/mobile-sites-with-joomla-cms?dm_switcher=true
http://www.idelfuschini.it/it/apache-mobile-filter-v2x.html
http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device-detection/
http://logme.mobi/query/index.php

Free online photo editor


Hits: 7464  

Pixlr is a free online photo editor. Fix, adjust and filter your images. Manage your images in your browser!

pixlr
pixlr

Get creative images with the free online photo editor and fix with the image express (crop, resize, rotate, flip etc)! Jump in and get going within 2 seconds!

Source:
http://www.pixlr.com/editor/
http://www.pixlr.com/express/

Create TCPDF PHP Fonts


Hits: 4047  

TCPDF supports TrueTypeUnicode (UTF-8 Unicode), OpenTypeUnicode, TrueType, OpenType, Type1, CID-0 and Core (standard) fonts.

You will find font creation utility at fonts/utils of TCPDF… copy desired font to fonts/utils/svnlabs.ttf

* For TrueTypeUnicode

# cd /var/www/html/tcpdf/fonts/utils

# ttf2ufm -a -F svnlabs.ttf

# php -q makefont.php svnlabs.ttf svnlabs.ufm

* For embedded fonts to tcpdf PDF file.. copy the resulting svnlabs.php, svnlabs.z and svnlabs.ctg.z to fonts folder

Uses:

<?php

……..

$pdf->SetFont(‘svnlabs’,’I’,8);

……….

?>

Exclude folders from zip – tar


Hits: 1635  

TARTape Archive  (application/x-tar)

tar svnlabs
TAR - svnlabs

A common archive format used on Unix-like systems. Generally used in conjunction with compressors such as gzip, bzip2, compress or xz to create .tar.gz, .tar.bz2, .tar.Z or tar.xz files.

# tar -cvvf foo.tar foo/ –exclude=”/home/svnlabs”

# tar -cvzpP –file=/home/backup.tar.gz –exclude={/dev/*,/proc/*,/sys/*,/tmp/*} /

tar work with directory “/” except for /dev, /proc, /sys, /tmp 🙂