-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml_samples.php
87 lines (80 loc) · 2.46 KB
/
html_samples.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=yes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="author" content="Steve Wright">
<link rel="shortcut icon" href="favicon.ico" >
<link rel="stylesheet" type="text/css" href="wrightfamily.css">
<script src="wrightfamily.js"></script>
<title>HTML, CSS and PHP stuff</title>
</head>
<body class="site">
<?php include("includes/header.php")?>
<main class="site-content">
<p>This stuff is really here so that I can find it again when I need it.</p>
<h3>HTML Stuff</h3>
<p> </p>
<hr>
<h3>CSS Stuff</h3>
<p> Importing site wide fonts</p>
<p> Placing <code>@import url(https://fonts.googleapis.com/css?family=Raleway); </code> at the top of your CSS file will import the Google
Raleway font family.</p>
<p> This is used by adding "Raleway" to the font-family declaration in your CSS files like
this <code>font-family: "Raleway", Helvetica, sans-serif; </code><p>
<hr>
<h3>PHP Stuff</h3>
<p>A simple PHP script to print the date a web page was last modified.</p>
<pre><code>
Last updated: <?php url="http://www.example.com/"; //change the url to suit
$a= (get_headers($url,1));
$c = date("l F j Y T e", strtotime($a['Last-Modified']));
print_r ($c);
echo ("."); ?>
</code></pre>
<p>Will produce this:- </p>
<p>Last updated: <?php $url="http://www.example.com/"; //change the url to suit
$a= (get_headers($url,1));
$c = date("l F j Y T e", strtotime($a['Last-Modified']));
print_r ($c);
echo (".");
?>
</p>
<!---OR-
<pre><code>
<? $file="http://www.example.com/index.html";
{
if(is_file($file))
{
$mod_date=date("l F j Y H:i:s T e. ", filemtime($file));
echo "Last Updated: ". $mod_date;
}
else
{
echo "Data not currently available";
}
}
?>
</code></pre>
<p>Will produce this:- </p> -->
<?php
/* $file="http://www.example.com/index.htm";
{
if(is_file($file))
{
$mod_date=date("l F j Y H:i:s T e. ", filemtime($file));
echo "Last Updated: ". $mod_date;
}
else
{
echo "Data not currently available";
}
}*/
?>
</main>
<?php $pagemodified = filemtime(__FILE__);
include("includes/footer.php");?>
</body>
</html>