In the first file - the file I execute I have the following content:
<?php
$name = "Julia";
$article = "I like papers";
$url = "http://domain.com/process.php";
$param = array('http' => array(
'method' => 'POST',
'content' => $article
));
$mad = @stream_context_create($param);
$fp = @fopen($url, 'rb', false, $mad);
$response = @stream_get_contents($fp);
echo $response;
?>
in the second file http://domain.com/process.php I have this:
<?php
$name = $_POST["name"];
$article = $_POST["content"];
$article = $_POST["article"];
echo $article;
echo $name;
echo "Hello there</br>:\n";
?>
The output that I get is just:
"Hello there"
So what is wrong, how do I pass the values $article and $name via the request and how to I extract them in the file process.php?