Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = 'https://graph.facebook.com/me/feed';
- $messagetosend = 'ąężźćęóń';
- $access_token = 'CAACEdEose0cBAEuffIOb7F6YSQFOqEPiE0xXyzR6tBKstFtuj8d0fOxqarGkzFBZCYUdHhsadfseNbqP5oBZCv1vQCQ0bU4LZZAERWAGXAFfuakvg4u4xwSfd7OcoJfib2GopT9CfGLasWvRD1W7KRLz027uhQcYhGwguV8VsPMPETQKpQtxuCGZARplf1ifOfgNLZAzftBBn6FORfQvgILWZBr9C4MT1A3';
- $source = 'apricot626.usermd.net/img/iph-6pfree.png';
- $data = array('message' => $messagetosend, 'access_token' => $access_token, 'source' => $source);
- // 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);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement