<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Houn problema con header]]></title><description><![CDATA[<p dir="auto">Salve a tutti mi sono iscritto adesso con la speranza che risolvi il mio probela.<br />
Allora io qui ho una pagina chiamata homepage.php e vorrei inserirgli un &lt;?php header("location:sito/pagina.html"); ?&gt; pero siccome è un login quesat pagina homepage.php ha una protezione cioè che se non si effettua correttamente i login non ti fa entrare oppure se qualcuno vuole fare il furbo mettendo: <a href="http://www.gaten91.altervista.org/homepage.php" rel="nofollow ugc">www.gaten91.altervista.org/homepage.php</a> gli da una shermata di errore perchè non è loggato adesso vi faccio vedere la pagina homepage.php e voglio fare in modo che chiunque vuole fare il furbo non puo entrare se non è loggato ovviametne devo inserirgli quell'header di cui vi ho parlato:</p>
<p dir="auto">homepage.php</p>
<p dir="auto">&lt;?php<br />
if (!isset($_SESSION)) {<br />
session_start();<br />
}<br />
$MM_authorizedUsers = "";<br />
$MM_donotCheckaccess = "true";<br />
// *** Restrict Access To Page: Grant or deny access to this page<br />
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {<br />
// For security, start by assuming the visitor is NOT authorized.<br />
$isValid = False;<br />
// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.<br />
// Therefore, we know that a user is NOT logged in if that Session variable is blank.<br />
if (!empty($UserName)) {<br />
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.<br />
// Parse the strings into arrays.<br />
$arrUsers = Explode(",", $strUsers);<br />
$arrGroups = Explode(",", $strGroups);<br />
if (in_array($UserName, $arrUsers)) {<br />
$isValid = true;<br />
}<br />
// Or, you may restrict access to only certain users based on their username.<br />
if (in_array($UserGroup, $arrGroups)) {<br />
$isValid = true;<br />
}<br />
if (($strUsers == "") &amp;&amp; true) {<br />
$isValid = true;<br />
}<br />
}<br />
return $isValid;<br />
}<br />
$MM_restrictGoTo = "protezione_pagina.php";<br />
if (!((isset($_SESSION['MM_Username'])) &amp;&amp; (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {<br />
$MM_qsChar = "?";<br />
$MM_referrer = $_SERVER['PHP_SELF'];<br />
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&amp;";<br />
if (isset($QUERY_STRING) &amp;&amp; strlen($QUERY_STRING) &gt; 0)<br />
$MM_referrer .= "?" . $QUERY_STRING;<br />
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);<br />
header("Location: ". $MM_restrictGoTo);<br />
exit;<br />
}<br />
?&gt;&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" rel="nofollow ugc">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"&gt;<br />
&lt;html xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow ugc">http://www.w3.org/1999/xhtml</a>"&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;<br />
&lt;title&gt;Documento senza titolo&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
]]></description><link>https://dev.connect.gt/topic/42544/houn-problema-con-header</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Dec 2026 06:38:30 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/42544.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Aug 2007 13:54:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Houn problema con header on Fri, 10 Aug 2007 14:45:19 GMT]]></title><description><![CDATA[<p dir="auto">Ho letto 3 volte il tuo quesito ma non ho capito qual è il problema.</p>
]]></description><link>https://dev.connect.gt/post/576348</link><guid isPermaLink="true">https://dev.connect.gt/post/576348</guid><dc:creator><![CDATA[ayrton2001]]></dc:creator><pubDate>Fri, 10 Aug 2007 14:45:19 GMT</pubDate></item></channel></rss>