Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 105,772 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,456 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



gate keeper

 
Reply to this topicStart new topic

gate keeper, to secure the urls from unauthorized users

sirisreddy
post 11 Jul, 2008 - 05:47 AM
Post #1


New D.I.C Head

*
Joined: 11 Jul, 2008
Posts: 1

php
<?php
session_start();
//print_r($_SESSION);
$file="C:/Program Files/wamp/www/svn/dev/fedxccel/supplementary/dotxx070.pdf";
//$file =$_REQUEST['loc'];
echo $file.'<BR>';
$file=urldecode($file);
if(isset($_SESSION['authenticated_user_id']) && $_SESSION['authenticated_user_id']!='')
//if(isset($_SESSION['authenticated_user_id']))
{
// Quick check to verify that the file exists
if(file_exists($file) )
{

// Force the download
header("Content-Disposition: attachment; filename=\"" . basename($file) . "\"");
header("Content-Length: " . filesize($file));
header("Content-Type: application/octet-stream;");
readfile($file);
}
}
i have an problem with how to pass the pdf files in dynmically.and another problem is this file is linked with another file.in that file have url.this url is not acessible in .php file.how to retrieve this url in that page.
else
{
header("http://localhost/svn/dev/fedxccel/index.php");
}
?>

Mod edit: Please code.gif
Thanks, gabehabe smile.gif
User is offlineProfile CardPM

Go to the top of the page


EvinOwen
post 11 Jul, 2008 - 01:13 PM
Post #2


New D.I.C Head

*
Joined: 1 Jul, 2008
Posts: 8



Thanked 1 times
My Contributions


while id love to figure it out, maybe you could let us in on what exactly your are trying to do?

also, whats wrong? whats happening? pirate.gif
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 03:47PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month