Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP5 Decoder for ionCube Encoder)
- *
- * @ Version : 3.0.7.0
- * @ Author : DeZender
- * @ Release on : 22.06.2017
- * @ Official site : http://DeZender.Net
- *
- */
- $dizin = $_SERVER['DOCUMENT_ROOT'] . '/license.php';
- include $dizin;
- $lisans['site'] = getenv( 'HTTP_HOST' );
- if (substr( $lisans['site'], 0, 4 ) == 'www.') {
- $lisans['site'] = substr( $lisans['site'], 4 );
- }
- $bas = 'Ä°NSTASCRÄ°PT-';
- $des = '-RYBO58D-';
- $yil = date( Y );
- $son = '-';
- $s = 'md5';
- $m = 'sha1';
- $a = 'md5';
- $q = strtoupper( $s( $m( $s( $lisans['site'] ) ) ) );
- $bos = substr( $q, 5, 7 );
- $lisans['hash'] = wordwrap( strtoupper( $s( $a( $s( $a( $m( $s( $a( $m( $lisans['site'] . date( 'YmdH' ) ) ) ) ) ) ) ) ) ), 7, '-', true );
- $liskod = $lisans['hash'];
- $cevir = strrev( $liskod );
- $bcs = $bas . $bos . $des . $cevir . $son . $yil;
- if ($bcs !== $lisanskodu) {
- $lisans_cevap = 'http://www.etkilibey.com/kontrol.php?site=' . $lisans['site'];
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $lisans_cevap );
- curl_setopt( $ch, CURLOPT_HEADER, false );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- $lisans_cevap = curl_exec( $ch );
- curl_close( $ch );
- if ($lisans_cevap != '1') {
- echo '<iframe src="http://www.etkilibey.com/lshata.php" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;">' . "\n" . '</iframe>';
- exit( );
- }
- else {
- $lyaz = fopen( $dizin, 'w+' );
- @fwrite( $lyaz, '<?php' . "\n" . '/**' . "\n\t\n" . ' Bu dosyaya herhangi bir lisans kodu yazmaniz gerekmez' . "\n" . ' Almis oldugunuz urune ait lisans sistemde aktif oldugunda' . "\n" . ' Lisans kodunuz otomatik olarak girilecektir.' . "\n\t\n" . ' Yeni lisans almak icin www.etkilibey.com adresini ziyaret edebilirsiniz' . "\n" . ' ' . "\n" . '*/' . "\n" . '$lisanskodu="' . $bcs . '";' . "\n" . '?>' );
- fclose( $lyaz );
- }
- }
- define( 'INSTAWEB_VERSION', str_replace( 'InstaWebV', '', basename( __FILE__, '.php' ) ) );
- class Instagram
- {
- protected $username = null;
- protected $password = null;
- protected $debug = null;
- protected $uuid = null;
- protected $device_id = null;
- protected $username_id = null;
- /**
- * @var Settings
- */
- public $settings = null;
- protected $userAgent = null;
- protected $token = null;
- protected $isLoggedIn = false;
- protected $rank_token = null;
- protected $IGDataPath = null;
- /**
- * Default class constructor.
- *
- * @param string $username
- * Your Instagram username.
- * @param string $password
- * Your Instagram password.
- * @param $debug
- * Debug on or off, false by default.
- * @param $IGDataPath
- * Default folder to store data, you can change it.
- */
- public function __construct($username, $password, $debug = false, $IGDataPath = NULL)
- {
- $username = trim( $username );
- $password = trim( $password );
- $this->debug = $debug;
- $this->device_id = SignatureUtils::generateDeviceId( md5( $username . $password ) );
- if (!(is_null( $IGDataPath ))) {
- $this->IGDataPath = $IGDataPath;
- }
- else {
- $this->IGDataPath = Wow::get( 'project/cookiePath' ) . 'instagram/';
- }
- $this->checkSettings( $username );
- $this->setUser( $username, $password );
- }
- /**
- * Set the user. Manage multiple accounts.
- *
- * @param string $username
- * Your Instagram username.
- * @param string $password
- * Your Instagram password.
- */
- public function setUser($username, $password)
- {
- $this->username = $username;
- $this->password = $password;
- $this->checkSettings( $username );
- $this->uuid = SignatureUtils::generateUUID( true );
- if (file_exists( $this->IGDataPath . (string) $this->username . '.dat' ) && ($this->settings->get( 'username_id' ) != NULL) && ($this->settings->get( 'token' ) != NULL)) {
- $this->isLoggedIn = true;
- $this->username_id = $this->settings->get( 'username_id' );
- $this->rank_token = $this->username_id . '_' . $this->uuid;
- $this->token = $this->settings->get( 'token' );
- }
- else {
- $this->isLoggedIn = false;
- }
- }
- protected function checkSettings($username)
- {
- $this->settings = new Settings( $this->IGDataPath . $username . '.cnf' );
- if ($this->settings->get( 'version' ) == NULL) {
- $this->settings->set( 'version', Constants::VERSION );
- }
- if ($this->settings->get( 'ip' ) == NULL) {
- $this->settings->set( 'ip', '78.' . rand( 160, 191 ) . '.' . rand( 1, 255 ) . '.' . rand( 1, 255 ) );
- }
- if (($this->settings->get( 'user_agent' ) == NULL) || (version_compare( $this->settings->get( 'version' ), Constants::VERSION ) == -1)) {
- $userAgent = new UserAgent( $this );
- $ua = $userAgent->buildUserAgent( );
- $this->settings->set( 'version', Constants::VERSION );
- $this->settings->set( 'user_agent', $ua );
- }
- $this->userAgent = $this->settings->get( 'user_agent' );
- }
- public function getData()
- {
- return array(
- 'username' => $this->username,
- 'password' => $this->password,
- 'username_id' => $this->username_id,
- 'uuid' => $this->uuid,
- 'token' => $this->token,
- 'rank_token' => $this->rank_token,
- 'user_agent' => $this->userAgent,
- 'ip' => $this->settings->get( 'ip' )
- );
- }
- /**
- * Login to Instagram.
- *
- * @param bool $force
- * Force login to Instagram, this will create a new session
- *
- * @return array
- * Login data
- */
- public function login($force = false)
- {
- if (!($this->isLoggedIn) || $force) {
- $fetch = $this->request( 'si/fetch_headers/?challenge_type=signup&guid=' . SignatureUtils::generateUUID( false ), NULL, true );
- preg_match( '#Set-Cookie: csrftoken=([^;]+)#', $fetch[0], $token );
- $data = array(
- 'phone_id' => SignatureUtils::generateUUID( true ),
- '_csrftoken' => $token[0],
- 'username' => $this->username,
- 'guid' => $this->uuid,
- 'device_id' => $this->device_id,
- 'password' => $this->password,
- 'login_attempt_count' => '0'
- );
- $login = $this->request( 'accounts/login/', SignatureUtils::generateSignature( json_encode( $data ) ), true );
- if ($login[1]['status'] == 'fail') {
- throw new Exception( $login[1]['message'] );
- }
- $this->isLoggedIn = true;
- $this->username_id = $login[1]['logged_in_user']['pk'];
- $this->settings->set( 'username_id', $this->username_id );
- $this->rank_token = $this->username_id . '_' . $this->uuid;
- preg_match( '#Set-Cookie: csrftoken=([^;]+)#', $login[0], $match );
- $this->token = $match[1];
- $this->settings->set( 'token', $this->token );
- $this->syncFeatures( );
- $this->autoCompleteUserList( );
- $this->timelineFeed( );
- $this->getRankedRecipients( );
- $this->getRecentRecipients( );
- $this->megaphoneLog( );
- $this->getv2Inbox( );
- $this->getRecentActivity( );
- $this->getReelsTrayFeed( );
- $this->explore( );
- return $login[1];
- }
- $check = $this->timelineFeed( );
- if (isset( $check['message'] ) && ($check['message'] == 'login_required')) {
- return $this->login( true );
- }
- $this->autoCompleteUserList( );
- $this->getReelsTrayFeed( );
- $this->getRankedRecipients( );
- $this->getRecentRecipients( );
- $this->megaphoneLog( );
- $this->getv2Inbox( );
- $this->getRecentActivity( );
- $this->explore( );
- return array( 'status' => 'ok' );
- }
- public function syncFeatures()
- {
- $data = json_encode( array(
- '_uuid' => $this->uuid,
- '_uid' => $this->username_id,
- 'id' => $this->username_id,
- '_csrftoken' => $this->token,
- 'experiments' => Constants::EXPERIMENTS
- ) );
- return $this->request( 'qe/sync/', SignatureUtils::generateSignature( $data ) )[1];
- }
- protected function autoCompleteUserList()
- {
- return $this->request( 'friendships/autocomplete_user_list/' )[1];
- }
- protected function timelineFeed()
- {
- return $this->request( 'feed/timeline/' )[1];
- }
- protected function megaphoneLog()
- {
- return $this->request( 'megaphone/log/' )[1];
- }
- protected function expose()
- {
- $data = json_encode( array(
- '_uuid' => $this->uuid,
- '_uid' => $this->username_id,
- 'id' => $this->username_id,
- '_csrftoken' => $this->token,
- 'experiment' => 'ig_android_profile_contextual_feed'
- ) );
- $this->request( 'qe/expose/', SignatureUtils::generateSignature( $data ) );
- $this->request( 'qe/expose/', SignatureUtils::generateSignature( $data ) )[1];
- }
- /**
- * Login to Instagram.
- *
- * @return bool
- * Returns true if logged out correctly
- */
- public function logout()
- {
- $logout = $this->request( 'accounts/logout/' );
- if ($logout == 'ok') {
- return true;
- }
- return false;
- }
- /**
- * Upload photo to Instagram.
- *
- * @param string $photo
- * Path to your photo
- * @param string $caption
- * Caption to be included in your photo.
- *
- * @return array
- * Upload data
- */
- public function uploadPhoto($photo, $caption = NULL, $upload_id = NULL)
- {
- $endpoint = Constants::API_URL . 'upload/photo/';
- $boundary = $this->uuid;
- if (!(is_null( $upload_id ))) {
- $fileToUpload = Utils::createVideoIcon( $photo );
- }
- else {
- $upload_id = number_format( round( microtime( true ) * 1000 ), 0, '', '' );
- $fileToUpload = file_get_contents( $photo );
- }
- $bodies = array(
- array(
- 'type' => 'form-data',
- 'name' => 'upload_id',
- 'data' => $upload_id
- ),
- array(
- 'type' => 'form-data',
- 'name' => '_uuid',
- 'data' => $this->uuid
- ),
- array(
- 'type' => 'form-data',
- 'name' => '_csrftoken',
- 'data' => $this->token
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'image_compression',
- 'data' => '{"lib_name":"jt","lib_version":"1.3.0","quality":"70"}'
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'photo',
- 'data' => $fileToUpload,
- 'filename' => 'pending_media_' . number_format( round( microtime( true ) * 1000 ), 0, '', '' ) . '.jpg',
- 'headers' => array(
- 'Content-Transfer-Encoding: binary',
- 'Content-type: application/octet-stream'
- )
- )
- );
- $data = $this->buildBody( $bodies, $boundary );
- $headers = array(
- 'X-IG-Capabilities: ' . Constants::X_IG_Capabilities,
- 'X-IG-Connection-Type: WIFI',
- 'Content-type: multipart/form-data; boundary=' . $boundary,
- 'Content-Length: ' . strlen( $data ),
- 'Accept-Language: tr-TR',
- 'Accept-Encoding: gzip, deflate',
- 'Connection: close',
- 'X_FORWARDED_FOR: ' . $this->settings->get( 'ip' ),
- 'REMOTE_ADDR: ' . $this->settings->get( 'ip' )
- );
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $endpoint );
- curl_setopt( $ch, CURLOPT_USERAGENT, $this->userAgent );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_VERBOSE, $this->debug );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
- $resp = curl_exec( $ch );
- $header_len = curl_getinfo( $ch, CURLINFO_HEADER_SIZE );
- $header = substr( $resp, 0, $header_len );
- $upload = json_decode( substr( $resp, $header_len ), true );
- curl_close( $ch );
- if ($upload['status'] == 'fail') {
- throw new Exception( $upload['message'] );
- }
- if ($this->debug) {
- echo 'RESPONSE: ' . substr( $resp, $header_len ) . "\n\n";
- }
- $configure = $this->configure( $upload['upload_id'], $photo, $caption );
- $this->expose( );
- return $configure;
- }
- public function uploadVideo($video, $caption = NULL)
- {
- $videoData = file_get_contents( $video );
- $endpoint = Constants::API_URL . 'upload/video/';
- $boundary = $this->uuid;
- $upload_id = round( microtime( true ) * 1000 );
- $bodies = array(
- array(
- 'type' => 'form-data',
- 'name' => 'upload_id',
- 'data' => $upload_id
- ),
- array(
- 'type' => 'form-data',
- 'name' => '_csrftoken',
- 'data' => $this->token
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'media_type',
- 'data' => '2'
- ),
- array(
- 'type' => 'form-data',
- 'name' => '_uuid',
- 'data' => $this->uuid
- )
- );
- $data = $this->buildBody( $bodies, $boundary );
- $headers = array(
- 'Connection: keep-alive',
- 'Accept: */*',
- 'Host: i.instagram.com',
- 'Content-type: multipart/form-data; boundary=' . $boundary,
- 'Accept-Language: tr-TR',
- 'X_FORWARDED_FOR: ' . $this->settings->get( 'ip' ),
- 'REMOTE_ADDR: ' . $this->settings->get( 'ip' )
- );
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $endpoint );
- curl_setopt( $ch, CURLOPT_USERAGENT, $this->userAgent );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_VERBOSE, false );
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
- $resp = curl_exec( $ch );
- $header_len = curl_getinfo( $ch, CURLINFO_HEADER_SIZE );
- $body = json_decode( substr( $resp, $header_len ), true );
- $uploadUrl = $body['video_upload_urls'][3]['url'];
- $job = $body['video_upload_urls'][3]['job'];
- $request_size = floor( strlen( $videoData ) / 4 );
- $lastRequestExtra = strlen( $videoData ) - ($request_size * 4);
- $a = 0;
- while ($a <= 3) {
- $start = $a * $request_size;
- $end = (($a + 1) * $request_size) + (($a == 3 ? $lastRequestExtra : 0));
- $headers = array(
- 'Connection: keep-alive',
- 'Accept: */*',
- 'Host: upload.instagram.com',
- 'Cookie2: $Version=1',
- 'Accept-Encoding: gzip, deflate',
- 'Content-Type: application/octet-stream',
- 'Session-ID: ' . $upload_id,
- 'Accept-Language: tr-TR',
- 'Content-Disposition: attachment; filename="video.mov"',
- 'Content-Length: ' . ($end - $start),
- 'Content-Range: ' . 'bytes ' . $start . '-' . ($end - 1) . '/' . strlen( $videoData ),
- 'job: ' . $job
- );
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $uploadUrl );
- curl_setopt( $ch, CURLOPT_USERAGENT, $this->userAgent );
- curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_VERBOSE, false );
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, substr( $videoData, $start, $end ) );
- $result = curl_exec( $ch );
- $header_len = curl_getinfo( $ch, CURLINFO_HEADER_SIZE );
- $body = substr( $result, $header_len );
- $array[] = array( $body );
- ++$a;
- }
- $resp = curl_exec( $ch );
- $header_len = curl_getinfo( $ch, CURLINFO_HEADER_SIZE );
- $header = substr( $resp, 0, $header_len );
- $upload = json_decode( substr( $resp, $header_len ), true );
- curl_close( $ch );
- if ($upload['status'] == 'fail') {
- throw new Exception( $upload['message'] );
- }
- if ($this->debug) {
- echo 'RESPONSE: ' . substr( $resp, $header_len ) . "\n\n";
- }
- $configure = $this->configureVideo( $upload_id, $video, $caption );
- $this->expose( );
- return $configure;
- }
- public function direct_message($recipients, $text)
- {
- if (!(is_array( $recipients ))) {
- $recipients = array( $recipients );
- }
- $string = array( );
- foreach ($recipients as $recipient) {
- $string[] = '"' . $recipient . '"';
- }
- $recipient_users = implode( ',', $string );
- $endpoint = Constants::API_URL . 'direct_v2/threads/broadcast/text/';
- $boundary = $this->uuid;
- $bodies = array(
- array(
- 'type' => 'form-data',
- 'name' => 'recipient_users',
- 'data' => '[[' . $recipient_users . ']]'
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'client_context',
- 'data' => $this->uuid
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'thread_ids',
- 'data' => '["0"]'
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'text',
- 'data' => (is_null( $text ) ? '' : $text)
- )
- );
- $data = $this->buildBody( $bodies, $boundary );
- $headers = array(
- 'Proxy-Connection: keep-alive',
- 'Connection: keep-alive',
- 'Accept: */*',
- 'Content-type: multipart/form-data; boundary=' . $boundary,
- 'Accept-Language: tr-TR'
- );
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $endpoint );
- curl_setopt( $ch, CURLOPT_USERAGENT, $this->userAgent );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_VERBOSE, $this->debug );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
- $resp = curl_exec( $ch );
- $header_len = curl_getinfo( $ch, CURLINFO_HEADER_SIZE );
- $header = substr( $resp, 0, $header_len );
- $upload = json_decode( substr( $resp, $header_len ), true );
- curl_close( $ch );
- }
- public function direct_share($media_id, $recipients, $text = NULL)
- {
- if (!(is_array( $recipients ))) {
- $recipients = array( $recipients );
- }
- $string = array( );
- foreach ($recipients as $recipient) {
- $string[] = '"' . $recipient . '"';
- }
- $recipient_users = implode( ',', $string );
- $endpoint = Constants::API_URL . 'direct_v2/threads/broadcast/media_share/?media_type=photo';
- $boundary = $this->uuid;
- $bodies = array(
- array(
- 'type' => 'form-data',
- 'name' => 'media_id',
- 'data' => $media_id
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'recipient_users',
- 'data' => '[[' . $recipient_users . ']]'
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'client_context',
- 'data' => $this->uuid
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'thread_ids',
- 'data' => '["0"]'
- ),
- array(
- 'type' => 'form-data',
- 'name' => 'text',
- 'data' => (is_null( $text ) ? '' : $text)
- )
- );
- $data = $this->buildBody( $bodies, $boundary );
- $headers = array(
- 'Proxy-Connection: keep-alive',
- 'Connection: keep-alive',
- 'Accept: */*',
- 'Content-type: multipart/form-data; boundary=' . $boundary,
- 'Accept-Language: tr-TR'
- );
- $ch = curl_init( );
- curl_setopt( $ch, CURLOPT_URL, $endpoint );
- curl_setopt( $ch, CURLOPT_USERAGENT, $this->userAgent );
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
- curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
- curl_setopt( $ch, CURLOPT_HEADER, true );
- curl_setopt( $ch, CURLOPT_VERBOSE, $this->debug );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );
- curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
- curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
- curl_setopt( $ch, CURLOPT_COOKIEFILE, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_COOKIEJAR, $this->IGDataPath . (string) $this->username . '.dat' );
- curl_setopt( $ch, CURLOPT_POST, true );
- curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
- $resp = curl_exec( $ch );
- $header_len = curl_getinfo( $ch, CURLINFO_HEADER_SIZE );
- $header = substr( $resp, 0, $header_len );
- $upload = json_decode( substr( $resp, $header_len ), true );
- curl_close( $ch );
- }
- protected function configureVideo($upload_id, $video, $caption = '')
- {
- $this->uploadPhoto( $video, $caption, $upload_id );
- list($size) = getimagesize( $video );
- $post = json_encode( array(
- 'upload_id' => $upload_id,
- 'source_type' => '3',
- 'poster_frame_index' => 0,
- 'length' => 0,
- 'audio_muted' => false,
- 'filter_type' => '0',
- 'video_result' => 'deprecated',
- 'clips' => array(
- 'length' => Utils::getSeconds( $video ),
- 'source_type' => '3',
- 'camera_position' => 'back'
- ),
- 'extra' => array(
- 'source_width' => 960,
- 'source_height' => 1280
- ),
- 'device' => array(
- 'manufacturer' => 'Xiaomi',
- ...............................................................
- ...................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement