56短信网致力于为您提供专业的短信接口服务,以下是shopnc短信接口修改的核心(sms.model.php),相对于其它的系统,可能有些复杂,如果您在接入中遇到问题请及时联系我们技术人员,如果您不会修改或调试,可以联系我们技术人员帮您来调试。
private function _post($url, $limit = 0, $post = '', $cookie = '', $ip = '', $timeout = 20, $block = true) {
$return = '';
$url=str_replace('&','&',$url);
$matches = parse_url($url);
$host = $matches['host'];
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/';
$port = !empty($matches['port']) ? $matches['port'] : 80;
$siteurl = $this->_get_url();
if($post) {
} else {
}
$fp = @fsockopen(($ip ? $ip : $host), $port, $errno, $errstr, $timeout);
if(!$fp) return '';
stream_set_blocking($fp, $block);
stream_set_timeout($fp, $timeout);
@fwrite($fp, $out);
$status = stream_get_meta_data($fp);
if($status['timed_out']) return '';
while (!feof($fp)) {
if(($header = @fgets($fp)) && ($header == "\r\n" || $header == "\n")) break; &nbs