Skip to content

Instantly share code, notes, and snippets.

@zhuharev
Created May 12, 2017 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhuharev/0885bfe03373cf36d581d8babad71a5f to your computer and use it in GitHub Desktop.
Save zhuharev/0885bfe03373cf36d581d8babad71a5f to your computer and use it in GitHub Desktop.
lol.php
<?php
include __DIR__.'/vendor/autoload.php';
//require __DIR__.'/vendor/mgp25/instagram-php/src/Instagram.php';
/////// CONFIG ///////
$username = 'zhuharev';
$password = 'x';
$debug = true;
$photo = 'image.jpg'; // path to the photo
$caption = 'Здесь должен быть умный текст. #люблюебанутыхтёлок#пономарь#пидр#oblaka67#oblakahookah#oblakagavno#пидорыповсюду#сампидор#хайпмашина#бог#смм'; // caption
//////////////////////
$i = new \InstagramAPI\Instagram($username, $password, $debug);
try {
$i->login();
} catch (Exception $e) {
$e->getMessage();
exit();
}
try {
$i->uploadPhoto($photo, $caption);
} catch (Exception $e) {
echo $e->getMessage();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment