admin管理员组

文章数量:1536373

2024年6月19日发(作者:)

最近很多人问我怎么平台源码问题,下

面我就出个回拨电话的教程,这个是最

简单的平台。我们用最简单的方法搭建

平台。

我们要准备搭建平台的东西。

1.空间一个,论坛的免费空间很多啊。

没有的可以去注册个。

2.准备个上传空间的工具.CuteFTP 8

Professional 可以把这名字复制到百

度下载个。

我们只要这2个就可以了。

现在我们开始

第一步,我们复制下面的源码

< ?php

header("Content-Type:text/html;charset=utf-8");

>

< html>

< head>

< meta name="viewport" content="width=device-width, minimum-scale=1.0,

maximum-scale=2.0"/>

< meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

< title>在线免费电话

< style type="text/css">

body{

background-color: #fff;

font-size: 12px;

padding:0;

margin: auto;

}

.title{

border-bottom: 1px solid blue;

background-color: 333;

color: #fff;

height: 20px;

line-height: 20px;

padding-left: 5px;

}

.footer{

background-color: #ddd;

text-align: center;

color: #3D464E;

padding-top: 20px;

padding-bottom: 10px;

border-bottom: 1px solid #123;

border-top: 1px solid #eee;

}

.copyright{

background-color: #ddd;

text-align: right;

color: #326545;

}

.content{

padding-left: 5px;

padding-top: 2px;

}

.red{

height: 20px;

line-height: 20px;

background-color: red;

color: #fff;

padding-left: 5px;

}

.green{

height: 20px;

line-height: 20px;

background-color: green;

color: #fff;

padding-left: 5px;

}

.button{

border-top:0;

border-left:0;

border-bottom: 1px solid #000;

border-right: 1px solid #000;

padding: 2px 5px 2px 5px;

cursor: pointer;

}

.button:hover{

background-color: #ddd;

}

.button:active{

background-color: #999;

border-top:1px solid #fff;

border-left:1px solid #fff;

border-bottom: 0px solid #ddd;

border-right: 0px solid #ddd;

}

< /style>

< /head>

< body>

$act = isset($_GET['act'])?$_GET['act']:null;

if($act=='call'){

$calls =

(isset($_POST['callphone'])&&is_numeric($_POST['callphone']))?$_POST['callphone

']:null;

$mys =

(isset($_POST['myphone'])&&is_numeric($_POST['myphone']))?$_POST['myphone']:nul

l;

if($calls && $mys){

if(function_exists('socket_create')){

$result = json_decode(call($calls,$mys));

}elseif(function_exists('fsockopen')){

$result = json_decode(call2($calls,$mys));

}else{

$result = json_decode(call3($calls,$mys));

}

if($result->status){

echo '

'.$result->msg.'
';

}else{

echo '

'.$result->msg.'
';

}

}else{

if($calls==""){

$msg="请填写主叫号码!";

}elseif($mys==""){

$msg="请填被叫号码!";

}

echo '

'.$msg.'
';

}

}

>

< div class="title">在线免费电话