أشكر لكم المرور ..
طريقة اخفاء الكود ..
طبعا صفحة موقعك الرئيسيه هي index.php على سبيل المثال ..
كبدايه غير اسم الصفحه ل go.php على سبيل المثال ..
انشئ صفحة انديكس جديده index.php
يكون فيها الكود التالي ..
في هالحاله عند طلب الصفحه الرئيسيه ستم توجيه المتصفح ل go.php وهي صفحتك الرئيسيه بالاساس..كود:<? if($_POST or ($_GET and (!isset($_SESSION['skipnextget'])))) { //is there POST or GET data we should look at if($_GET) { //is there GET data? $newgetarr = array(); foreach($_GET as $key => $value) { if(is_array($value)) { $newvalue = implode(',',$value); //if it's an array, convert it to comma separated } else { $newvalue = $value; } $newgetarr[] = $key.'='.$newvalue; } $newget = implode('&',$newgetarr); //$_SESSION['skipnextget'] = 1; } foreach($_POST as $key => $value) { $this[$key] = $value; } ?> </head> <frameset rows="4%"> <frame name="apsmain" src="go.php?<? echo $newget ; ?>"><noframes> <body> <p></p> </body> </noframes></frameset> </html>
السؤال .. لو طلب اليوزر الصفحه go.php مباشرة ؟ راح يعرض كود الصفحه صح ؟
الحل ..
في اعلى صفحة go.php اضف الكود التالي ..
اذا طلبت الصفحة مباشرة ارجع ل index.phpكود:<SCRIPT LANGUAGE="JavaScript"> if (top.frames.length == 0) { top.location = "index.php"; }; </SCRIPT>
اتمنى يكون الشرح واضح ..


رد مع اقتباس
