Wednesday, January 2, 2019

Top 10 Most Viewed Bollywood Movie Trailers of 2018

Current year 2018 is a good year in the Bollywood industry and gives many movies with action, thriller, drama, biopic and romance. Some of them are most viewed and some movie famous for its casts, music, adventure or any other reason.
For any movie trailer is a new trend in Bollywood and so every producer or director, release movie trailer before launch movie to attract people and will come them to the box office and make a new record of box office collection.
Here below list of top 10 movie trailer, which are most viewed and liked on YouTube. Have you missed seeing it then must watch here.

10. Stree

 
TRAILER RELEASE 26th July 2018(Maddock Films)
VIEWS 47,748,929
LIKES 374,370
DISLIKES 9,643
MOVIE RELEASE DATE 31st August 2018
CAST Rajkummar Rao, Shraddha Kapoor, Aparshakti Khurana, Pankaj Tripathi


9. Satyameva Jayate

 
TRAILER RELEASE 8th June 2018(T-Series)
VIEWS 48,757,399
LIKES 552,046
DISLIKES 36,636
MOVIE RELEASE DATE 15th August 2018
CAST John Abraham, Manoj Bajpayee, Aisha Sharma, Amruta Khanvilkar


8. Race 3

 
TRAILER RELEASE 15th May 2018(Salman Khan Films)
VIEWS 58,191,672
LIKES 656,845
DISLIKES 226,277
MOVIE RELEASE DATE 15th June 2018
CAST Anil Kapoor, Salman Khan, Jacqueline Fernandez, Bobby Deol, Daisy Shah


7. Padmaavat

 
TRAILER RELEASE 9th October 2017(Viacom18 Motion Pictures)
VIEWS 58,217,370
LIKES 568,440
DISLIKES 67,327
MOVIE RELEASE DATE 25th January 2018
CAST Deepika Padukone, Shahid Kapoor, Ranveer Singh


6. Simmba

 
TRAILER RELEASE 2th December 2018(Reliance Entertainment)
VIEWS 59,239,131
LIKES 568,394
DISLIKES 66,450
MOVIE RELEASE DATE 28th December 2018
CAST Ranveer Singh, Sara Ali Khan, Sonu Sood


5. Dhadak

 
TRAILER RELEASE 10th January 2018(Dharma Productions)
VIEWS 60,173,561
LIKES 654,167
DISLIKES 81,329
MOVIE RELEASE DATE 20th July 2018
CAST Ishaan Khatter, Jhanvi Kapoor


4. Sanju

 
TRAILER RELEASE 24th April 2018(FoxStarHindi)
VIEWS 62,285,491
LIKES 865,707
DISLIKES 39,338
MOVIE RELEASE DATE 29th June 2018
CAST Ranbir Kapoor, Sonam Kapoor, Dia Mirza


3. Baaghi 2

 
TRAILER RELEASE 21st February 2018(FoxStarHindi)
VIEWS 84,207,397
LIKES 677,772
DISLIKES 45,971
MOVIE RELEASE DATE 30th March 2018
CAST Tiger Shroff, Disha Patani


2. Thugs Of Hindostan

 
TRAILER RELEASE 26th September 2018(YRF)
VIEWS 104,489,462
LIKES 1,428,624
DISLIKES 141,884
MOVIE RELEASE DATE 8th November 2018
CAST Amitabh Bachchan, Aamir Khan, Fatima Sana Shaikh, Katrina Kaif


1. Zero

 
TRAILER RELEASE 2nd November 2018(Red Chillies Entertainment)
VIEWS 116,242,827
LIKES 2,027,556
DISLIKES 161,061
MOVIE RELEASE DATE 21st December 2018
CAST Shah Rukh Khan, Katrina Kaif, Anushka Sharma, Tigmanshu Dhulia

Tuesday, January 1, 2019

Create zebra language code in php

Zebra Programming Language (ZPL) is a page description language from Zebra Technologies, which is used for label printing. It is a command based language used by the printer as instructions for creating the images printed on the labels. Zebra language commands always start with a caret sign (^) Currently, many command exits for new version of ZPL II. In this language each format has to start with the command `^XA` and end with `^XZ` which is ANSI BASIC oriented.
So when you are working with printing application in PHP or some label printing than must use ZPL code to send to zebra printer. For FedEx, USPS, DHL and other other courier services use ZPL language for own label printing software. So when you want to work with label printing for eCommerce use than must need ZPL code for the printer.
Here you can write direct text to ZPL using start with `^XA` & end with `^XZ`. Here below example to create ZPL language from image.
For that create `Image.php` file as below

class Image
{
    protected $width;
    protected $height;
    public function __construct($image)
    {
        if (!$this->isGdResource($image)) {
            throw new InvalidArgumentException('Invalid resource');
        }
        if (!imageistruecolor($image)) {
            imagepalettetotruecolor($image);
        }
        imagefilter($image, IMG_FILTER_GRAYSCALE);
        $this->image = $image;
        $this->width = imagesx($this->image);
        $this->height = imagesy($this->image);
    }
    public function __destruct()
    {
        imagedestroy($this->image);
    }
    public function isGdResource($image)
    {
        if (is_resource($image)) {
            return get_resource_type($image) === 'gd';
        }
        return false;
    }
    public function width()
    {
        return (int)ceil($this->width / 8);
    }
    public function height()
    {
        return $this->height;
    }
    public function toAscii()
    {
        return $this->encoded ?: $this->encoded = $this->encode();
    }
    protected function encode()
    {
        $bitmap = null;
        $lastRow = null;
        for ($y = 0; $y < $this->height; $y++) {
            $bits = null;
            for ($x = 0; $x < $this->width; $x++) {
                $bits .= (imagecolorat($this->image, $x, $y) & 0xFF) < 127 ? 1 : 0;
            }
            $bytes = str_split($bits, 8);
            $bytes[] = str_pad(array_pop($bytes), 8, '0');
            $row = null;
            foreach ($bytes as $byte) {
                $row .= sprintf('%02X', bindec($byte));
            }
            $bitmap .= $this->compress($row, $lastRow);
            $lastRow = $row;
        }
        return $bitmap;
    }
    protected function compress(string $row, ?string $lastRow): string
    {
        if ($row === $lastRow) {
            return ':';
        }
        $row = $this->compressTrailingZerosOrOnes($row);
        $row = $this->compressRepeatingCharacters($row);
        return $row;
    }
    protected function compressTrailingZerosOrOnes(string $row): string
    {
        return preg_replace(['/0+$/', '/F+$/'], [',', '!'], $row);
    }
    protected function compressRepeatingCharacters(string $row): string
    {
        $callback = function ($matches) {
            $original = $matches[0];
            $repeat = strlen($original);
            $count = null;
            if ($repeat > 400) {
                $count .= str_repeat('z', floor($repeat / 400));
                $repeat %= 400;
            }
            if ($repeat > 19) {
                $count .= chr(ord('f') + floor($repeat / 20));
                $repeat %= 20;
            }
            if ($repeat > 0) {
                $count .= chr(ord('F') + $repeat);
            }
            return $count . substr($original, 1, 1);
        };
        return preg_replace_callback('/(.)(\1{2,})/', $callback, $row);
    }
}

Now create `Builder.php` file from convert image to zpl as below

class Builder
{
    protected $zpl = [];
    public function command()
    {
        $parameters = func_get_args();
        $command = strtoupper(array_shift($parameters));
        $parameters = array_map([$this, 'parameter'], $parameters);
        $this->zpl[] = '^' . $command . implode(',', $parameters);
        return $this;
    }
    protected function parameter($parameter)
    {
        if (is_bool($parameter)) {
            return $parameter ? 'Y' : 'N';
        }
        return $parameter;
    }
    public function __call($method, $arguments)
    {
        array_unshift($arguments, $method);
        return call_user_func_array([$this, 'command'], $arguments);
    }
    public function gf()
    {
        $arguments = func_get_args();
        if (func_num_args() === 1 && ($image = $arguments[0])) {
            $bytesPerRow = $image->width();
            $byteCount = $fieldCount = $bytesPerRow * $image->height();
            return $this->command('GF', 'A', $byteCount, $fieldCount, $bytesPerRow, $image->toAscii());
        }
        array_unshift($arguments, 'GF');
        return call_user_func_array([$this, 'command'], $arguments);
    }
    public function toZpl($newlines = false, $top = null, $shift = null)
    {
        $start = '^XA';
        if($top) {
            $start .= '^LT'.$top;
        }
        if($shift) {
            $start .= '^LS'.$shift;
        }
        return implode($newlines ? "\n" : '', array_merge([$start], $this->zpl, ['^XZ']));
    }
    public function __toString()
    {
        return $this->toZpl();
    }
}

After create below files convert your image file to zpl code by including both files as below.

include 'Image.php';
include 'Builder.php';
$image = new Image(imagecreatefrompng('test.png')); //You can also use imagecreatefromjpeg for jpg image
$zpl = new Builder();
echo $zpl->gf($image)->toZpl(false, 10, -10); // toZpl(Newline, Top Margin, Left Shift)

Install Radis Server on Windows (WAMP Server)


Radius (Remote Dictionary Server) is an open-source advanced key-value database storage system like NoSQL. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, bitmaps and spatial indexes. radius is used for caching to speed up a web application.
If you want to install radios on Linux system than it's easy to install using command line and configure auto in any programming language. when you want to install in window server than manually make some changes for works perfectly.
Process below steps for installing & work redis on a window server.
  • Download redis setup file for window (32bit & 64bit) here. (You can also download files from here)
  • Install/Put redis in any location you want.
  • Run `redis-server.exe` file from instillation files for start radis server.
  • Now check your php version by running phpinfo(); command in any file.
  • Find redis version match your PHP version from PECL package here.
  • Download radis as php extension according to radis version from https://pecl.php.net/package/redis/RADISVERSION(from below point)/windows. (Ex. https://pecl.php.net/package/redis/4.1.1/windows)
  • Here download DLL files list accoring to your PHP version and Thread Safe / Non Thread Safe.
  • Copy the `php_redis.dll` and paste to following folder in Wamp Server `wamp\bin\php\phpVERSION\ext\`.
  • Open php.ini file add redis extension to extensions list as below `extension=php_redis.dll`
  • Restart wamp server & check phpinfo() which shows redis to confirm radis install successfully.
  • Here you can check radis using php code as below.
    
    try {
        $redis = new Redis();
        $redis->connect('localhost', 6379); //connect redis server
        $redis->set('variable', 'Redis Test'); //save data in server
        $redis->get('variable');  //get data from server
    } catch (Exception $e) {
        echo $e->getMessage();
    }
    
    
  • Here for radis connection you must open redis-server.exe file which installed first(don't close radis server window).

Top 10 Bollywood Item Songs 2018

Item song is one type of dance with music as musical performance. now these days, many movies known for it's item songs and it's conman in a Bollywood movie. Currently, all top actress plays the role as item girl instead of the main role in the movie and become that song hits with her best performance. The concept of item song is old in Bollywood industry. This year 2018 Bollywood gives many item songs with any item girls in many movies here list of top 10 item songs of 2018.

HAT JA TAU - VEEREY KI WEDDING

ITEM GIRL Sapna Chaudhary
MOVIE VEEREY KI WEDDING
DIRECTOR Ashu Trikha
RELEASE DATE 2nd March
CAST Pulkit Samrat, Kriti Kharbanda, Jimmy Sheirgill
SINGER Sunidhi Chauhan
MUSIC Jaidev Kumar
MUSIC PUBLISHER T-Series
LYRICS Dr. Devendra Kafir



AASHIQ BANAYA AAPNE - HATE STORY 4

ITEM GIRL Urvashi Rautela
MOVIE HATE STORY 4
DIRECTOR Vishal Pandya
RELEASE DATE 9th March
CAST Urvashi Rautela, Vivan Bhatena, Karan Wahi, Gulshan Grover
SINGER Himesh Reshammiya, Neha Kakkar
MUSIC Himesh Reshammiya
MUSIC PUBLISHER T-Series
LYRICS Sameer



EK DO TEEN - BAAGHI 2

ITEM GIRL Jacqueline Fernandez
MOVIE BAAGHI 2
DIRECTOR Ahmed Khan
RELEASE DATE 30th March
CAST Tiger Shroff, Disha Patani
SINGER Shreya Ghoshal
MUSIC Laxmikant, Pyarelal
MUSIC PUBLISHER T-Series
LYRICS Javed Akhtar



BEWAFA BEAUTY - BLACKMAIL

ITEM GIRL Urmila Matondkar
MOVIE BLACKMAIL
DIRECTOR Abhinay Deo
RELEASE DATE 6th April
CAST Irrfan Khan, Kirti Kulhari, Divya Dutta
SINGER Pawni Pandey
MUSIC Amit Trivedi
MUSIC PUBLISHER T-Series
LYRICS Amitabh Bhattacharya



DILBAR - SATYAMEVA JAYATE

ITEM GIRL Nora Fatehi
MOVIE SATYAMEVA JAYATE
DIRECTOR Milap Milan Zaveri
RELEASE DATE 15th August
CAST John Abraham, Manoj Bajpayee, Aisha Sharma, Amruta Khanvilkar
SINGER Dhvani Bhanushali, Ikka Singh, Neha Kakkar
MUSIC Tanishk Bagchi
MUSIC PUBLISHER T-Series
LYRICS Ikka, Shabbir Ahmed





KAMARIYA - STREE

ITEM GIRL Nora Fatehi
MOVIE STREE
DIRECTOR Amar Kaushik
RELEASE DATE 31st August
CAST Raj Kumar Rao, Shraddha Kapoor
SINGER Aastha Gill, Sachin Sanghvi, Jigar Saraiya, Divya Kumar
MUSIC Sachin-Jigar
MUSIC PUBLISHER T-Series
LYRICS Vayu

HELLO HELLO - PATAAKHA

ITEM GIRL Malaika Arora
MOVIE PATAAKHA
DIRECTOR Vishal Bhardwaj
RELEASE DATE 28th September
CAST Radhika Madan, Sanya Malhotra, Sunil Grover, Vijay Raaz
SINGER Rekha Bhardwaj
MUSIC Vishal Bhardwaj
MUSIC PUBLISHER Zee Music Company
LYRICS Gulzar



SURAIYYA - THUGS OF HINDOSTAN

ITEM GIRL Katrina Kaif
MOVIE THUGS OF HINDOSTAN
DIRECTOR Vijay Krishna Acharya
RELEASE DATE 8th November
CAST Amitabh Bachchan, Aamir Khan, Fatima Sana Shaikh, Katrina Kaif
SINGER Vishal Dadlani, Shreya Ghoshal
MUSIC Ajay – Atul
MUSIC PUBLISHER YRF
LYRICS Amitabh Bhattacharya



GALI GALI - KGF

ITEM GIRL Mouni Roy
MOVIE KGF
DIRECTOR Prashanth Neel
RELEASE DATE 20st December
CAST Yash Srinidhi Shetty
SINGER Neha Kakkar
MUSIC Tanishk Bagchi
MUSIC PUBLISHER T-Series
LYRICS Rashmi Virag



HUSN PARCHAM - ZERO

ITEM GIRL Katrina Kaif
MOVIE ZERO
DIRECTOR Aanand L. Rai
RELEASE DATE 21st December
CAST Shah Rukh Khan, Anushka Sharma, Katrina Kaif
SINGER Bhoomi Trivedi, Raja Kumari
MUSIC Ajay – Atul
MUSIC PUBLISHER T-Series
LYRICS Irshad Kamil