Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // URL DER ADRESSE AN DEM DER POST GESENDET WIRD
- $url = 'http://www.meinedomain.de/daten.php';
- // DIE GESENDETEN DATEN IN EIN ARRAY SETZEN
- $data = array('name' => 'Max', 'alter' => '25');
- $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) { /* HIER FEHLERBEHNADLUNG */ }
- var_dump($result);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement