How do I send a data contained in a $_POST request to another server? Here's my php file
<?php
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email = $_POST['email'];
$contact = $_POST['contact'];
$address = $_POST['address'];
$ip = $_SERVER['REMOTE_ADDR'];
if($name !=''&& $email !=''&& $contact !=''&& $address !='')
{
header("Location:http://example.com/loginsuccess/");
}
else{
?><span><?php echo "You must fill out all the fields";?></span> <?php
}
}
?>
Like if I wanted $ip
to be logged then how do I add that to another server? Like for example if my domain is example.com then I want the $ip
log to go on myexample.com. I do not know how to do this and I've spent so long trying and experimenting on how to do this but I can't figure it out, so that's why I'm here on stackoverflow
IP Details :
$getip
"; – user3526204 Sep 15 '16 at 09:20