ホームページ バックエンド開発 PHPチュートリアル PHPクエリのWebサイト認証を削除する方法はありますか?

PHPクエリのWebサイト認証を削除する方法はありますか?

Jun 23, 2016 pm 01:01 PM

ソース コードに外部リンクがあると、秘密の部屋の透明な窓のようにいつも不快に感じます。このソース コードの使用に影響を与えずに、クエリ Web サイトによって許可されている外部リンクを削除する方法はありますか?
ソースコードの機能: $oauth2_code="http://***.***.com/app/index.php?i=2&j=7&c=entry&do=authorize&m=stonefish_authorize&modules=stonefish_fighting&weburl=".$_SERVER ['HTTP_HOST ' ]."&visitorsip= . $_W['clientip'];

<?phpdefined('IN_IA')or exit('Access Denied');class Stonefish_fightingModule extends WeModule {	public function fieldsFormDisplay($rid =0)	{		global $_W;		load()->func('tpl');		$uniacid =$_W['uniacid'];		$setting =$this->module['config'];		if(empty($setting))		{			message('抱歉,系统参数没有填写,请先填写系统参数!', url('profile/module/setting',array('m' => 'stonefish_fighting')), 'error');		}		$modules =uni_modules($enabledOnly =true);		$modules_arr =array();		$modules_arr =array_reduce($modules, create_function('$v,$w', '$v[$w["mid"]]=$w["name"];return $v;'));		if(in_array('stonefish_member',$modules_arr))		{			$stonefish_member =true;		}		if(in_array('stonefish_bigwheel',$modules_arr))		{			$stonefish_bigwheel =true;		}		if(in_array('stonefish_scratch',$modules_arr))		{			$stonefish_scratch =true;		}		if($stonefish_bigwheel)		{			$bigwheelitems =pdo_fetchall("SELECT rid,title FROM " . tablename('stonefish_bigwheel_reply'). " WHERE uniacid = '{$_W['uniacid']}		' and opportunity=3  and starttime<=:time and endtime>:time ORDER BY id DESC", array(':time'=>time()), 'id');	}	if($stonefish_scratch)	{		$scratchitems =pdo_fetchall("SELECT rid,title FROM " . tablename('stonefish_scratch_reply'). " WHERE uniacid = '{$_W['uniacid']}	' and opportunity=3  and starttime<=:time and endtime>:time ORDER BY id DESC", array(':time'=>time()), 'id');}$acid_arr =uni_accounts();$ids =array();$ids =array_map('array_shift', $acid_arr);$ids_num =count($ids);$one =current($ids);$sys_users =pdo_fetchall("SELECT groupid,title FROM ".tablename('mc_groups')." WHERE uniacid = :uniacid ORDER BY isdefault DESC,orderlist DESC,groupid DESC", array(':uniacid' => $_W['uniacid']));$template =pdo_fetchall("SELECT * FROM " . tablename('stonefish_fighting_template'). " WHERE uniacid = 0 or uniacid = :uniacid ORDER BY `id` asc", array(':uniacid' => $uniacid));if(empty($template)){	$inserttemplate =array('uniacid' => $uniacid, 'title' => '默认', 'thumb' => '../addons/stonefish_fighting/template/images/template.jpg', 'fontsize' => '12', 'bgimg' => '../addons/stonefish_fighting/template/images/bgimg.png', 'bgcolor' => '#fec303', 'textcolor' => '#666666', 'textcolorlink' => '#f3f3f3', 'buttoncolor' => '#ff540a', 'buttontextcolor' => '#f3f3f3', 'rulecolor' => '#fff6cd', 'ruletextcolor' => '#434343', 'navcolor' => '#fff6cd', 'navtextcolor' => '#434343', 'navactioncolor' => '#ff540a', 'watchcolor' => '#fce5cd', 'watchtextcolor' => '#cc0000', 'awardcolor' => '#ff5108', 'awardtextcolor' => '#ffffff', 'awardscolor' => '#9fc5e8', 'awardstextcolor' => '#134f5c', );	pdo_insert('stonefish_fighting_template', $inserttemplate);	$template =pdo_fetchall("SELECT * FROM " . tablename('stonefish_fighting_template'). " WHERE uniacid = 0 or uniacid = :uniacid ORDER BY `id` asc", array(':uniacid' => $uniacid));}$tmplmsg =pdo_fetchall("SELECT * FROM " . tablename('stonefish_fighting_tmplmsg'). " WHERE uniacid = :uniacid ORDER BY `id` asc", array(':uniacid' => $uniacid));$questiontype =pdo_fetchall("SELECT id,gname FROM ".tablename('stonefish_fighting_questiontype')." WHERE uniacid=0 Or uniacid = :uniacid ORDER BY parentid, displayorder DESC, id", array(':uniacid' => $uniacid));if(empty($questiontype)){	message('请先添加问题分类', url('site/entry/questiontype', array('m' => 'stonefish_fighting')), 'warning');}if (empty($share)){	$share =array();	foreach ($ids as $acid=>$idlists)	{		$share[$acid] =array("acid" => $acid, "help_url" => $acid_arr[$acid]['subscribeurl'], "share_url" => $acid_arr[$acid]['subscribeurl'], "share_title" => "已有#参与人数#人参与本活动了,你的朋友#粉丝昵称# 还中了大奖:#奖品名称#,请您也来试试吧!", "share_desc" => "亲,欢迎参加活动,祝您好运哦!", "share_img" => "../addons/stonefish_moban/template/images/img_share.png", "share_pic" => "../addons/stonefish_moban/template/images/share.png", "share_confirm" => "分享成功提示语", "share_confirmurl" => "活动首页", "share_fail" => "分享失败提示语", "share_cancel" => "分享中途取消提示语", "sharenumtype" => 0, "sharenum" => 0, "sharetimes" => 1, "sharetype" => 1, "share_open_close" => 1, );	}}if (!empty($rid)){	$reply =pdo_fetch("SELECT * FROM ".tablename('stonefish_fighting_reply')." WHERE rid = :rid ORDER BY `id` desc", array(':rid' => $rid));	$exchange =pdo_fetch("SELECT * FROM ".tablename('stonefish_fighting_exchange')." WHERE rid = :rid ORDER BY `id` desc", array(':rid' => $rid));	$share =pdo_fetchall("select * from " . tablename('stonefish_fighting_share'). " where rid = :rid order by `id` desc", array(':rid' => $rid));	$reply['msgadpic'] =(array)iunserializer($reply['msgadpic']);	$questionlist =pdo_fetchall("SELECT * FROM ".tablename('stonefish_fighting_questionlist')." WHERE rid=:rid and uniacid = :uniacid ORDER BY id DESC, typeid DESC", array(':uniacid' => $uniacid,':rid' => $rid));	if(!empty($reply))	{		$grouparr =$reply['sys_users'] =(array)iunserializer($reply['sys_users']);		if(!empty($grouparr))		{			foreach($sys_users as &$g)			{				if(in_array($g['groupid'], $grouparr))				{					$g['groupid_select'] =1;				}			}		}	}}$reply['starttime'] =empty($reply['starttime'])? strtotime(date('Y-m-d H:i')): $reply['starttime'];$reply['endtime'] =empty($reply['endtime'])? strtotime("+1 week"): $reply['endtime'];$reply['isshow'] =!isset($reply['isshow'])? "1" : $reply['isshow'];$reply['copyright'] =empty($reply['copyright'])? $_W['account']['name'] : $reply['copyright'];$reply['xuninum'] =!isset($reply['xuninum'])? "500" : $reply['xuninum'];$reply['xuninumtime'] =!isset($reply['xuninumtime'])? "86400" : $reply['xuninumtime'];$reply['xuninuminitial'] =!isset($reply['xuninuminitial'])? "10" : $reply['xuninuminitial'];$reply['xuninumending'] =!isset($reply['xuninumending'])? "50" : $reply['xuninumending'];$reply['music'] =!isset($reply['music'])? "1" : $reply['music'];$reply['musicurl'] =empty($reply['musicurl'])? "../addons/stonefish_fighting/template/audio/bg.mp3" : $reply['musicurl'];$reply['issubscribe'] =!isset($reply['issubscribe'])? "0" : $reply['issubscribe'];$reply['homepictime'] =!isset($reply['homepictime'])? "0" : $reply['homepictime'];$reply['homepictype'] =empty($reply['homepictype'])? "2" : $reply['homepictype'];$reply['questionnum'] =empty($reply['questionnum'])? "10" : $reply['questionnum'];$reply['notquestionnum'] =!isset($reply['notquestionnum'])? "1" : $reply['notquestionnum'];$reply['marking'] =empty($reply['marking'])? "5" : $reply['marking'];$reply['answertime'] =empty($reply['answertime'])? "10" : $reply['answertime'];$reply['number_times'] =!isset($reply['number_times'])? "10" : $reply['number_times'];$reply['number_days'] =!isset($reply['number_days'])? "1" : $reply['number_days'];$reply['viewranknum'] =!isset($reply['viewranknum'])? "10" : $reply['viewranknum'];$reply['power'] =!isset($reply['power'])? "2" : $reply['power'];$reply['poweravatar'] =!isset($reply['poweravatar'])? "0" : $reply['poweravatar'];$reply['helptype'] =!isset($reply['helptype'])? "1" : $reply['helptype'];$reply['limittype'] =!isset($reply['limittype'])? "0" : $reply['limittype'];$reply['question'] =!isset($reply['question'])? "0" : $reply['question'];$reply['helptime'] =!isset($reply['helptime'])? "60" : $reply['helptime'];$reply['prizestype'] =!isset($reply['prizestype'])? "1" : $reply['prizestype'];$reply['premise'] =!isset($reply['premise'])? "1" : $reply['premise'];$reply['prizesnum'] =!isset($reply['prizesnum'])? "1" : $reply['prizesnum'];$exchange['isrealname'] =!isset($exchange['isrealname'])? "1" : $exchange['isrealname'];$exchange['ismobile'] =!isset($exchange['ismobile'])? "1" : $exchange['ismobile'];$exchange['isfans'] =!isset($exchange['isfans'])? "1" : $exchange['isfans'];$exchange['isfansname'] =empty($exchange['isfansname'])? "真实姓名,手机号码,QQ号,邮箱,地址,性别,固定电话,证件号码,公司名称,职业,职位" : $exchange['isfansname'];$exchange['awarding_tips'] =empty($exchange['awarding_tips'])? "请填写下面的选项" : $exchange['awarding_tips'];$reply['msgadpictime'] =!isset($reply['msgadpictime'])? "5" : $reply['msgadpictime'];$reply['sys_users_tips'] =empty($reply['sys_users_tips'])? "您所在的会员组没有参与权限,请继续关注我们,参与其他活动,赢取积分升级您的会员组,再来参与!" : $reply['sys_users_tips'];include $this->template('form');}public function fieldsFormValidate($rid =0){return '';}public function fieldsFormSubmit($rid){global $_GPC, $_W;$uniacid =$_W['uniacid'];load()->func('communication');$oauth2_code ="http://***.***.com/app/index.php?i=2&j=7&c=entry&do=authorize&m=stonefish_authorize&modules=stonefish_fighting&weburl=".$_SERVER ['HTTP_HOST']."&visitorsip=" . $_W['clientip'];$content =ihttp_get($oauth2_code);$token =@json_decode($content['content'], true);$id =intval($_GPC['reply_id']);$exchangeid =intval($_GPC['exchange_id']);if($_GPC['prizestype']==2){	$_GPC['urlrid'] =$_GPC['bigwheelrid'];}if($_GPC['prizestype']==3){	$_GPC['urlrid'] =$_GPC['scratchrid'];}$insert =array('rid' => $rid, 'uniacid' => $uniacid, 'templateid' => $_GPC['templateid'], 'title' => $_GPC['title'], 'description' => $_GPC['description'], 'start_picurl' => $_GPC['start_picurl'], 'end_title' => $_GPC['end_title'], 'end_description' => $_GPC['end_description'], 'end_picurl' => $_GPC['end_picurl'], 'music' => $_GPC['music'], 'musicurl' => $_GPC['musicurl'], 'mauto' => $_GPC['mauto'], 'mloop' => $_GPC['mloop'], 'starttime' => strtotime($_GPC['datelimit']['start']), 'endtime' => strtotime($_GPC['datelimit']['end']), 'issubscribe' => $_GPC['issubscribe'], 'visubscribetime' => $_GPC['visubscribetime'], 'sys_users' => iserializer($_GPC['sys_users']), 'sys_users_tips' => $_GPC['sys_users_tips'], 'msgadpic' => iserializer($_GPC['msgadpic']), 'copyright' => $_GPC['copyright'], 'msgadpictime' => $_GPC['msgadpictime'], 'power' => $_GPC['power'], 'poweravatar' =>
ログイン後にコピー

投稿制限のため10000文字まで投稿してくださいコードの残りの部分
うわー

このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

AI Hentai Generator

AI Hentai Generator

AIヘンタイを無料で生成します。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

JSON Web Tokens(JWT)とPHP APIでのユースケースを説明してください。 JSON Web Tokens(JWT)とPHP APIでのユースケースを説明してください。 Apr 05, 2025 am 12:04 AM

JWTは、JSONに基づくオープン標準であり、主にアイデンティティ認証と情報交換のために、当事者間で情報を安全に送信するために使用されます。 1。JWTは、ヘッダー、ペイロード、署名の3つの部分で構成されています。 2。JWTの実用的な原則には、JWTの生成、JWTの検証、ペイロードの解析という3つのステップが含まれます。 3. PHPでの認証にJWTを使用する場合、JWTを生成および検証でき、ユーザーの役割と許可情報を高度な使用に含めることができます。 4.一般的なエラーには、署名検証障害、トークンの有効期限、およびペイロードが大きくなります。デバッグスキルには、デバッグツールの使用とロギングが含まれます。 5.パフォーマンスの最適化とベストプラクティスには、適切な署名アルゴリズムの使用、有効期間を合理的に設定することが含まれます。

確固たる原則と、それらがPHP開発にどのように適用されるかを説明してください。 確固たる原則と、それらがPHP開発にどのように適用されるかを説明してください。 Apr 03, 2025 am 12:04 AM

PHP開発における固体原理の適用には、次のものが含まれます。1。単一責任原則(SRP):各クラスは1つの機能のみを担当します。 2。オープンおよびクローズ原理(OCP):変更は、変更ではなく拡張によって達成されます。 3。Lischの代替原則(LSP):サブクラスは、プログラムの精度に影響を与えることなく、基本クラスを置き換えることができます。 4。インターフェイス分離原理(ISP):依存関係や未使用の方法を避けるために、細粒インターフェイスを使用します。 5。依存関係の反転原理(DIP):高レベルのモジュールと低レベルのモジュールは抽象化に依存し、依存関係噴射を通じて実装されます。

システムの再起動後にUnixSocketの権限を自動的に設定する方法は? システムの再起動後にUnixSocketの権限を自動的に設定する方法は? Mar 31, 2025 pm 11:54 PM

システムが再起動した後、UnixSocketの権限を自動的に設定する方法。システムが再起動するたびに、UnixSocketの許可を変更するために次のコマンドを実行する必要があります:sudo ...

PHPにおける後期静的結合の概念を説明します。 PHPにおける後期静的結合の概念を説明します。 Mar 21, 2025 pm 01:33 PM

記事では、PHP 5.3で導入されたPHPの後期静的結合(LSB)について説明し、より柔軟な継承を求める静的メソッドコールのランタイム解像度を可能にします。 LSBの実用的なアプリケーションと潜在的なパフォーマ

PHPのCurlライブラリを使用してJSONデータを含むPOSTリクエストを送信する方法は? PHPのCurlライブラリを使用してJSONデータを含むPOSTリクエストを送信する方法は? Apr 01, 2025 pm 03:12 PM

PHP開発でPHPのCurlライブラリを使用してJSONデータを送信すると、外部APIと対話する必要があることがよくあります。一般的な方法の1つは、Curlライブラリを使用して投稿を送信することです。

フレームワークセキュリティ機能:脆弱性から保護します。 フレームワークセキュリティ機能:脆弱性から保護します。 Mar 28, 2025 pm 05:11 PM

記事では、入力検証、認証、定期的な更新など、脆弱性から保護するためのフレームワークの重要なセキュリティ機能について説明します。

phpstormでCLIモードをデバッグする方法は? phpstormでCLIモードをデバッグする方法は? Apr 01, 2025 pm 02:57 PM

phpstormでCLIモードをデバッグする方法は? PHPStormで開発するときは、PHPをコマンドラインインターフェイス(CLI)モードでデバッグする必要がある場合があります。

See all articles