[CGIv2] Instagram Photo Real Link Resolver

From NAT, 7 Years ago, written in Bash, viewed 1'236 times. This paste is a reply to [CGI] Instagram Photo Real Link Resolver from NAT - go back
URL https://code.nat.moe/view/9c3c741b/diff Embed
Viewing differences between [CGI] Instagram Photo Real Link Resolver and [CGIv2] Instagram Photo Real Link Resolver
#!/bin/bash
# A really simple CGI to resolve Instagram photo share link and show original photo.
# Use fcgi_param to set env QUERY_STRING. You might use fcgi.conf from php5-fpm, it will works.
# License under DO WHAT FUCK YOU WANT ( DWFYW )
echo "Content-type: text/html";echo "";
echo "<p>You can get original photo of Instagram posts by using this tool.</p>"
echo "<p>Usage: Input Sahre URL(i.e. http://instagram.com/p/rtTL1VQVZt/) and click Get Photo."
echo "<hr>"
if [ ! -z $QUERY_STRING ]
then
QUERY_STRING=$(echo $QUERY_STRING | awk -F "%2Fp%2F" '{print $2}' | awk -F "&" '{print $1}' | awk -F "%2F" '{print $1}')
echo -n "<img src=";curl --silent $QUERY_STRING http://instagram.com/p/$QUERY_STRING | grep .jpg | awk '{print $3}' 
$3}' | awk -F "\"" '{print $2}';echo "></img>""></img>"
fi
echo "<form action='' method='get'>Share URL: <input name='url' type='text'></input><input name='submit' type='submit' value='Get Photo'></input></form>"

Replies to [CGIv2] Instagram Photo Real Link Resolver rss

Title Name Language When
Re: [CGIv2] Instagram Photo Real Link Resolver chs_starterpacks_ bash 5 Years ago.
[CGIv3] Instagram Photo Real Link Resolver Coreos bash 7 Years ago.

Reply to "[CGIv2] Instagram Photo Real Link Resolver"

Here you can reply to the paste above

captcha