<?php require_once "_main2.php"; $storyImage = getStoryImage($_GET["id_story_image"]); header("Content-type: " . $storyImage["type_image"]); echo $storyImage["story_image"];
$pageurl = $_POST['url']; } //First we will instantiate the object with the give url $myobj = new MyParser($pageurl); //getTitle() function is called and the result is copied to the $title variable $title = $myobj->getTitle(); //getMetaContent() function is called and the result is copied to the $content variable $content = $myobj->getMetaContent(); //getStory() function is called and the result is copied to the $story variable $story = $myobj->getStory(); //getImages() function is called and the result is copied to the $images array $images = $myobj->getImages(); //array_unique function is used to remove any duplicate images $images = array_unique($images); //getStoryImage() function is called and the result is copied to the $storyimage variable variable $storyimage = getStoryImage($images); //getJpgs() function is called and the result is copied to the $jpgs variable $jpgs = getJpgs($images); //getLinks() function is called and the result is copied to the $links variable $links = $myobj->getLinks(); //getH1() function is called and the result is copied to the $h1s variable $h1s = $myobj->getH1(); //getH2() function is called and the result is copied to the $h2s variable $h2s = $myobj->getH2(); //getH3() function is called and the result is copied to the $h3s variable $h3s = $myobj->getH3(); //This function takes images as input and returns only JPG's among those images function getJpgs($images) { $i = 0; //The following foreach loop iterates through each image