<?php $url = 'htt ps://mov iemo.ru'; $params = array( 'id' => '1', 'vid' => '1', 'toch' => '1' ); $file = file_get_contents($url, false, stream_context_create(array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => http_build_query($params) ) ))); echo $file;
<?php echo $_POST['id']; #Выводим полученное пост if($_POST['id'] == 1){ echo 'Вы отправили запрос с ид №1'; }
<?php if(isset($_REQUEST['id'])) { $id = (int) $_REQUEST['id']; echo $id; } ?> Файл который принимает