PHP Classes

File: detect.php

Recommend this page to a friend!
  Classes of Jaroslaw Miazga   Redirection Detector   detect.php   Download  
File: detect.php
Role: Example script
Content type: text/plain
Description: Example of using this class
Class: Redirection Detector
Check and retrieve the redirection URL of a page
Author: By
Last change:
Date: 14 years ago
Size: 383 bytes
 

Contents

Class file image Download
<?php
//main class
require 'RedirectionDetector.php';

//example

$redirection = new RedirectionDetector();
$redirection->setUrl($_GET['url']);


echo
'<h1>Looking for redirection:</h1><br />';

if(
$redirection->checkAll())
{
     echo
'Redirection exists for page: '.$redirection->getRedirectedPage();
}
else
{
     echo
"Redirection doesn't exists";
}
    
    
   
?>