本文整理汇总了PHP中dfopen函数的典型用法代码示例。如果您正苦于以下问题:PHP dfopen函数的具体用法?PHP dfopen怎么用?PHP dfopen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dfopen函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wqueue
function wqueue()
{
$do = $this->Get['do'];
if ($do == 'run') {
if ($this->Config['wqueue_enabled']) {
$url = 'http:/' . '/' . $this->Config['wqueue']['host'] . '/?name=' . $this->Config['wqueue']['name'] . '&opt=get&auth=' . $this->Config['wqueue']['auth'];
while (true) {
$r = dfopen($url);
if (!in_array($r, array('HTTPSQS_GET_END', 'HTTPSQS_ERROR'))) {
$data = unserialize(base64_decode($r));
$data['datas']['content'] = base64_decode($data['datas']['content']);
$r = jlogic('topic')->Add($data['datas'], $data['totid'], $data['imageid'], $data['attachid'], $data['from'], $data['type'], $data['uid'], $data['item'], $data['item_id'], true);
if (DEBUG) {
if (is_array($r) && $r['tid']) {
echo 'publish success' . "\n";
} else {
echo var_export($r, true) . "\n";
}
ob_flush();
}
} else {
sleep(1);
}
}
} else {
exit('weibo.queue.close');
}
} else {
exit('weibo.action.no');
}
}
示例2: tpl_function_qishi_get_salary_data_salary_pie
function tpl_function_qishi_get_salary_data_salary_pie($params, &$smarty)
{
global $db, $_CFG;
$arr = explode(',', $params['set']);
foreach ($arr as $str) {
$a = explode(':', $str);
switch ($a[0]) {
case "调用名称":
$aset['alias'] = $a[1];
break;
case "列表名":
$aset['listname'] = $a[1];
break;
case "地区":
$aset['district'] = $a[1];
break;
case "职位":
$aset['category'] = $a[1];
break;
}
}
$filename = urlencode($aset['district'] . '_' . $aset['category']) . '_salary_pie.cache';
$result = check_cache($filename, 'salary', 7);
if (!$result) {
$result = dfopen("http://www.74cms.com/salary/get_salary_data_salary_pie.php?district=" . $aset['district'] . "&category=" . $aset['category'] . "&certification=" . $_SERVER['SERVER_NAME']);
write_cache($filename, $result, 'salary');
}
$smarty->assign($aset['listname'], $result);
}
示例3: status_ajax
public function status_ajax()
{
$this->CheckAdminPrivs('wips','ajax');
if (ini('wips.sql.enabled'))
{
$string = 'WIPS已开启';
if (ini('wips.sql.autoups') == 'true')
{
$lastc = fcache('wips.sql.rule.sync', 86400);
if ($lastc)
{
}
else
{
$server = base64_decode('aHR0cDovL3NxbC50dHR1YW5nb3UubmV0L3dpcHMvdXBkYXRlLnBocA==');
$r = dfopen($server, 10485760, '', '', true, 10, 'CENWOR.TTTG.WIPS.SYNC.AGENT.'.SYS_VERSION.'.'.SYS_BUILD);
if ($r)
{
$data = (array)json_decode($r, true);
if (isset($data['hash']) && $data['hash'])
{
foreach ($data['rules'] as $rk => $rv)
{
if (substr($rk, 0, -4) == '.md5')
{
continue;
}
if (md5($rv) == $data['rules'][$rk.'.md5'])
{
if (ini('wips.sql.'.$rk) != $rv)
{
ini('wips.sql.'.$rk, $rv);
$updated = true;
}
}
}
}
}
fcache('wips.sql.rule.sync', 'lastCheck @ '.date('Y-m-d H:i:s', time()));
if ($updated)
{
$string = 'WIPS自动升级完成';
}
}
}
}
else
{
$string = 'WIPS未开启,有风险';
}
exit('<a href="admin.php?mod=wips">'.$string.'</a>');
}
示例4: request
function request($url)
{
if (strpos($url, ':/' . '/') === false) {
$url = $GLOBALS['_J']['site_url'] . '/' . $url;
}
if (!$_SERVER['HTTP_USER_AGENT'] || !$_COOKIE || 'remote_script' == get_param('request_from')) {
dfopen($url, -1, $post, $cookie, true, 3);
@usleep(rand(10000, 100000));
} else {
$GLOBALS['iframe'] .= "<iframe src='{$url}' border=0 width=0 height=0></iframe>";
}
}
示例5: request
function request($url)
{
$config=&Obj::registry('config');
if(strpos($url,':/'.'/')===false) {
$url=$config['site_url'].'/'.$url;
}
if ((defined('ROBOT_NAME') && false!==ROBOT_NAME) || ('remote_script' == $_REQUEST['request_from']) || (!$_SERVER['HTTP_USER_AGENT']) || (!$_COOKIE)) {
@dfopen($url,-1,$post,$cookie,true,3);
@usleep(rand(10000,100000)); } else {
$GLOBALS['iframe'] .="<iframe src='{$url}' border=0 width=0 height=0></iframe>";
}
}
示例6: sms_remain
function sms_remain()
{
$sms = ConfigHandler::get('sms');
$sms['server'] = sms_server_init();
$data = 'name='.$sms['account'].'&password='.md5($sms['password']);
$result = dfopen($sms['server'].'?method=remaincount&'.$data, 10485760, '', '', true);
$result = iconv('GB2312', 'UTF-8/'.'/IGNORE', $result);
preg_match('/<describe>(.*?)<\/describe>/', $result, $match);
$status = $match[1];
preg_match('/<count>(.*?)<\/count>/', $result, $match);
$remain = (int)$match[1]/10;
if ($match[0] == '')
{
preg_match('/<message>(.*?)<\/message>/', $result, $match);
$remain = $match[1];
}
return array('status'=>$status, 'remain'=>$remain);
}
示例7: qmd_list
function qmd_list($uid = 0, $pic_path = '')
{
$uid = is_numeric($uid) ? $uid : 0;
if ($GLOBALS['_J']['config']['is_qmd']) {
$TopicLogic = jlogic('topic');
$condition = " where `type` = 'first' and `uid`='{$uid}' order by `dateline` desc limit 1 ";
$topic_list = $TopicLogic->Get($condition);
if ($topic_list) {
foreach ($topic_list as $v) {
$topic = $v;
}
} else {
return false;
}
$temp_face = true === UCENTER_FACE && true === UCENTER ? $topic['face_small'] : $topic['face_original'];
if (false === strpos($temp_face, ':/' . '/')) {
$member_face = $temp_face;
} else {
$field = 'temp_face';
$image_path = RELATIVE_ROOT_PATH . './data/cache/' . $field . '/' . face_path($topic['uid']);
$image_file_small = $image_path . $topic['uid'] . "_s.jpg";
if (!file_exists($image_file_small)) {
if (!is_dir($image_path)) {
jio()->MakeDir($image_path);
}
$temp_image = dfopen($temp_face, 999999, '', '', true, 5, $_SERVER['HTTP_USER_AGENT']);
if ($temp_image) {
jio()->WriteFile($image_file_small, $temp_image);
}
if (!is_image($image_file_small)) {
@copy(ROOT_PATH . 'images/noavatar.gif', $image_file_small);
}
}
$member_face = $image_file_small;
}
$content = strip_tags($topic['content']);
$content = str_replace(array("\r\n", "\n", "\r", "\t", " "), ' ', $content);
$content = cut_str($content, 74);
$qmd_data = array('uid' => $topic['uid'], 'nickname' => $topic['nickname'], 'validate' => $topic['validate'], 'face' => $member_face, 'content' => $content, 'dateline' => date('m月d日 H:i', $topic['addtime']));
$qmd_list = $this->qmd_img_list($pic_path, $qmd_data);
return $qmd_list;
}
return false;
}
示例8: __request
/**
* 作者:狐狸<foxis@qq.com>
* 功能描述:request 相关
* @version $Id: request.func.php 5114 2013-11-27 07:06:10Z wuliyong $
*/
function __request($action, $post = array(), &$error)
{
settype($post, "array");
$post['system_env'] = $post['system_env'] ? array_merge((array) $post['system_env'], (array) get_system_env()) : (array) get_system_env();
$aclData = upsCtrl()->Account();
$post['__acl__']['account'] = $aclData['account'];
$post['__acl__']['token'] = $aclData['token'];
$data = '_POST=' . urlencode(base64_encode(serialize($post)));
$config = jconf::get();
$charset = strtolower(str_replace('-', '', $config['charset']));
$version = urlencode(SYS_VERSION);
$pid = 2;
#if NEDU
if (defined('NEDU_MOYO')) {
$pid = 3;
}
#endif
$server_url = base64_decode('aHR0cDovL3VwZGF0ZS5jZW53b3IuY29tL3NlcnZlci5yZXF1ZXN0LnBocA==') . "?do={$action}&pid={$pid}&charset={$charset}&iver={$version}";
$response = dfopen($server_url, 5000000, $data);
$error_msg = array(1 => "error_nodata", 2 => "error_format");
if ($response == "") {
$result = $error_msg[$error = 1];
} else {
$int = preg_match("/<DATA>(.*)<\\/DATA>/s", $response, $m);
if ($int < 1) {
$result = $error_msg[$error = 2];
} else {
if (false !== strpos($m[1], "\n")) {
$m[1] = preg_replace('~\\s+\\w{1,10}\\s+~', '', $m[1]);
}
$response = unserialize(base64_decode($m[1]));
$result = $response['data'];
if ($response['type']) {
$error = 3;
}
}
}
return $result;
}
示例9: SMS_ServerTest_connector
private function SMS_ServerTest_connector($url)
{
if (!$url) return false;
$html = dfopen($url, 10485760, '', '', true, 10, 'CENWOR.TTTG.SMS.AGENT.'.SYS_VERSION.'.'.SYS_BUILD);
if ($html)
{
return true;
}
else
{
return false;
}
}
示例10: dfopen
}
include_once ROOT_PATH . './uc_client/client.php';
$ucinfo = dfopen($ucapi . '/index.php?m=app&a=ucinfo&release=' . UC_CLIENT_RELEASE, 500, '', '', 1, $ucip);
list($status, $ucversion, $ucrelease, $uccharset, $ucdbcharset, $apptypes) = explode('|', $ucinfo);
if ($status != 'UC_STATUS_OK') {
show_msg('uc_url_unreachable', $ucapi, 0);
} else {
$dbcharset = strtolower($dbcharset ? str_replace('-', '', $dbcharset) : $dbcharset);
$ucdbcharset = strtolower($ucdbcharset ? str_replace('-', '', $ucdbcharset) : $ucdbcharset);
if (UC_CLIENT_VERSION > $ucversion) {
show_msg('uc_version_incorrect', $ucversion, 0);
} elseif ($dbcharset && $ucdbcharset != $dbcharset) {
show_msg('uc_dbcharset_incorrect', '', 0);
}
$postdata = "m=app&a=add&ucfounder=&ucfounderpw=" . urlencode($ucpw) . "&apptype=" . urlencode($app_type) . "&appname=" . urlencode($app_name) . "&appurl=" . urlencode($app_url) . "&appip=&appcharset=" . CHARSET . '&appdbcharset=' . DBCHARSET . '&' . $app_tagtemplates . '&release=' . UC_CLIENT_RELEASE;
$ucconfig = dfopen($ucapi . '/index.php', 500, $postdata, '', 1, $ucip);
if (empty($ucconfig)) {
show_msg('uc_api_add_app_error', $ucapi, 0);
} elseif ($ucconfig == '-1') {
show_msg('uc_admin_invalid', '', 0);
} else {
list($appauthkey, $appid) = explode('|', $ucconfig);
$ucconfig_array = explode('|', $ucconfig);
$ucconfig_array[] = $ucapi;
$ucconfig_array[] = $ucip;
if (empty($appauthkey) || empty($appid)) {
show_msg('uc_data_invalid', '', 0);
} elseif ($succeed = save_uc_config($ucconfig_array, ROOT_PATH . CONFIG_UC)) {
if (VIEW_OFF) {
show_msg('app_reg_success');
} else {
示例11: intval
$addarr['mobile'] = $mobile;
$addarr['personal_uid'] = intval($_SESSION['uid']);
$addarr['course_id'] = $course['id'];
$addarr['course_name'] = $course['course_name'];
$addarr['train_id'] = $course['train_id'];
$addarr['train_name'] = $course['trainname'];
$addarr['train_uid'] = $course['uid'];
$addarr['notes'] = $notes;
if (strcasecmp(QISHI_DBCHARSET, "utf8") != 0) {
$addarr['notes'] = utf8_to_gbk($addarr['notes']);
$addarr['realname'] = utf8_to_gbk($addarr['realname']);
$addarr['mobile'] = utf8_to_gbk($addarr['mobile']);
}
$addarr['apply_addtime'] = time();
$addarr['personal_look'] = 1;
if ($db->inserttable(table('personal_course_apply'), $addarr)) {
$mailconfig = get_cache('mailconfig');
$course['contact'] = $db->getone("select notify from " . table('course_contact') . " where pid='{$course['id']}' LIMIT 1 ");
$sms = get_cache('sms_config');
$trainuser = get_user_info($course['uid']);
if ($mailconfig['set_applycou'] == '1' && $trainuser['email_audit'] == '1' && $course['contact']['notify'] == '1') {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_applycou&course_id={$course['id']}&coursename={$course['course_name']}&personal_fullname={$realname}&email={$trainuser['email']}");
}
//sms
if ($sms['open'] == "1" && $sms['set_applycou'] == "1" && $trainuser['mobile_audit'] == "1") {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_applycou&course_id={$course['id']}&coursename={$course['course_name']}&personal_fullname={$realname}&mobile={$trainuser['mobile']}");
}
write_memberslog($_SESSION['uid'], 2, s, $_SESSION['username'], "申请课程,课程:{$course['course_name']}");
}
exit("ok");
}
示例12: ETS_iServer
function ETS_iServer($action = 'check')
{
$server = base64_decode('aHR0cDovL3NlcnZlci50dHR1YW5nb3UubmV0L3Byb2Nlc3Nvci9ldHMvdXBkYXRlLnBocA==').'?charset='.ini('settings.charset').'&';
return dfopen($server.'do='.$action, 10485760, '', '', true, 10, 'CENWOR.TTTG.ETS.UPC.AGENT.'.SYS_VERSION.'.'.SYS_BUILD);
}
示例13: edit_password
}
$info = edit_password($arr);
if ($info == -1) {
showmsg('旧密码输入错误,请重新输入!', 1);
}
if ($info == $_SESSION['username']) {
//sendemail
$mailconfig = get_cache('mailconfig');
if ($mailconfig['set_editpwd'] == "1" && $user['email_audit'] == "1") {
dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_mail.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_editpwd&newpassword={$arr['password']}");
}
//sendemail
//sms
$sms = get_cache('sms_config');
if ($sms['open'] == "1" && $sms['set_editpwd'] == "1" && $user['mobile_audit'] == "1") {
dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_editpwd&newpassword={$arr['password']}");
}
//sms
if (defined('UC_API')) {
include_once QISHI_ROOT_PATH . 'uc_client/client.php';
uc_user_edit($arr['username'], $arr['oldpassword'], $arr['password']);
}
showmsg('密码修改成功!', 2);
}
} elseif ($act == 'save_username') {
require_once QISHI_ROOT_PATH . 'include/fun_user.php';
$arr['uid'] = $_SESSION['uid'];
$_POST['newusername'] = utf8_to_gbk($_POST['newusername']);
$arr['newusername'] = trim($_POST['newusername']) ? trim($_POST['newusername']) : showmsg('新用户名!', 1);
$row_newname = $db->getone("SELECT * FROM " . table('members') . " WHERE username='{$arr['newusername']}' LIMIT 1");
if ($row_newname) {
示例14: write_memberslog
write_memberslog($_SESSION['uid'], 1, 6001, $_SESSION['username'], "邀请 {$resume_user['username']} 面试");
}
}
/*
发送短信提示 操作
*/
$sms = get_cache('sms_config');
if ($sms['open'] == "1" && $sms['set_invite'] == "1" && $sms_notice == "1") {
$user = get_user_info($_SESSION['uid']);
if ($_CFG['company_sms'] == 1 && $user['sms_num'] > 0) {
$success = dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_invite&companyname={$jobs['companyname']}&mobile={$resume['telephone']}");
if ($success == "success") {
reduce_user_sms($_SESSION['uid']);
}
} else {
dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid={$_SESSION['uid']}&key=" . asyn_userkey($_SESSION['uid']) . "&act=set_invite&companyname={$jobs['companyname']}&mobile={$resume['telephone']}");
}
}
//站内信
if ($pms_notice == '1') {
$jobs_url = url_rewrite('QS_jobsshow', array('id' => $jobs['id']));
$company_url = url_rewrite('QS_companyshow', array('id' => $jobs['company_id']), false);
$message = $jobs['companyname'] . "邀请您参加公司面试,面试职位:<a href=\"{$jobs_url}\" target=\"_blank\"> {$jobs['jobs_name']} </a>,<a href=\"{$company_url}\" target=\"_blank\">点击查看公司详情</a>";
write_pmsnotice($resume['uid'], $resume_user['username'], $message);
}
//微信
set_invite($resume['uid'], $jobs['id'], $jobs['companyname'], $jobs['jobs_name'], $jobs['contact']['address'], $jobs['contact']['contact'], $jobs['contact']['telephone'], $notes);
$html = '<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tableall" id="invited_ok">
<tr>
<td width="140" align="right"><img height="100" src="' . $_CFG['site_template'] . 'images/big-yes.png" /></td>
<td>
示例15: elseif
}
$str .= '</select>';
showmessage($str);
} else {
showmessage("$language[uch_noalbum]<a href=\"$uchomeurl/cp.php?ac=upload\" target=\"_blank\">$language[click_here]</a>$language[uch_createalbum]");
}
} elseif($action == 'getphotoes' && $discuz_uid && $aid) {
$page = max(1, intval($page));
$perpage = 8;
$start = ($page - 1) * $perpage;
$aid = intval($aid);
$photonum = intval($photonum);
$photoes = @unserialize(dfopen("$uchomeurl/api/discuz.php?ac=album&uid=$discuz_uid&start=$start&count=$photonum&perpage=$perpage&aid=$aid"));
if($photoes && is_array($photoes)) {
$i = 0;
$str = '<table cellspacing="2" cellpadding="2" class="imglist"><tr>';
foreach($photoes as $photo) {
if($i++ == $perpage) {
break;
}
$picurl = substr(strtolower($photo['bigpic']), 0, 7) == 'http://' ? '' : $uchomeurl.'/';
$str .= '<td valign="bottom" width="25%"><a href="javascript:;"><img src="'.$picurl.$photo['pic'].'" title="'.$photo['filename'].'" onclick="wysiwyg ? insertText(\'<img src='.$picurl.$photo[bigpic].' border=0 /> \', false) : insertText(\'[img]'.$picurl.$photo[bigpic].'[/img]\');" onload="thumbImg(this, 1)" _width="110" _height="110"></a></td>'.
($i % 4 == 0 && isset($photoes[$i]) ? '</tr><tr>' : '');
}
$str .= '</tr></table>'.multi($photonum, $perpage, $start / $perpage + 1, "api/uchome.php?action=getphotoes&aid=$aid&photonum=$photonum");
showmessage($str);
} else {