- //Ça resemble beaucoup au code en JavaScript celui en PHP.
- <html>
- <head>
- <script language="JavaScript">
- <!-- debut
- function resolution() {
- document.location="index.php?r=1&width="+screen.width+"&height="+screen.height;
- }
- // fin -->
- </script>
- </head>
- <?
- if(empty($r)){
- echo '<body onLoad="resolution();"></body></html>';
- }else{
- echo "<body>";
- echo "Votre résolution est $width * $height";
- echo "</body>";
- echo "</html>";
- }
- ?>
- //Si vous voulez, exemple, oubliger quelqu'un à avoir la résolution 800x600 vous pouvez faire ca:
- <html>
- <head>
- <script language="JavaScript">
- <!-- debut
- function resolution() {
- document.location="index.php?r=1&width="+screen.width+"&height="+screen.height;
- }
- // fin -->
- </script>
- </head>
- <?
- if(empty($r)){
- echo '<body onLoad="resolution();"></body></html>';
- }else{
- echo "<body>";
- if $width != '800' {
- echo "Votre résolution doit être en 800x600 pour aller sur ce site web.";
- }
- else
- {
- echo "blablabla";
- }
- echo "</body>";
- echo "</html>";
- }
- ?>
-
//Ça resemble beaucoup au code en JavaScript celui en PHP.
<html>
<head>
<script language="JavaScript">
<!-- debut
function resolution() {
document.location="index.php?r=1&width="+screen.width+"&height="+screen.height;
}
// fin -->
</script>
</head>
<?
if(empty($r)){
echo '<body onLoad="resolution();"></body></html>';
}else{
echo "<body>";
echo "Votre résolution est $width * $height";
echo "</body>";
echo "</html>";
}
?>
//Si vous voulez, exemple, oubliger quelqu'un à avoir la résolution 800x600 vous pouvez faire ca:
<html>
<head>
<script language="JavaScript">
<!-- debut
function resolution() {
document.location="index.php?r=1&width="+screen.width+"&height="+screen.height;
}
// fin -->
</script>
</head>
<?
if(empty($r)){
echo '<body onLoad="resolution();"></body></html>';
}else{
echo "<body>";
if $width != '800' {
echo "Votre résolution doit être en 800x600 pour aller sur ce site web.";
}
else
{
echo "blablabla";
}
echo "</body>";
echo "</html>";
}
?>