Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html><head>
- <title></title>
- </head>
- <body>
- <form action='' method='post'>
- <p>Username: <input type='text' name='username' /></p>
- <p>Password: <input type='password' name='password' /></p>
- <p>Media ID: <input type='text' name='mediaid' /></p>
- <p>Comment: <input type='text' name='comment' /></p>
- <p><input type='submit' value='Submit' name='submit' /></p>
- </form>
- </body>
- </html>
- <?php
- error_reporting(0);
- if(isset($_POST['submit'])){
- require './src/Instagram.php';
- /////// CONFIG ///////
- $username = $_POST['username'];
- $password = $_POST['password'];
- $debug = false;
- $jam = "".gmdate("H:i:s", time()+60*60*7);
- $commentText = '$_POST['comment']';
- $mediaId = $_POST['mediaid'];
- $i = new Instagram($username, $password, $debug);
- try{
- $i->login();
- } catch (InstagramException $e)
- {
- $e->getMessage();
- exit();
- }
- try {
- $i->comment($mediaId, $commentText);
- } catch (Exception $e)
- {
- echo $e->getMessage();
- }
- echo $commentText;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement