Grab Media from Remote Web Pages with PHP 5

Presenting videos or pictures from remote websites is popular - it makes a lot of web pages more interesting, attractive or more instructive. The GrabMediaFactory class allows to maintain a lot of video and image types from remote domains as a package (see screenshots below). Some sort of all in one solution for grabbing videos or images from remote web pages. Basically two components are responsible for that: A factory class (do the same but in different ways), which consists of a GRAB_HTML5, GRAB_FLV, GRAB_SWF and a GRAB_IMG class, and the DOMDocument class from PHP 5, which allows to fix the HTML tags. Besides other features as the support for HTML5 video formats and a demo form to test remote media presentation it allows you to pick up HTML5 videos by browser comptability (Chrome, Firefox, Internet Explorer, Microsoft Edge, Opera, Safari). With further facilities as the support of YouTube, Google+, Vimeo, Dailymotion, Facebook and Flickr the GrabMediaFactory will make it easy for you to share your desired videos or images with others.

The scripts snippets you see here (the complete script is downloadable) is only a small part of the complete script. That's it. All stuff is all prepared for your convenience (example with necessary files included). Best regards Claudio Biesele


Part of the GrabMediaFactory Class Code:

public static function getGrabber($url,$filend,$videosize,$responsive,$options, $type = self::GRAB_IMG) {
 switch ($type) {

  case self::GRAB_HTML5:
       return new Grab_HTML5($url,$filend,$videosize,$responsive,$options);
  case self::GRAB_FLV:
       return new Grab_FLV($url,$filend,$videosize,$responsive,$options);
  case self::GRAB_SWF:
       return new Grab_SWF($url,$filend,$videosize,$responsive,$options);
  case self::GRAB_IMG:
       return new Grab_IMG($url,$filend,$videosize,$responsive,$options);
       }
  }
  return null;
 }


grabmedia_1.png
Demo form for grabbing media: From YouTube to standard HTML media.
grabmedia_2.png
Single HTML5 file: Supporting video types as mp4, webm, ogv, 3gp.
grabmedia_3.png
SWF and FLV: All in one factory class integrated.
grabmedia_4.png
Images: Grabbed images or videos are all equipped with back links.

Download the full script at www.fastproject.ch. The downloaded script is free from Copyright restrictions, Zurich, 10th of October 2015.
Donate with PayPal:
placeholder