SHARE
TWEET

Untitled

a guest Sep 26th, 2016 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // URL DER ADRESSE AN DEM DER POST GESENDET WIRD
  4. $url  = 'http://www.meinedomain.de/daten.php';
  5. // DIE GESENDETEN DATEN IN EIN ARRAY SETZEN
  6. $data = array('name' => 'Max', 'alter' => '25');
  7.  
  8. $options = array(
  9.     'http' => array(
  10.         'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
  11.         'method'  => 'POST',
  12.         'content' => http_build_query($data)
  13.     )
  14. );
  15. $context  = stream_context_create($options);
  16. $result   = file_get_contents($url, false, $context);
  17. if ($result === FALSE) { /* HIER FEHLERBEHNADLUNG */ }
  18.  
  19. var_dump($result);
  20. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top