Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
could this be used to hide read location of file?...
Old 08-16-2007, 01:28 PM could this be used to hide read location of file?...
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
hey,

i was just looking at the header function on php.net and saw this

PHP Code:
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf
readfile('original.pdf');
?>
</SPAN>

could this be used like one of those download things so users dont know the actual location of a file? and have it so the new name is like a random string?.

Dan.
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
 
Register now for full access!
Old 08-17-2007, 01:16 PM Re: could this be used to hide read location of file?...
Extreme Talker

Posts: 238
Location: United States
Trades: 0
Yes. There is nothing there that would send out the original file name original.pdf.

Although most people usually name the original file something random, and something obvious for the downloaded file so the users know what the file is later on.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 08-17-2007, 02:28 PM Re: could this be used to hide read location of file?...
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
is this how download sites have the thing like where u have a page open and then it pops up to download after like 10 seconds?
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Old 08-17-2007, 06:51 PM Re: could this be used to hide read location of file?...
Extreme Talker

Posts: 238
Location: United States
Trades: 0
It can be. You can put an invisible iframe on an existing page (such as the download page) and call your download script in the iframe. There is usually a short delay, and that is just general Internet latency, the server finding the file, etc. If there is a longer delay, like 10 seconds, I think that is because those download scripts are loading the entire file into the script, waiting until it's completely loaded, then outputing it. I've only dealt with small-medium files with readfile() though.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
frost is offline
Reply With Quote
View Public Profile
 
Old 08-17-2007, 07:28 PM Re: could this be used to hide read location of file?...
dansgalaxy's Avatar
Defies a Status

Posts: 6,521
Name: Dan
Location: Swindon
Trades: 0
no im refering to the ones like which have a countdown one purpose no matter the file, it waits and then pops up
__________________
Discounted Web Hosting With XDnet!
>> Get 25% of hosting~ Promo: Webmaster-talk <<

Please login or register to view this content. Registration is FREE
dansgalaxy is offline
Reply With Quote
View Public Profile Visit dansgalaxy's homepage!
 
Reply     « Reply to could this be used to hide read location of file?...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.72083 seconds with 12 queries