Created
March 26, 2013 20:33
-
-
Save vincent4vx/5248971 to your computer and use it in GitHub Desktop.
Exemple pour RpgApi.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Fichier vote.php --> | |
<?php | |
//inclut le fichier de l'api | |
include 'RpgApi.php'; | |
//initialise l'api | |
$api = new RpgApi($id_rpg); | |
?> | |
<form action="voteok.php" method="post"> | |
<?php echo $api->getCaptcha()?><!-- affiche le captcha de rpg --> | |
<input type="submit" value="Voter !"/> | |
</form> | |
<!-- FIN vote.php --> | |
<!-- Fichier voteok.php --> | |
<?php | |
//inclut le fichier de l'api | |
include 'RpgApi.php'; | |
//initialise l'api | |
$api = new RpgApi($id_rpg); | |
//envoi le vote à rpg paradize et regarde si il est bon | |
if($api->submitVote()){ | |
//ajoute les points ici... | |
echo 'Vote Ok'; | |
}else | |
echo 'Captcha incorrect !'; | |
<!-- FIN voteok.php --> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment