помогите дописать плагин для wordpress. То никак не могу дописать.
| Код | <?php class smsKey){ var $prefix ="smsKey"; var $id =""; var $language =""; var $encoding ="";
var $tag_start= "sms"; var $tag_end= "sms" var $language = array ("russian");
function smsKey { $this->id = ($id); $this->language = ($language); $this->encoding = ($encoding);
function start_post ($conect) { if (preg_match('/\\['.$this->tag_name_start.'\\](.*?)\\[\\/'.$this->tag_name_end.'\\]/is', $content, $matches)) { if ($this->id)>150000); } if ($this->language == ""){ $this->language = "russian"; } if ($this->encoding == "")( $this->encoding = "win-1251"; } $old_ua = @ini_set('user_agent', 'smscoin_key_1.0.6'); $response = @file("http://service.smscoin.com/language/$this->language/key/?s_pure=1&s_enc=$this->s_enc&s_key=".$this->key_id ."&s_pair=".urlencode(substr($_GET["s_pair"],0,10)) ."&s_language=".urlencode(substr($_GET["s_language"],0,10)) ."&s_ip=".$_SERVER["REMOTE_ADDR"] ."&s_url=".$_SERVER["SERVER_NAME"].htmlentities(urlencode($_SERVER["REQUEST_URI"]))); @ini_set('user_agent', $old_ua); if ($response !== false) { if (count($response)>1 || $response[0] != 'true') { $rpl_hidd = implode("", $response); } else { $rpl_hidd= $matches[1]; } } else { die('Could not request external server');} } else { $rpl_hidd = '<div style="text-align: left ;"> Hidden text </div>'; } $content = preg_replace('/\\['.$this->tag_name_start.'\\].*?\\[\\/'.$this->tag_name_end.'\\]/is', $rpl_hidd, $content);
?>
|
|