Script php sur un seul domaine

Alexis -  
 Alexis -
Bonjour,
Je souhaiterai faire un script en php qui ne s'affiche que quand il est hébergé sur mon site (comme exemple "toto.com")
Car un ami aura accès au FTP et va partager ce script qui coûte très cher (skype resolver)
J'ai commencé a faire ceci mais j'ai une erreur 500 . J'espere que vous pourrez me corriger.
Merci Beaucoup,
Alexis

Code commencé:

<?
$monUrl = "http://".$_SERVER['HTTP_HOST']; 
{
if($monUrl = "http://toto.com")
{echo "Correct"}

else(header("Location: http://google.fr"); )
}
?>



A voir également:

2 réponses

ReDLoG
 
ça ne te coûteras pas trop cher cette fois-ci :
<?php
$monUrl = "http://".$_SERVER['HTTP_HOST'];
if($monUrl == "http://toto.com") {
	echo "Correct";
} else {
	header("Location: http://www.google.fr");
}
?>
0
Alexis
 
Merci , Je teste sa.
0