»[Back]

WriteType:PHP

BrognPlusにタグを埋め込むサンプル(※'usr/home/mogplus/'は環境により置き換えてください)

「index.php」のblogn_get_skin_php($blogn_skin);〜exit;の間に入れて下さい。
//Mogura 解析-------------------
define('MOGURA_PATH','usr/home/mogplus/');
require_once( constant('MOGURA_PATH')."inc/config.php" );
$ttl = array();
$gettitle = null;
$enchtml = @mb_convert_encoding($blogn_skin, constant('W3A_TO_ENCODING'), constant('W3A_FROM_ENCODING'));
preg_match("/<title[^>]*>([^<]*)<\/title>/i",$enchtml,$ttl);
if(isset($ttl[1])) $gettitle = preg_replace( "/\{EMOJI:[0-9]+\}/", "" ,$ttl[1]);
$_GET["send_title"] = urlencode($gettitle);
$mogref = null;
if(isset($_SERVER['HTTP_REFERER'])) $mogref = urlencode($_SERVER['HTTP_REFERER']);
$mogref = str_replace ('%', '_P_', $mogref);
$httph = isset($_SERVER['HTTPS']) ? 'https://' : 'http://';
$httpd = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
$httpp = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'];
$mogpath = urlencode($httph.$httpd.$httpp);
$mogpath = str_replace ("%", "_P_", $mogpath);
$_GET['path'] = $mogpath;
$_GET['ref'] = $mogref;
include_once(constant("MOGURA_PATH").'w.php');
unset($ttl,$enchtml,$_GET["send_title"],$_GET["path"],$_GET["ref"]);
//Mogura 解析-------------------

補足

「PHP_WRITE_MODE=0」のみです。

DoCoMoのユーザー追跡をしたい場合はURLにguid=ONを付ける必要があります。