Error page
Code (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?PHP
//Get contacts
if((isset($_POST['username'])) && (isset($_POST['password']))) {
//Check to ensure that a username and password have been supplied
if($_POST['service'] == "msn") {
//The service is msn
include('msn_contact_grab.class.php');
$msn2 = new msn;
$returned_emails = $msn2->qGrab($_POST['username'], $_POST['password']);
}
elseif($_POST['service'] == "gmail") {
//The service is gmail
include('libgmailer.php');
$gmailer = new GMailer();
if ($gmailer->created) {
$gmailer->setLoginInfo($_POST['username'], $_POST['password'], 0);
//uncomment if you need it
//$gmailer->setProxy("proxy.company.com");
if ($gmailer->connect()) {
// GMailer connected to Gmail successfully.
// Do something with it.
//Get the contacts
// For "Inbox"
$gmailer->fetchBox(GM_CONTACT, "all", "");
$snapshot = $gmailer->getSnapshot(GM_CONTACT);
//Outputs an array of the contacts
$returned_emails = $snapshot->contacts;
} else {
die("Fail to connect because: ".$gmailer->lastActionStatus());
}
} else {
die("Failed to create GMailer because: ".$gmailer->lastActionStatus());
}
}
}
?>
<HTML>
<HEAD>
</HEAD>
<BODY>
<p>
Your contacts have been retrieved from the <?php echo $_POST['service']; ?> service. Using the form below
you are able to choose which of your contacts you wish to be contacted. Once you have made your
choices use the 'Send Emails' button to send an email to the contacts selected.
</p>
<form method="post" action="send_emails.php">
<table border="1">
<tr>
<td></td>
<td>Email</td>
<td>Name</td>
</tr>
<?PHP
//Create the form for all the emails returned from the contact list
if($_POST['service'] == "msn") {
foreach($returned_emails as $row){
echo "<tr>";
echo '<td><input type="checkbox" name="emails[]" value="'.$row['0'].'" checked="checked"/></td>';
echo '<td>'.$row['0'].'</td>';
echo '<td>'.$row['1'].'</td>';
echo "</tr>\n\n";
};
}
elseif($_POST['service'] == "gmail") {
foreach($returned_emails as $row){"echo "<tr>";
echo '<td><input type="checkbox" name="emails[]" value="'.$row['email'].'" checked="checked"/></td>';
echo '<td>'.$row['email'].'</td>';
echo '<td>'.$row['name'].'</td>';
echo "</tr>\n\n";
};
}
?>
</table>
<input type="submit" value="Send Emails" />
</form>
//Get contacts
if((isset($_POST['username'])) && (isset($_POST['password']))) {
//Check to ensure that a username and password have been supplied
if($_POST['service'] == "msn") {
//The service is msn
include('msn_contact_grab.class.php');
$msn2 = new msn;
$returned_emails = $msn2->qGrab($_POST['username'], $_POST['password']);
}
elseif($_POST['service'] == "gmail") {
//The service is gmail
include('libgmailer.php');
$gmailer = new GMailer();
if ($gmailer->created) {
$gmailer->setLoginInfo($_POST['username'], $_POST['password'], 0);
//uncomment if you need it
//$gmailer->setProxy("proxy.company.com");
if ($gmailer->connect()) {
// GMailer connected to Gmail successfully.
// Do something with it.
//Get the contacts
// For "Inbox"
$gmailer->fetchBox(GM_CONTACT, "all", "");
$snapshot = $gmailer->getSnapshot(GM_CONTACT);
//Outputs an array of the contacts
$returned_emails = $snapshot->contacts;
} else {
die("Fail to connect because: ".$gmailer->lastActionStatus());
}
} else {
die("Failed to create GMailer because: ".$gmailer->lastActionStatus());
}
}
}
?>
<HTML>
<HEAD>
</HEAD>
<BODY>
<p>
Your contacts have been retrieved from the <?php echo $_POST['service']; ?> service. Using the form below
you are able to choose which of your contacts you wish to be contacted. Once you have made your
choices use the 'Send Emails' button to send an email to the contacts selected.
</p>
<form method="post" action="send_emails.php">
<table border="1">
<tr>
<td></td>
<td>Email</td>
<td>Name</td>
</tr>
<?PHP
//Create the form for all the emails returned from the contact list
if($_POST['service'] == "msn") {
foreach($returned_emails as $row){
echo "<tr>";
echo '<td><input type="checkbox" name="emails[]" value="'.$row['0'].'" checked="checked"/></td>';
echo '<td>'.$row['0'].'</td>';
echo '<td>'.$row['1'].'</td>';
echo "</tr>\n\n";
};
}
elseif($_POST['service'] == "gmail") {
foreach($returned_emails as $row){"echo "<tr>";
echo '<td><input type="checkbox" name="emails[]" value="'.$row['email'].'" checked="checked"/></td>';
echo '<td>'.$row['email'].'</td>';
echo '<td>'.$row['name'].'</td>';
echo "</tr>\n\n";
};
}
?>
</table>
<input type="submit" value="Send Emails" />
</form>
Dit is een gewoon een simpel php dingetje,
maar mijn vraag is,
Ik heb maar 5 plaatjes,
Hoe krijg je als je bijv error 8000 aanvraagt dat die 404 plaatje geeft,
Plaatjes die ik heb:
400
401
403
404
500
Ik heb al geprobeerd met
If ($_GET['error']== 404)
$img = ('404-error.jpg');
En dan met elseif, maar dat werkte niet
Code (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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
$img = $_GET['error'];
?>
<meta http-equiv="Content-Type" content="text/html;" />
<meta http-equiv="Content-Language" content="nl" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<style type="text/css">
html,body,div { font-family: verdana; font-size: 11px; color: #666666; text-align: center; }
#main { position: absolute; top: 50%; left: 50%; height: 350px; width: 400px; margin: -175px 0px 0px -200px; }
#top { font-weight: bold; }
#pic { height: 275px; background: url(<?php echo $img ?>-error.jpg) center no-repeat; }
#bot a { text-decoration: none; color: #0099FF; }
#bot a:hover { text-decoration: underline; }
</style>
<title>Frankyy - [ Error <?php echo $error ?> ]</title>
<div id="main">
<div id="top">Frankyy</div>
<div id="pic"></div>
<div id="bot">[ <a href="http://frankyy.dyndns.org">frankyy.dyndns.org</a> ]</div>
</div>
$img = $_GET['error'];
?>
<meta http-equiv="Content-Type" content="text/html;" />
<meta http-equiv="Content-Language" content="nl" />
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<style type="text/css">
html,body,div { font-family: verdana; font-size: 11px; color: #666666; text-align: center; }
#main { position: absolute; top: 50%; left: 50%; height: 350px; width: 400px; margin: -175px 0px 0px -200px; }
#top { font-weight: bold; }
#pic { height: 275px; background: url(<?php echo $img ?>-error.jpg) center no-repeat; }
#bot a { text-decoration: none; color: #0099FF; }
#bot a:hover { text-decoration: underline; }
</style>
<title>Frankyy - [ Error <?php echo $error ?> ]</title>
<div id="main">
<div id="top">Frankyy</div>
<div id="pic"></div>
<div id="bot">[ <a href="http://frankyy.dyndns.org">frankyy.dyndns.org</a> ]</div>
</div>
Gewijzigd op 01/01/1970 01:00:00 door Frankyy
Ik ga ff voor je googlen
Kijk hier eens naar :
http://www.404-error-page.com/404-create-a-custom-404-error-page-with-htaccess.shtml
Gewijzigd op 01/01/1970 01:00:00 door Jacco Engel
EDIT:
HTTP-responses
Een HTTP-response bestaat uit een resultaat-code, headervelden en een body (de boodschap). De resultaat-code bestaat uit minimaal drie cijfers. Het eerste cijfer is het belangrijkste:
* 1xx: een informele boodschap van de webserver die nog gevolgd zal worden door andere data
* 2xx: een boodschap van de server dat de gevraagde actie succesvol is afgehandeld
* 3xx: een "redirect" naar een andere locatie, om wat voor reden ook
* 4xx: een foutboodschap die door de client (typisch een webbrowser) veroorzaakt is, zoals het verkeerd typen van een URL
* 5xx: een foutboodschap die door de webserver veroorzaakt is, zoals een fout in een CGI script
* 6xx: een proxy fout is opgetreden
De meest voorkomende resultaat codes zijn:
* 200 OK – Het gevraagde document is succesvol opgevraagd.
* 304 Not Modified – T.o.v. de versie in de cache is de pagina niet gewijzigd.
* 403 Forbidden – Het opgevraagde document mag niet bekeken worden.
* 404 Not Found – Het opgevraagde document bestaat niet.
* 405 Not Allowed - De gebruiker is niet gerechtigd het gevraagde document te bekijken.
* 500 Internal Server Error - De webserver heeft de gevraagde actie niet kunnen uitvoeren
Gewijzigd op 01/01/1970 01:00:00 door Onbekend Onbekend
Dat bedoel ik, Ik wil dat bijv error 8000 NIET word geshowd,