Php offers you to send data in various ways like get, post. Using php you can also use file_get_contents
to send data using url. Lets see an example below:-
$information = array('http' => array(
'method' => 'POST',
'content' => 'username=admin_password=235dfd656d2f65df'
));
$cript= stream_context_create($information );
$FileOpen= @fopen($sUrl, 'rb', false, $cript);
if (!$FileOpen)
{
throw new Exception("Problem with $sUrl, $php_errormsg");
}
$response = @stream_get_contents($FileOpen);
if ($response === false)
{
throw new Exception("Problem reading data from $sUrl, $php_errormsg");
}
0 Comment(s)