Skip to content

PHP - 2. page

PHP Display YouTube Video Class, OOP. Embed YouTube Video.

Share Button

 <?php /** *   YouTube video Class – display video *   Features(Briefly): *       – Check if video Exists *       – Set Video width, length, frameborder, allowfullscreen *       – Display YouTube Video […]

Share Button

PHP Condition Statements: Shorthand, Nested, Inside function

Share Button

 <?php /** Declare String Variable  */ $name = “Kwacho”; /** *   #1   *   Regular   */ if($name){     echo $name; } else {     echo “….Oopsy”; } /** *   […]

Share Button

PHP Check Regular Expressions with preg_match()

Share Button

<?php     //Simple Regex Matching code.     /** Regular Expression     *   accepts:     *       – upper & lower case letters from a to z     *       – numbers from […]

Share Button

PHP function that accepts any number of arguments

Share Button

<?php     /** Function accepting any number of arguments */     function manyArgsFunc(){           /**  Returns the number of arguments passed to the function */         $numOfArgs = func_num_args();   […]

Share Button

PHP redirect Class with time delay, OOP.

Share Button

<?php /** PHP redirection with delay class *   Takes two parameters: *   $delay      – time delay in seconds i.e. 4 *   $location   – redirect location i.e. linuxget.co.uk    */ class […]

Share Button

PHP Class, Check if YouTube video Link Exists and display video info

Share Button

 <?php class CheckYouTubeVideo {     /** Set Success Message */     private function setSuccessMsg(){         $this->exists = “YouTube Video Exists :)”;         return $this->exists;     }          /** […]

Share Button