MIME Types List

On May 19, 2012, in Imagine, LAMP, Open Source, PHP, Web Application, Web Streaming, by Sandeep Verma

Hits: 38  MIME stands for “Multipurpose Internet Mail Extensions”. It’s a way of identifying files on the Internet according to their nature and format. “Content-type” header value defined in the HTTP response, the browser can open the file with the proper extension/plugin/tool. “Internet Media Type” is the same as a MIME type. MIME types were originally [...]

Tagged with:  

PHP IP to Country

On May 19, 2012, in LAMP, Open Source, PHP, Web Services, by Sandeep Verma

Hits: 47  phpIp2Country ( php IP to country ) – PHP geolocalization class with free IPs database <?php require(‘phpip2country.class.php’);          $dbConfigArray=array(         ’host’=>’localhost’,         ’port’=>3306,         ’dbName’=>’ip_to_country’,         ’dbUserName’=>’ip_to_country’,         ’dbUserPassword’=>’QrDB9Y8CKMdLDH8Q’,         ’tableName’=>’ip_to_country’, );          $phpIp2Country=new phpIp2Country(’278.180.178.18′,$dbConfigArray);          print_r($phpIp2Country->getInfo(IP_INFO)); ?>   Download Source:    svn checkout http://php-ip-2-country.googlecode.com/svn/trunk/ php-ip-2-country-read-only

Tagged with:  

Pay Per Listen for Joomla

On May 15, 2012, in HTML5, Joomla, Learning, PHP, Web Application, Web Streaming, by Sandeep Verma

Hits: 124  HTML5 Audio Player with Playlist HTML5 audio the element enable native audio playback within the browser. It supports all browsers i.e. iOS, Android, Firefox, Chrome, Safari, IE and Opera. HTML5 Audio Player with Playlist, Repeat, Stream Seek, Volume Control, Timer, Next, Previous, Play-Pause option. Now Play Your Favorite Radio FM Stream in HTML5 XML Playlist Player  Horizontal [...]

jQuery Image Editor

On May 13, 2012, in Javascript, jQuery, PHP, Web Application, by Sandeep Verma

Hits: 148  Image processing is really a fun. There are lot of image processing tool read more here Image Matrix Using ImageMagick In this plugin we can: * Rotate image. * Resize image. * Crop image. * Save image.

Tagged with:  

PHP detect if its run from a cron job?

On May 5, 2012, in CURL, LAMP, Learning, PHP, Tips, Web Application, by Sandeep Verma

Hits: 221  I was looking for way to detect if PHP script was run from a shell (cron job), or if it was run from the browser. I was working on my favorite scraper program, that was working fine with browsers but failed on crontab. So, I need to run same script from both interfaces several [...]

Tagged with:  

Find Email From PHP String

On May 3, 2012, in LAMP, PHP, Web Application, by Sandeep Verma

Hits: 298   <?phpfunction lower($n) { return( strtolower(str_replace(“ ”, “”, $n)) ); } $string = ”Hello Friends, I am Sandeep Verma. My Emails are infos@svnlabs.com, sandeepv @svnlabs.com, svnlab @ gmail.com and svmbm@ svnlabs.com. Do you know we can use this code to get emails from a PHP String. Also code is converting emails to proper case like Sandeepv @svnlabs.com and sandeepv@svnlabs.com are same. But contact me here infos@scriptrr.com”; preg_match_all(“/[_a-z0-9-]+(\.[_a-z0-9-]+)*([ ]{0,2})@[a-z0-9- ]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})/i”, $string, $matches); $lower = array_map(“lower”, $matches[0]); $result = array_unique($lower); print_r($result); ?> Output: Array ( [0] => infos@svnlabs.com [1] => sandeepv@svnlabs.com [2] => svnlab@gmail.com [3] => svmbm@svnlabs.com [6] => infos@scriptrr.com )

CentOS Latest RPM for PHP MySQL

On May 2, 2012, in CentOS, LAMP, Learning, Linux, Mysql, PHP, by Sandeep Verma

Hits: 358  [root@svnlabs ~]# yum install php php-soap php-xmlrpc php-imap php-mcrypt php-mhash php-mbstring php-mysql php-xml php-gd php-cli php-common php-api Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile * base: centos.mirrors.tds.net * extras: mirror.sanctuaryhost.com * updates: mirror.fdcservers.net Setting up Install Process Package matching php-5.1.6-32.el5.i386 already installed. Checking for update. Package matching php-mcrypt-5.1.6-15.el5.centos.1.i386 already installed. Checking [...]

Tagged with:  

PHP Check Proxies

On May 1, 2012, in CURL, LAMP, Learning, PHP, Web Application, by Sandeep Verma

Hits: 263  <?php function checkProxies($proxies){    $url = ‘https://www.svnlabs.com/’;    $count = count($proxies);    echo ‘Number of proxies in file: ‘ . $count . ‘<br />’;  $curl_arr = array();  $master = curl_multi_init();  for($i = 0; $i < $count; $i++) {  $proxy = $proxies[$i];  $curl_arr[$i] = curl_init();  curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, TRUE);  curl_setopt($curl_arr[$i], CURLOPT_HEADER, FALSE);  curl_setopt($curl_arr[$i], CURLOPT_URL, $url);  curl_setopt($curl_arr[$i], [...]

Tagged with:  

Bind failed, try again ([any]:1935): java.net.BindException: Address already in use

On April 30, 2012, in Learning, Linux, Web Application, Web Streaming, Wowza, by Sandeep Verma

Hits: 332  Hi Friends, Hope you already read our wowza articles Install Wowza Examples Wowza MediaSecurity AddOn Package Compile or build flowplayer or jwplayer to create secure token for wowza server I got the following errors when I reinstall the latest version of Wowza WARN vhost comment _defaultVHost_ Bind failed, try again ([any]:1935): java.net.BindException: Address already [...]

Integrate Klarna PHP API

On April 24, 2012, in LAMP, Open Source, Web Security, Web Services, by Sandeep Verma

Hits: 1185  Klarna offer online invoice and part-payment solution that reduce your risk and increase your sales. Integration Options 1. Webstore hosted by ecommerce provider. 2. Own Integrations. 3. Webstore uses open source like Magento, Virtumart, OsCommerce, WordPress, OpenCart, Prestashop, Ubercart, XT-commerce, ZenCart etc. API Supported Countries * Denmark * Germany * Finland * Norway * [...]

Get Remote Host Client IP Behind Load Balancers (ELB)

Hits: 726  I was working on “Private AWS Cloudfront Distribution” for AWS Elastic Load Balancer (ELB), allowing our application servers private access to our AWS cloudfront. But PHP Server Environment Variable $_SERVER["REMOTE_ADDR"] is displaying suspicious results, it really tedious to get remote host client IP behind ELB Now we have 2 options… 1. mod_rpaf and Amazon [...]

Tagged with:  

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...