Advertisement
shadowc0de

Untitled

Feb 26th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <html><head>
  2. <title></title>
  3. </head>
  4. <body>
  5. <form action='' method='post'>
  6. <p>Username: <input type='text' name='username' /></p>
  7. <p>Password: <input type='password' name='password' /></p>
  8. <p>Media ID: <input type='text' name='mediaid' /></p>
  9. <p>Comment: <input type='text' name='comment' /></p>
  10.  
  11. <p><input type='submit' value='Submit' name='submit' /></p>
  12. </form>
  13. </body>
  14. </html>
  15. <?php
  16. error_reporting(0);
  17. if(isset($_POST['submit'])){
  18. require './src/Instagram.php';
  19. /////// CONFIG ///////
  20. $username = $_POST['username'];
  21. $password = $_POST['password'];
  22. $debug = false;
  23. $jam = "".gmdate("H:i:s", time()+60*60*7);
  24. $commentText = '$_POST['comment']';
  25. $mediaId = $_POST['mediaid'];
  26.  
  27.  
  28. $i = new Instagram($username, $password, $debug);
  29.  
  30. try{
  31. $i->login();
  32. } catch (InstagramException $e)
  33. {
  34. $e->getMessage();
  35. exit();
  36. }
  37.  
  38. try {
  39. $i->comment($mediaId, $commentText);
  40. } catch (Exception $e)
  41. {
  42. echo $e->getMessage();
  43. }
  44.  
  45. echo $commentText;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement