Web Sunucu, ".PHP" uzatmasını görünce telaşa kapılır, bu dosyayı PHP yorumlayıcısına verir ve o da "<?PHP" ve "?>" ayraçları içindeki kodları icra eder, demiştik. Bu icraatın sonunda ortaya çıkan ürün eğer ziyaretçiye gönderilecekse, HTML etiketleri içinde gönderilir; yani ziyaretçi asla PHP kodlarını göremez.
PHP, nasıl bir ayraç ve etiket ile yazarsak yazalım, daima sunucuda çalıştırılar ve ziyaretçiye asla PHP kodları gösterillmez. merhaba.PHP'nin çalıştığı Browser'da kaynağı görüntülersek, istemciye gelen kodların saf-ve-temiz HTML olduğunu göreceğiz.
misal:
<?PHP print "Merhaba Dünya!"; ?>
ftp olmadan kod gözükmez.öyle olsaydı ne scriptler çalınırdı.
web browser'lar php ve asp kodları encode ederek sayfaya sadece html kodlar halinde yansıtır.. bu nedenle bir php sayfayı web browserin üzerinden kaydetmek olanaksız. sadece ftp'den gerçekleştirebilirsin.
yada dap flashget gibi programlarla direk link downloadı yaparsın. yani;
web browser'lar php ve asp kodları encode ederek sayfaya sadece html kodlar halinde yansıtır.. bu nedenle bir php sayfayı web browserin üzerinden kaydetmek olanaksız. sadece ftp'den gerçekleştirebilirsin.
yada dap flashget gibi programlarla direk link downloadı yaparsın. yani;
web browser'lar php ve asp kodları encode ederek sayfaya sadece html kodlar halinde yansıtır.. bu nedenle bir php sayfayı web browserin üzerinden kaydetmek olanaksız. sadece ftp'den gerçekleştirebilirsin.
yada dap flashget gibi programlarla direk link downloadı yaparsın. yani;
web browser'lar php ve asp kodları encode ederek sayfaya sadece html kodlar halinde yansıtır.. bu nedenle bir php sayfayı web browserin üzerinden kaydetmek olanaksız. sadece ftp'den gerçekleştirebilirsin.
yada dap flashget gibi programlarla direk link downloadı yaparsın. yani;
nasıl yani php kodlarına ulaşabiliyor musun?...bu mümkün değil...web programlama dillerini browser değil, sunucu derler...
ama mesela javascript veya vbscript kodlarını browser derlediği için onları görebiliyoruz...
tamam işte.. download programıyla indirdiğimiz php'nin normal bi şekilde çalışması lazım olur. çünkü herhangi bir browser'la yani onu encode edecek bi programla karşılaşmaz...
// ####################################################################### // ######################## START MAIN SCRIPT ############################ // #######################################################################
// ############################### start mark forums read ############################### if ($_REQUEST['do'] == 'markread') { $forumid = intval($_REQUEST['forumid']);
if (!$forumid) { if ($bbuserinfo['userid']) { $DB_site->query("UPDATE " . TABLE_PREFIX . "user SET lastactivity = " . TIMENOW . ", lastvisit=" . (TIMENOW - 1) . " WHERE userid=$bbuserinfo[userid]"); } else { vbsetcookie('lastvisit', TIMENOW); }
$url = "$vboptions[forumhome].php?$session[sessionurl]"; eval(print_standard_redirect('markread')); } else { // temp work around code, I need to find another way to mass set some values to the cookie $bb_cache_forum_view = unserialize(convert_bbarray_cookie($_COOKIE[COOKIE_PREFIX . 'forum_view']));
require_once('./includes/functions_misc.php'); $childforums = fetch_child_forums($forumid, 'ARRAY'); foreach ($childforums AS $val) { // mark the forum and all child forums read $bb_cache_forum_view["$val"] = TIMENOW; } set_bbarray_cookie('forum_view', $forumid, TIMENOW);
// needs this to show error if forum does not exist $foruminfo = verify_id('forum', $forumid, 1, 1);
// get permission to view forum $_permsgetter_ = 'forumdisplay'; $forumperms = fetch_permissions($forumid); if (!($forumperms & CANVIEW)) { print_no_permission(); }
// check if there is a forum password and if so, ensure the user has it set verify_forum_password($foruminfo['forumid'], $foruminfo['password']);
// get iforumcache - for use by makeforumjump and forums list // fetch the forum even if they are invisible since its needed // for the title but we'll unset that further down cache_ordered_forums(1, 1);
// ### BUILD FORUMS LIST #################################################
$comma = '';
// get an array of child forum ids for this forum $foruminfo['childlist'] = explode(',', $foruminfo['childlist']);
// define max depth for forums display based on $vboptions[forumhomedepth] define('MAXFORUMDEPTH', $vboptions['forumdisplaydepth']);
if ($vboptions['showforumusers']) { $datecut = TIMENOW - $vboptions['cookietimeout']; $forumusers = $DB_site->query(" SELECT user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible, user.usergroupid, session.userid, session.inforum, session.lastactivity, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "session AS session LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid) WHERE session.lastactivity > $datecut ORDER BY" . iif($vboptions['showforumusers'] == 1, " username ASC,") . " lastactivity DESC ");
$numberregistered = 0; $doneuser = array();
if ($bbuserinfo['userid']) {
// fakes the user being in this forum $bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']); $loggedin = array( 'userid' => $bbuserinfo['userid'], 'username' => $bbuserinfo['username'], 'invisible' => $bbuserinfo['invisible'], 'invisiblemark' => $bbuserinfo['invisiblemark'], 'inforum' => $foruminfo['forumid'], 'lastactivity' => TIMENOW, 'musername' => fetch_musername($bbuserinfo, 'joingroupid') ); $numberregistered = 1; fetch_online_status($loggedin); eval('$activeusers = "' . fetch_template('forumdisplay_loggedinuser') . '";'); $doneuser["$bbuserinfo[userid]"] = 1; $comma = ', '; }
$inforum = array();
$numberguest = 0;
// this require the query to have lastactivity ordered by DESC so that the latest location will be the first encountered. while ($loggedin = $DB_site->fetch_array($forumusers)) { if (empty($doneuser["$loggedin[userid]"])) { if (in_array($loggedin['inforum'], $foruminfo['childlist']) AND $loggedin['inforum'] != -1) { if (!$loggedin['userid']) { // this is a guest $numberguest++; $inforum["$loggedin[inforum]"]++; } else { $numberregistered++; $inforum["$loggedin[inforum]"]++; if (fetch_online_status($loggedin)) { $loggedin['musername'] = fetch_musername($loggedin); eval('$activeusers .= "' . $comma . fetch_template('forumdisplay_loggedinuser') . '";'); $comma = ', '; } } } if ($loggedin['userid']) { $doneuser["$loggedin[userid]"] = 1; } } }
// ############################################################################# // get read status for this forum and children $unreadchildforums = 0; foreach ($foruminfo['childlist'] AS $val) { if ($val == -1 OR $val == $foruminfo['forumid']) { continue; }
if ($forumcache["$val"]['lastpost'] >= fetch_bbarray_cookie('forum_view', $val) AND $forumcache["$val"]['lastpost'] >= $bbuserinfo['lastvisit']) { $unreadchildforums = 1; } }
// filter out deletion notices if can't be seen if (!($forumperms & CANSEEDELNOTICE) AND !can_moderate($forumid)) { $delthreadlimit = "AND deletionlog.primaryid IS NULL"; $deljoin = "LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')"; } else { $delthreadlimit = ''; $deljoin = ''; }
// remove threads from users on the global ignore list if user is not a moderator if ($Coventry = fetch_coventry('string') AND !can_moderate($forumid)) { $globalignore = "AND postuserid NOT IN ($Coventry) "; } else { $globalignore = ''; }
switch ($sortfield) { case 'title': $sqlsortfield = 'thread.title'; break; case 'lastpost': case 'replycount': case 'views': case 'postusername': $sqlsortfield = $sortfield; break; case 'voteavg': if ($foruminfo['allowratings']) { $sqlsortfield = 'voteavg'; break; } // else, use last post default: $sqlsortfield = 'lastpost'; $sortfield = 'lastpost'; } $sort = array($sortfield => HTML_SELECTED);
$threadscount = $DB_site->query_first(" SELECT COUNT(*) AS threads, SUM(IF(lastpost>=$lastread AND open<>10,1,0)) AS newthread FROM " . TABLE_PREFIX . "thread AS thread $deljoin WHERE forumid = $foruminfo[forumid] AND sticky = 0 AND visible = 1 $globalignore $datecut $limitothers $delthreadlimit "); $totalthreads = $threadscount['threads']; $newthreads = $threadscount['newthread'];
// set defaults sanitize_pageresults($totalthreads, $pagenumber, $perpage, 200, $vboptions['maxthreads']);
// get number of sticky threads for the first page // on the first page there will be the sticky threads PLUS the $perpage other normal threads // not quite a bug, but a deliberate feature! if ($pagenumber == 1 OR $vboptions['showstickies']) { $stickies = $DB_site->query(" SELECT threadid FROM " . TABLE_PREFIX . "thread AS thread $deljoin WHERE forumid = $foruminfo[forumid] AND visible = 1 AND sticky = 1 $limitothers $globalignore $delthreadlimit "); while ($thissticky = $DB_site->fetch_array($stickies)) { $stickycount++; $stickyids .= ",$thissticky[threadid]"; } $DB_site->free_result($stickies); unset($thissticky, $stickies); }
$threads = $DB_site->query(" SELECT $votequery $previewfield thread.threadid, thread.title AS threadtitle, lastpost, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid, lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach " . iif($vboptions['threadsubscribed'] AND $bbuserinfo['userid'], ", NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed") . " " . iif(!$deljoin, ", NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason") . " FROM " . TABLE_PREFIX . "thread AS thread " . iif(!$deljoin, " LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')") . " " . iif($vboptions['threadsubscribed'] AND $bbuserinfo['userid'], " LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])") . " $previewjoin WHERE thread.threadid IN (0$ids) ORDER BY sticky DESC, $sqlsortfield $sqlsortorder "); unset($limitothers, $delthreadlimit, $deljoin,$datecut, $votequery, $sqlsortfield, $sqlsortorder, $threadids);
// Get Dot Threads $dotthreads = fetch_dot_threads_array($ids); if ($vboptions['showdots'] AND $bbuserinfo['userid']) { $show['dotthreads'] = true; } else { $show['dotthreads'] = false; }
unset($ids);
// prepare sort things for column header row: $sorturl = "forumdisplay.php?$session[sessionurl]f=$forumid&daysprune=$daysprune"; $oppositesort = iif($sortorder == 'asc', 'desc', 'asc');
if ($totalthreads > 0 OR $stickyids) { if ($totalthreads > 0) { $limitlower++; } // check to see if there are any threads to display. If there are, do so, otherwise, show message
if ($bbuserinfo['maxposts'] != -1 AND $bbuserinfo['maxposts']) { $vboptions['maxposts'] = $bbuserinfo['maxposts']; }
// get the icon cache $iconcache = unserialize($datastore['iconcache']);
if ($vboptions['threadpreview'] > 0) { // Get Buddy List $buddy = array(); if (trim($bbuserinfo['buddylist'])) { $buddylist = preg_split('/( )+/', trim($bbuserinfo['buddylist']), -1, PREG_SPLIT_NO_EMPTY); foreach ($buddylist AS $buddyuserid) { $buddy["$buddyuserid"] = 1; } } DEVDEBUG('buddies: ' . implode(', ', array_keys($buddy))); // Get Ignore Users $ignore = array(); if (trim($bbuserinfo['ignorelist'])) { $ignorelist = preg_split('/( )+/', trim($bbuserinfo['ignorelist']), -1, PREG_SPLIT_NO_EMPTY); foreach ($ignorelist AS $ignoreuserid) { if (!$buddy["$ignoreuserid"]) { $ignore["$ignoreuserid"] = 1; } } } DEVDEBUG('ignored users: ' . implode(', ', array_keys($ignore))); }
// get colspan for bottom bar $foruminfo['bottomcolspan'] = 6; if ($foruminfo['allowicons']) { $foruminfo['bottomcolspan']++; } if ($foruminfo['allowratings']) { $foruminfo['bottomcolspan']++; }
$show['threadslist'] = true;
///////////////////////////////// } // end forum can contain threads else { $show['threadslist'] = false; } ///////////////////////////////// if ($newthreads < 1 AND $unreadchildforums < 1) { // mark a single forum as read as it appears all threads are read set_bbarray_cookie('forum_view', $foruminfo['forumid'], TIMENOW); } construct_forum_rules($foruminfo, $forumperms);
//remove html to stop the breaking of the meta description $foruminfo['description'] = strip_tags($foruminfo['description']);
ancak farklı kaydet diyerek içindeki html kodlarını görürsün.
Bu mesaja 1 cevap geldi. Cevapları Gizle
Bu mesaja 1 cevap geldi. Cevapları Gizle
farklı kaydetten farkı yokki.
içindeki kod html olarak gözüken kod olacak.
Bu mesaja 1 cevap geldi. Cevapları Gizle
Web Sunucu, ".PHP" uzatmasını görünce telaşa kapılır, bu dosyayı PHP yorumlayıcısına verir ve o da "<?PHP" ve "?>" ayraçları içindeki kodları icra eder, demiştik. Bu icraatın sonunda ortaya çıkan ürün eğer ziyaretçiye gönderilecekse, HTML etiketleri içinde gönderilir; yani ziyaretçi asla PHP kodlarını göremez.
PHP, nasıl bir ayraç ve etiket ile yazarsak yazalım, daima sunucuda çalıştırılar ve ziyaretçiye asla PHP kodları gösterillmez. merhaba.PHP'nin çalıştığı Browser'da kaynağı görüntülersek, istemciye gelen kodların saf-ve-temiz HTML olduğunu göreceğiz.
misal:
ftp olmadan kod gözükmez.öyle olsaydı ne scriptler çalınırdı.
Bu mesaja 1 cevap geldi. Cevapları Gizle
flashget veya farklı kaydet ile yaparsanız html kodları gözükecektir...
Bu mesaja 1 cevap geldi. Cevapları Gizle
yada dap flashget gibi programlarla direk link downloadı yaparsın. yani;
sayfanın linkiwww.domain.com/forum/index.php olsun.
bu linki direk flashgetin içine kopyalayarak dosyayı indirebilirsin..
Bu mesaja 1 cevap geldi. Cevapları Gizle
flash get ile de sadece html kodlarını görebilirsin...
Bu mesaja 1 cevap geldi. Cevapları Gizle
allah allah.. şimdi denedim oldu..
Bu mesaja 3 cevap geldi. Cevapları Gizle
php dosyasıyla birlikte gelen kodları yapıştırsana buraya.
inat etme, indirebilirsin ama yine html kodları gözükür, kesinlikle php kodları gözükmez.
sadece ftp den indirirsen php kodlarını görebilirsin
ama mesela javascript veya vbscript kodlarını browser derlediği için onları görebiliyoruz...
< Bu mesaj bu kişi tarafından değiştirildi Finney -- 27 Ekim 2005, 19:56:37 >
Bu mesaja 1 cevap geldi. Cevapları Gizle
tamam işte.. download programıyla indirdiğimiz php'nin normal bi şekilde çalışması lazım olur. çünkü herhangi bir browser'la yani onu encode edecek bi programla karşılaşmaz...
kod isteyen arkadaş.
Bu mesaja 1 cevap geldi. Cevapları Gizle
sen şimdi dosyayı indirdin ve php kodları bu şekilde gözüktü ölemi?
Bu mesaja 3 cevap geldi. Cevapları Gizle
walla bende anlamadım hacı ya...
www.elemanyak.com/forum/forumdisplay.php
....
tamam tamam pardon html olarak çıkıyor.. kusura bakmayın.
< Bu mesaj bu kişi tarafından değiştirildi THR -- 27 Ekim 2005, 20:21:28 >
Bu mesaja 1 cevap geldi. Cevapları Gizle
Bu mesaja 1 cevap geldi. Cevapları Gizle
GrafikEr doğru söyler o doğru söylemezse Hakkı Öcal doğru söyler.