Witam czy w url moge wpisać adres ip ?
i jak naprawić ten błąd
Parse error: syntax error, unexpected ',' in C:\xampp\htdocs\radofipy\send data.php on line 2
<?php
$url = '192.168.0.107',80;
$data = array('one', 'two'=>2, 'three'=>33);
// use key 'http' even if you send the request to https://...
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) { /* Handle error */ }
var_dump($result);
?>