AvocadoAmber/AvocadoEdition_Light/bbs/sns_send.php

23 lines
659 B
PHP
Raw Normal View History

2022-09-17 20:50:50 +09:00
<?php
2024-09-23 11:07:19 +09:00
include_once "./_common.php";
2022-09-17 20:50:50 +09:00
2024-09-19 20:57:39 +09:00
$title = urlencode(str_replace('\"', '"', $_REQUEST['title']));
2022-09-17 20:50:50 +09:00
$short_url = googl_short_url($_REQUEST['longurl']);
2024-09-19 20:57:39 +09:00
if (!$short_url)
$short_url = urlencode($_REQUEST['longurl']);
$title_url = $title . ' : ' . $short_url;
2022-09-17 20:50:50 +09:00
2024-09-19 20:57:39 +09:00
switch ($_REQUEST['sns']) {
case 'facebook':
header("Location:http://www.facebook.com/sharer/sharer.php?s=100&u=" . $short_url . "&p=" . $title);
break;
case 'twitter':
header("Location:https://twitter.com/intent/tweet?text=" . $title_url);
break;
case 'gplus':
header("Location:https://plus.google.com/share?url=" . $short_url);
break;
default:
echo 'Error';
2022-09-17 20:50:50 +09:00
}