I also created a test.php, located at mydomain.com/test/test.php for testing purposes with this line <?php print function drapps_shortlinks_createlink($url, TRUE, FALSE); ?>
and changedEDIT: This function is called in Drupal's node-news.tpl.php inserting the same line in a div (also for testing purposes)like this:
...
<div class="test"><?php print drapps_shortlinks_createlink($url, TRUE, FALSE); ?></div>
...
test.
Whenphp
<?php
$path = "path/to/drupal"; //changed for security reasons
include_once($path . 'sites/all/modules/drapps_shortlinks/drapps_shortlinks.inc');
$url = 'http://www.google.com/';
print drapps_shortlinks_createlink($url, TRUE, FALSE);
?>
When I go to http://www.mydomain.com/test/test.php, the script works fine and I get an 'ok' response from google; a short link is created and it works fine. When I navigate to a news node, the script runs OK, but Google responds with a 403 (forbidden) error.