Php ile instagram video indirici nasıl yapılır? Turkish Tutorial

in #utopian-io7 years ago (edited)

## ENGLISH

<p dir="auto">Hello guys my name is Sinan Karayaman. I have been working on wordpress and other web services for few years now.Now lets begin how to create instagram video indirici step by step. <ul> <li>How to create instagram video indirici? <p dir="auto"><strong>## TÜRKÇE <p dir="auto">Merhaba arkadaşlar ben Sinan Karayaman.Bugün sizlere php ile instagram video indirici nasıl oluşturulur onu anlatacağım. <pre><code><?php /* Sinan Karayaman */ require('Fonksiyonlar.php'); ?> <!DOCTYPE html> <html> <head> <title>instagram video downloader</title> <style type="text/css"> *{ font-family: arial; } </style> </head> <body> <div> <center><h2>Instagram Video Downloader</h2></center> <form action="" method="POST" style="width: 500px; margin: auto;"> <input type="text" name="VideoUrl" style="padding: 10px; width: 450px; border-radius: 3px; border: 1px solid #ddd;" placeholder="Video URL" /><br /> <input type="submit" value="Save Video" style="padding: 10px; width: 470px; border-radius: 3px; border: 1px solid #ddd; background-color: #f6f6f6; margin-top: 10px;" /> </form> </div> <?php if(isset($_POST['VideoUrl'])){ $Url = $_POST['VideoUrl']; $Source = Connect($Url); $Video = preg_match('@video" content="(.*?)"@', $Source, $Video)?end($Video):false; if($Video){ $VideoName = 'videos/'.uniqid().'.mp4'; $VideoSource = Connect($Video); if(file_put_contents($VideoName, $VideoSource)){ echo '<center><h2>Video Saved</h2></center>'; echo '<center><video width="500" controls> <source src="'.$VideoName.'" type="video/mp4"> </video></center>'; } }else{ echo '<center><h2>Video Not Found or Private</h2></center>'; } } ?> </body> </html> <p dir="auto">Html form etiketiyle video url bilgisini çekip, aynı sayfa içerisine post ediyoruz.Methodu isterseniz get olarakta yollayabilirsiniz, bu tamamen sizin tercihinize kalmış.Ben postu tercih ettim. <p dir="auto"><img src="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760649/jl4t36qqslcu6yuhve6v.png" alt="1.png" srcset="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760649/jl4t36qqslcu6yuhve6v.png 1x, https://images.hive.blog/1536x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760649/jl4t36qqslcu6yuhve6v.png 2x" /> <p dir="auto">Kendimize bağlantı için bir curl fonksiyonu oluşturuyoruz, bu kısımda isterseniz 'file_get_contents' fonksiyonunu kullanabilirsiniz.Bizim curl fonksiyonunu tercih etme sebebimiz 'file_get_contents' e göre daha seri ve daha fonksiyonel olmasıdır. <p dir="auto"><img src="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760665/cffy8wddp2dnhfg0jb81.png" alt="fonksiyonlar.png" srcset="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760665/cffy8wddp2dnhfg0jb81.png 1x, https://images.hive.blog/1536x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760665/cffy8wddp2dnhfg0jb81.png 2x" /> <p dir="auto">*36. satırda kullandığımız <a href="http://php.net/manual/tr/function.isset.php" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">isset fonksiyonu ile post edilip edilmediğini kontrol ediyoruz.Eğer post edildiyse 'true' post edilmediyse 'false' olarak değer döndürür.<br /> *38. satırda kullandığımız 'Connect' fonksiyonumuz ile post ile gelen urlye bağlanıp gelen değeri '$Source' değişkenine atıyoruz.<br /> *39. satırda kullandığımız 'preg_match' fonksiyonu ile kaynak kodda bulunan mp4 adresini alıyoruz ve video değişkenine atıyoruz.<br /> *40. satırda eğer video urlsi bulunduysa işleme devam ediyor, eğer video url bulunmadıysa 50. satırda bulunan 'else' bloğuna düşer.<br /> *41. satırda 'uniqid' ile video adı oluşturuyoruz.<br /> *42. satırda ise 39. satırdan aldığımız videonun kaynağını alıyoruz.<br /> *43. satırda kullandığımız 'file_put_contents' fonksiyonu ile aldığımız kaynağı klasöre indiriyoruz.<br /> *44. 45. 46. 47. satırda sonuçları 'echo' ile ekrana basıyoruz. <p dir="auto"><img src="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760669/hksorca8w0ai6j8whtxt.png" alt="2.png" srcset="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760669/hksorca8w0ai6j8whtxt.png 1x, https://images.hive.blog/1536x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513760669/hksorca8w0ai6j8whtxt.png 2x" /> <p dir="auto">Yazdığımız instagram video indirici ekran görüntüsü : <p dir="auto"><img src="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513761756/e8gobwdn45zlon0nfwbp.png" alt="sonuç.png" srcset="https://images.hive.blog/768x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513761756/e8gobwdn45zlon0nfwbp.png 1x, https://images.hive.blog/1536x0/https://res.cloudinary.com/hpiynhbhq/image/upload/v1513761756/e8gobwdn45zlon0nfwbp.png 2x" /> <p dir="auto"><span>GitHub Linki : <a href="https://github.com/php/php-src" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://github.com/php/php-src
Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @sinankarayaman I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x