PHP Classes

File: tests/is_url.php

Recommend this page to a friend!
  Classes of Ali YILMAZ  >  Mind Framework  >  tests/is_url.php  >  Download  
File: tests/is_url.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Mind Framework
Framework that implements several design patterns
Author: By
Last change:
Date: 3 months ago
Size: 1,874 bytes
 

Contents

Class file image Download
<?php
require_once '../src/Mind.php';

$Mind = new Mind();

echo
'<hr>';

$str = $Mind->base_url;
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir.';
}

echo
'<hr>';

$str = 'http://localhost';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir.';
}

echo
'<hr>';

$str = 'https://127.0.0.1/test';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir.';
}

echo
'<hr>';

$str = 'https://test.example.com/test';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir. <strong>'.$str.'</strong>';
}

echo
'<hr>';

$str = 'https://test-example.com/test';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir. <strong>'.$str.'</strong>';
}

echo
'<hr>';

$str = 'example.com';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir. <strong>'.$str.'</strong>';
}

echo
'<hr>';

$str = 'http://example.com';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir. <strong>'.$str.'</strong>';
}

echo
'<hr>';

$str = 'http://www.example.com';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir. <strong>'.$str.'</strong>';
}

echo
'<hr>';

$str = 'https://www.example.com';
if(
$Mind->is_url($str)){
    echo
'Bu bir ba?lant?d?r. <strong>'.$str.'</strong>';
} else {
    echo
'Bu bir ba?lant? de?ildir. <strong>'.$str.'</strong>';
}

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