0

Hello! I have an file php who want direct access in that file nobody can have access,i dn't know if is possible to block....

<?php
header("location:/path/?id=".$_GET['id']);
?>

i put that in an embed page and run video avi.when i block direct access with htaccess video dont run.Is possible block direct access and the video who get from header run??.
Thank you in advance .

3
Contributors
4
Replies
7
Views
6 Years
Discussion Span
Last Post by arjani10
0

you can do it by using session. use session check. if session is empty redirect the user on other page.

0
<?php
if(isset($_POST['submit']))
{
//embedd video code here
}
else
{
?>
<form action="" Method="POST">
<input type="submit" value="submit" name="submit">
</form>
<?php 
?>

or using session

check if the session is set using same method but only difference is that for session you have to start session using session_start() and it must be the first code of your line...
For more refer here or here

Hope this is useful for you...
PS-If your problem is solved mark the thread as solved....

Edited by tomato.pgn: n/a

0

Thanks tomato.pgn but i thing you dont understand that i need..


this is my header.php

1.
      <?php
   2.
      header("location:/path/?id=".$_GET['id']);
   3.
      ?>

and this is my embed.php code

<param name="Src" value="stream.php?id=<?php echo urlencode(base64_encode("http://mywebsite.com/header.php?id=$id&")); ?>" />

i need when click http://mywebsite.com/header.php?id=myid get no access ,but when i embed in my page that video run.Thats all.
Thank you anyway for your time.

Edited by arjani10: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.