script.php
LFSLapper.lpr
Hello developers, I had the opportunity to try these codes today and I tried them. But I am encountering a problem here, let me state the problem right away. First of all, I don't get any errors, but I think I did something wrong somewhere, but I couldn't figure it out. I'm starting to explain, I ran the codes on my localhost, I have a script.php file, but I couldn't print the values coming from there to the lapper with if. To elaborate, let's assume that I did not define $allowed in the if else values in PHP, and I added 2 GlobalMsgs to the if and else parts where $allowed is written. If the value is yes, it sends me a Value: 1 msg. If the value is no, I set the value: 0 to a GlobalMsg via PHP. In this case, I get the correct value, but when I put $allowed value in php and want to send GlobalMsg to the lapper with if, the $allowed value from php always sends the same message whether it is 1 or 0. I think I have a problem with the if writing in the lapper section, I couldn't solve it. It would be nice if people with knowledge on this subject could help me. Good work to everyone.
<?php
$allowed_list = array(
"TechEdison" => "yes",
"Androphp" => "no"
);
$username = $_GET["u"];
if($allowed_list[$username] == "yes")
{
echo '$allowed = 1;';
}
else
{
echo '$allowed = 0;';
}
?>
LFSLapper.lpr
Sub verify($userName)
http("http://localhost/script.php?u=".$userName);
IF($allowed == 0)
THEN
cmdLFS("/kick ".$userName);
GlobalMsg("Kicked: ".$userName.". Reason: Not Alowed");
ELSE
GlobalMsg("Welcome Back: ".$userName);
ENDIF
EndSub
CASE "!test":
verify($userName);
BREAK;
Hello developers, I had the opportunity to try these codes today and I tried them. But I am encountering a problem here, let me state the problem right away. First of all, I don't get any errors, but I think I did something wrong somewhere, but I couldn't figure it out. I'm starting to explain, I ran the codes on my localhost, I have a script.php file, but I couldn't print the values coming from there to the lapper with if. To elaborate, let's assume that I did not define $allowed in the if else values in PHP, and I added 2 GlobalMsgs to the if and else parts where $allowed is written. If the value is yes, it sends me a Value: 1 msg. If the value is no, I set the value: 0 to a GlobalMsg via PHP. In this case, I get the correct value, but when I put $allowed value in php and want to send GlobalMsg to the lapper with if, the $allowed value from php always sends the same message whether it is 1 or 0. I think I have a problem with the if writing in the lapper section, I couldn't solve it. It would be nice if people with knowledge on this subject could help me. Good work to everyone.