PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Mo´se  >  Very simple page details  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: example script
Class: Very simple page details
Parse and extract Web page information details
Author: By
Last change: add new functionalities test
Date: 3 years ago
Size: 2,266 bytes
 

Contents

Class file image Download
<?php session_start(); ?>
<!DOCTYPE HTML>
<html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
    <title>Test</title>
    </head>
    <body>

<?php
set_time_limit
(0);
include_once
"VSPD.class.php";
 
//$obj=new VSPD("https://www.phpclasses.org/");

 
$obj=new VSPD("https://fr.investing.com/indices/major-indices",stream_context_create($opts = array(
 
'http'=>array(
   
'method'=>"GET",
   
'user_agent'=>"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
 
)
)));
// echo "Page title:";
// echo '<pre>'.$obj->getTitle().'</pre>';

// echo "All Images:";
// echo '<pre>'.print_r($obj->getImages(),true).'</pre>';



// echo "Internal links:";

// echo '<pre>'.print_r($obj->getInternalinks(true),true).'</pre>';

// echo "External links:";

// echo '<pre>'.print_r($obj->getExternalinks(true),true).'</pre>';
// echo "Headers:";
// echo '<pre>'.print_r($obj->getHeaders(),true).'</pre>';
// echo "Header1:";
// echo '<pre>'.print_r($obj->getH1(),true).'</pre>';
// echo "Header2:";
// echo '<pre>'.print_r($obj->getH2(),true).'</pre>';
// echo "Header3:";
// echo '<pre>'.print_r($obj->getH3(),true).'</pre>';
// echo "CHARSET:";
echo '<pre>'.print_r($obj-> getCharset(),true).'</pre>';
echo
"METAS:";
echo
'<pre>'.print_r($obj-> XplicitMeta(),true).'</pre>';
// echo "Specifics tag:";
// echo '<pre>'.print_r($obj-> getDTag('div'),true).'</pre>';
// echo '<pre>'.print_r($obj-> getSTag('img'),true).'</pre>';
// echo '<pre>'.var_dump($obj->getElementsByTagName('div')).'</pre>';
echo '<pre>'.print_r($obj-> getOG(),true).'</pre>';
echo
'<pre>'.print_r($obj-> getTwitterTags(),true).'</pre>';
echo
'<pre>'.print_r($obj-> getHttpEquiv(),true).'</pre>';
// echo "BROKEN LINKS:";
// echo '<pre>'.var_dump($obj->check_broken_externalLinks()).'</pre>';
// echo "check FAKE BROKEN LINKS:";
// $ar=array('https://www.phpclasses.org/browse/mouton.html','https://www.phpclasses.org/voleur.html','https://www.stupidthieves.com','www.phpclasses.org/');
// foreach($ar as $k=>$v){
// if(VSPD::is_broken_link($v)) $brokens[]=$v;
// }
// echo '<pre>';
// var_dump($brokens);
// echo '</pre>';
?>
</body>
</html>

For more information send a message to info at phpclasses dot org.