Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
dolazni link u php-u

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side
View previous topic :: View next topic  
Author Message
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 14.09.2004 13:36    Post subject: dolazni link u php-u Add user to your forum ignore list Reply with quote

kako bi mogao (u php-u) ogranicit dolazak na doc.php samo sa index.php-a?
(u slucaju da doc.php nije pozvan sa index.php-a, treba se redirectat na index.php)

danke!

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 14.09.2004 14:12    Post subject: Add user to your forum ignore list Reply with quote

$_SERVER['HTTP_REFERER'] ti kaze od kuda netko dolazi ali to radi samo ako je browser podesen da salje tu informaciju.

mozes postavljati session varijablu na svaki page na te na svakom slijedecem pageu procitati tu istu varijablu te je onda prepisati sa novom lokacijom.

evo ilustracije

Code:
<?php
// index.php

// procitaj od kud dolazi
$dolazi_sa = $_SESSION['referer'];

// sad session varijablu prepises
$_SESSION['referer'] = 'index.php';

?>


i

Code:
<?php
// doc.php

$dolazi_sa = $_SESSION['referer']; // koji sad kaze index.php

// sad prepisi session sa drugom lokacijom

$_SESSION['referer'] = 'doc.php';

?>


valjda si shvatio. ako nisam bio jasan vici Smile
Back to top
View user's profile Send private message
budha



Joined: 02 Mar 2004
Posts: 1377
Location: Osijek

PostPosted: 14.09.2004 14:25    Post subject: Add user to your forum ignore list Reply with quote

shvatio! Very Happy
fala!

podpitanje:
maxy wrote:
$_SERVER['HTTP_REFERER'] ti kaze od kuda netko dolazi ali to radi samo ako je browser podesen da salje tu informaciju.

jel to podeseno po difoltu?

_________________
I hate to advocate drugs, alcohol, violence, or insanity to anyone, but they've always worked for me.
Back to top
View user's profile Send private message Visit poster's website
maxy



Joined: 07 Sep 2003
Posts: 894
Location: Zagreb

PostPosted: 14.09.2004 15:37    Post subject: Add user to your forum ignore list Reply with quote

pa ako browser u headeru sadrzi referer onda da. mislim, ta varijabla nece bit popunjena ako browser ne posalje tu informaciju.
e sad, dal to browseri salju po difoltu il ne - fakat ne bi znao tak da ti necu davat dezinformaciju.

uglavnom HTTP_REFERER ti se svugdje spominje kao nesto na sto ne smijes racunati.
Back to top
View user's profile Send private message
PsychoPod



Joined: 05 Oct 2003
Posts: 166

PostPosted: 14.09.2004 17:06    Post subject: Add user to your forum ignore list Reply with quote

da nije maxy jos bi i rekao da je bas dobra ideja s sessionima. ali kako je to maxy, onda to ne valja. Razz
Cool
Back to top
View user's profile Send private message
Sulien



Joined: 04 Jan 2004
Posts: 2905
Location: Zagreb

PostPosted: 14.09.2004 17:18    Post subject: Add user to your forum ignore list Reply with quote

točno. mislim, za 'referer'
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Server-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group