shortener.php 916 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. /*
  3. This is an example file of how you can utilise http://qttr.at/yourls-api.php URL shortener service from a GNUSocial instance, which is using https.
  4. If you run the qvitter code «as is» the browser will stop you from communicate to qttr.at which is currently running http protocol.
  5. This «proxy» return the result from http://qttr.at/yourls-api.php
  6. 1) Install this file on your website eg. : https://myinstance.net/shortener.php
  7. 2) Change the following in QvitterPlugin.php - settings() function
  8. $settings['urlshortenerapiurl'] = 'https://yoursite.net/shortener.php';
  9. 3) Test it
  10. Contact Knut Erik if you have any questions related to this .php file.
  11. Quitter.no => knuthollund@quitter.no
  12. GitHub: => https://github.com/fxdwg
  13. */
  14. $query = $_SERVER['QUERY_STRING'];
  15. if(strlen($query)>0) {
  16. $shortenerUrl = 'http://qttr.at/yourls-api.php?' . $query;
  17. print file_get_contents($shortenerUrl);
  18. }
  19. ?>