How Do I Hide Files From Download Without Php?
I want to hide files or better say restrict access to them for usual download. I want to send them just to allowed users with php? How do I do that?
I've tried to put variuos permisions on the directory, and then run this code:
<?
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=file.rar");
$ff = fopen("restricted/anyName.zip", 'r');
fpassthru($ff);
?>
If there are any restrictions, user downloads only 400b file, if there's no restrictions user gets normal filesize.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Hide Download Source
I am developing a website and I am providing some softwares to download but I need to hide the source from where the softwares will be downloaded. How to hide this source from user that from where the software is being downloaded and how can I restrict DAP and other Download Accelerator (this feature is not necessary but hiding the source is necessary).
How To Hide The Url Of A File For Download
I'd like to let user download a file but I'd like to hide the url of the file. I'd like to write something like that: <a href="download_file.php?id=1123">download file</a> download_file.php get the file and give it to user. BUT....... how can I write download_file.php?
How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and removed it form CONNECTIONS directory.
How Do I Hide Database Connection Files Using PHP Include Files?
I have the following at the beginning of the PHP page: <?php require_once('Connections/conn.php'); ?> I want to hide the connection file, "conn.php", so it's out of the web accessible file structure. I understand putting them in the php include directory shoudl do this. For example, let's say the directory I put them in is /www/phpIN/, and /www/ht/ is the root web directory. So I put "conn.php" in the inlcude directory (/www/phpIN/conn.php) and removed it form CONNECTIONS directory. Now it doesn't work. What do I need to change?
I Can't See Any Dll Files In Php Download?
I downloaded the windows binary php4.0.4 from php.net and it says to move a certain dll file to your windows directory. I looked in the dll folder and it is empty. So, I tried downloading a php/apache package at a site just for windows users, and when I unzipped that package, I saw the dll files scrolling by in the unpacker window, but once again the dll folder was empty. Where are they?
Zip Files, Then Force Download
Is there any examples or scripts that already will do this? I need to zip an arbitrary amount of files, say maybe a $files array full of path names to the files filled dynamically from database based on an id number... then i need it to automatically force a download of the zip file to the browser, then automatically delete the zip file when its finished...
Select Files To Download
i have made a page with several photos of a party. There is a index in the page, and under each thumbnail there is a checkbox. With them people can select the photos that he's going to download, but i don't know how i can send the selected photos. I think "compress" all the selected photos in a file and send it, but i couldn't do it. I used zlib and bz2 libraries, but i dont know how i can put more than one file, and even with an only file the compress file dont work. What i make is open the file, read it and then compress the string get of the read in the new compress file, but this file is empty or have a code of the zlib.
Corrupted ZIP Files During Download Via PHP
I am posting this rather lengthy description here in hope of getting at least some insight into a problem that is really hurting my business, since I have come to the conclusion that my problem is at least partly PHP-related. Some time now I have been having transfer problems, i.e. my customers downloads of large binary (ZIP) files are often corrupt. A corrupted file now and then can of course never be avoided, but I get several complaints from customers every day. Of any specific file, approx. 1 out of 4 downloads (larger than 100kB or so) are affected. I have spent months trying to find the source of the problems without success, but I have been able to rule out many possible causes. Here are some facts: 1) The actual files are OK on the server. Direct (unencrypted) links are fine, so it's not a general problem. 2) About 50% of the customers download (the exact same files) from another source. I don't even get 1 complaint every two months from those customers, while I get 1-3 complaints _every day_ from those who download from my server. 3) The customers have various SW/HW/OS, so it's very unlikely that it's a user problem. Plus, the same customer often download from both places, but only have problems with the files from my server. 4) I have shut down all scripts for a while, so that only a static website remained, but it didn't help. 5) I have had this problem on three servers: The present RaQ550, the previous RaQ4 and the RaQ4 I had before that. So it's highly unlikely that it is server-related. 6) I can easily reproduce the problem myself. As I looked into this I found a systematic error: Analyzing corrupt vs. clean ZIP file downloads with a binary/hex editor clearly shows that the error is systematic. Clean ZIP files have a lot of ༼h' bytes in them. In ALL of the corrupt ZIP files ALL (well, most) of these bytes have been exchanged for ƋC30h', i.e. TWO bytes ( 00h -> 5C30h ) ! Since ƋC30h' equals an escaped zero, i.e. "", my guess is that there is a translation error somewhere. So, what does PHP have to do with this? Well, my download links to purchaseware are encrypted by the PHP "ewportal": From the few facts I have been able to uncover it seems there is sometimes a problem with corrupted ZIP files depending on the setting/compilation of ZLIB. If anyone on this forum have experienced similar things I would very much appreciate if they could share. My servers PHP configuration is at:
Protect Download Files
I´m developping an application that needs to show some videos, but in a protected envinroment. Any user must be authenticated to see the videos. But for example, if anyone know the path of the videos, can access directly to this site and download it without authentication. If I write in the location bar the url of a video, I can download without problem because the application cannot test if the user is already authenticated or not. I´ve read something about RedirectMatch and it works well but now the users cannot see the videos. I try to write an example: ..- #I write this rule in the httpd.conf RedirectMatch (.*).avi$ /myapplication/tools/downloadfile.php?filename=$1 With this rule I redirect all the requests for the video files include the request of a window media player, but I don´t want to do this. When I show the video directly on the web, I don´t need to redirect but when is a direct request from url to download the file, I must check if the user is authenticated.
Browser Tries To Download .php Files Instead Of Executing Them
I'm running Redhat 9 and just upgraded from PHP 4.2.x to 4.3.1 and no when I try to execute a script on my local server here it opens a window to try and download any .php files. I think Apache isn't loading the module, but when I add in: LoadModule php4_module modules/libphp4.so it can't find the module and I can't find it on my system under libexec or modules or anywhere else for that matter. What do I need to do to httpd.conf (or php.ini) to make it execute these scripts?
User Download Files From Database
I make a code to Download file userfiles from database these are userfiles, admin upload files and user download it from the database,but there is little problem i can't fix it Code:
Download Files Quickly = Hang
This isn't exactly a PHP-related question, but I'm hoping that the community of developers here will have experience dealing with it. We want to allow users to view large files on our site, but we've realized that if users in IE click from one file to another too quickly (before the previous files have fully loaded), future files do not load until they close and reopen their browsers. We believe this is because of the two-concurrent-downloads limit -- apparently Firefox correctly recognizes when a download has been abandoned on the user's end, while IE does not, and this causes problems.
A Follow-up To My Download-all-files-as-a-zip-file Post
I made a script that successfully creates a .zip file of all the files in a directory on my web server, but now what I haven't figured out how to do is how to have it automatically deleted when the user successfully downloads it, as otherwise my server would eventually get clogged up with all these zip files.
Download Link For Exe Files Dont Work!
i'm developing a php app that shows folders and subfolders with their content so someone can download files from those browsers. the problem is: the download does not work for exe files! http://www.scotland.ca/dmspro/_uplo...4Std_Manual.PDF works and http://www.scotland.ca/dmspro/_uplo...-%20netants.zip works too! but http://www.scotland.ca/dmspro/_uplo...ils/wrar320.exe and http://www.scotland.ca/dmspro/_uplo...ISO_v6_5_en.exe do not work!!! where could be the problem there??
Creating Download Manager For Multiple Files
Has anyone run across some sort of download manager to be able to download multiple files at a time via http with PHP? I run a mp3 site and I would like to be able to allow people to download whole folders at a time basically the same functionality as ftp but with http. It would be kind of like the smart download thing that netscape has but cross platform compatible. Any ideas?
Allowing Users To Download Files Using Headers
I am trying to create an area where a user can come to a page that queries a database and displays links to files. Here is the code for the link: <td><a href="download.php?path=../ftp/$path&name=$name" target="_blank">$name</a></font></b></td> Quote:
Download Files From Remote Server To Local Webserver
I am trying to create a php page whereby people can download files from a remote server to their own server (to update their webdirectory with updated files/images etc). So for example one php page (e.g. update.php) should be able to download files from a remote server to a specific directory on their local webserver. Is this possible?
Curl - Resume Http Download - Apache Log Files. Gz
I am writing a Php script to run on my home PC (Windows) that downloads an Apache access log file and inserts new entries into a database.. The only way I can access these log files is through a cPanel URL that delivers a gzipped copy of the log file with all entires for the current month (up to the current date and time). I want to run this script once a day (at night) and would like to download the gzipped file by resuming from where I left off the day before (instead of always downloading the entire gzipped file). I have tried using CURL with the option - curl_setopt($ch, CURLOPT_RESUME_FROM, $prev_offset) - but that always restarts the download from the beginning. ($prev_offset is the previous days file size). I'm not sure what the structure of a gzip file is, so I don't even know if it is possible to resume a gzip file download when the file has been rebuilt in the mean time (cPanel creates a gzipped file with the same name from the raw log files every time you access that page in cPanel). My guess is that this is probably not possible. ... But .... I am trying to make the resume work to find out for myself and I can not make the resume work. The bottom line is that I am trying to avoid downloading the entire gzipped log file every time I need to download it. As an alternate, I have been successful using gzopen, and then I can gzseek to the previous offset, but I am unable to use a secure URL (https) with the Zlib functions (gzopen) with my Windows version of Php (the username and password have to be included in the cPanel URL to access the log file, so I'd like to use SSL.) (I have started another thread to figure out how to get a Php Windows binary with https and ftps as registered streams (built with --with-openssl in the ./configure command), but so far I have gotten no replies). Question: When using gzread, where does the decompression take place - on the server where the file is located, or on my PC after the compressed data is downloaded? Does gzseek work on a compressed file, or must it be uncompressed on the server first? The point being; when I use gzopen and gzread, am I downloading compressed or uncompressed data from the server where the log files are located? I can use either method, but want to meet two requirements. 1. I do not want to download redundant (old) data every day (I want to resume where I left off) ... and ... 2. I want to send the request for the log file (containing a username and password) using SSL.
Automatic Download Of Files Using Application/save On Windows XP SP2 Browsers
For the past two years, we have offered files for download through a secure website. Users, after clicking on a link, are redirected to a PHP page that passes the appropriate header information to the user and inquires if that user wishes to download the file. A sample of that code is below: header('Content-Type: application/save'); header('Content-Disposition:attachment; filename="'.$file_path .'"'); header('Content-Transfer-Encoding: binary'); header('Content-length: ' . filesize($full_file_path)); readfile($full_file_path); However, with the enhanced security now available in Windows XP SP2, users are no longer prompted to download the file. In fact, Windows XP SP2 not only suppresses the download but will not even present the end user with an option to download the file. Has anyone else encountered this type of situation? If so, is there a programmtic solution to, at the very least, prompt the user to download the file without requiring the user include the website as one of his/her trusted websites.
Hide My IP Address
Currently I have build a website and I m building contents on this site usgin PHP/cURL by Collecting data using cURL from some other site. Recently my server's IP address has been blocked by the other website.So my script (that extracts data using cURL ) could not get connection to the other website and so could not getting data for my website. Is there any way using cURL or some way else that the other server could not track/see my IP from where the request is coming etc.
Hide URL Parameters
I've my site wich uses POST forms and javascript (see below). Since it's online, some people have called saying that some parts of my site are unavailable. I've seen that the part not accessable are the one redirected by javascript: echo("<body bgcolor="#555555" onLoad='document.forms["FormNext"].submit()'> <form name="FormNext" method="POST" action="edit.php?".SID.""> <input type="hidden" name="PrevPage" value="".$HTTP_SERVER_VARS['PHP_SELF'].""> .... I've many param to pass to the edit.php, and I must avoid some of them being too visible, that's why I've take the POST forms. Now, I can't get further. So I decided to go "GET", but it's there any way to pass the entire params in some crypted way: say edit.php?data=csdkykljr3q9sajdsd<ckmcdkasmcs and in my edit.php, a function uncrypting the code passed in data.
Hide One Of The Checkboxes
is there any way that i would be able to hide one of the checkboxes if it is pulling from a database. Here is the scenario in my website i have all of the different regions (of my website) listed from 1 - 6 on the database. I have just recently made it so that the users can post in different regions other then the old just one region. My problem is that there is an all in the database table. Normally i would just get rid of it but it would void out all of those posts with the region selected as all. What i need to do is hide or get rid of that all without hurting the web site. Is there any way to do that? here is my code:
Hide Php Code
I have a webserver which some user have their own accounts on. I want to provide the users with some public classes which they may use use when they are making there own php code placed in their own directories. I want the code to be accessable via an interface (like h-files in c) but I do not want my code to be viewable to the users which are using my classes. Very much like a library or something. How do I make php code which are hidden but are free to use by my users with a defined interface against my classes?
Hide A Page?
Is there anyway to hide a page in php? Example: I make a page called test.php It is public (on a navigation menu, etc) I don't want the real content to show up Instead, maybe a message, like "This page is currently getting a revamp" or "This page is down due to [reason here]"
HIDE Errors?
I used a show error code once, can't remember which, but now I've looked at my site, every error on every page is showing, including undefined variable errors (partly because they're defined by forms on that page). So how do I hide all errors?
Myspace Hide All
this is the code to hide everything on myspace. i want to hide everything but the default picture. does any one know how to change it so only the default picture will show up and thats it. Code:
Hide In Browser
using include ('mypage.php') want to know how i can include this page on another page but not display mypage.php in the web browser, but want all the code from mypage.php to be visible in the source code for the web crawlers.
Hide The Address?
Is there anything I can write into my php page that will make it so the user only sees the www.domain.com rather than www.domain.com/foo.php ?
Can You Hide Your Website From An IP?
I am getting traffic from india and they just spam the crap out of me, asking for link exchanges and stuff. I also they just use up my bandwidth because my product is only for canada and the USA.
Hide Region
I have a page that can be accessed by two differnet urls - what I would like to do is hide a link when coming from the second url can anyone point me in the roght diection?
Hide PHP Code On Server
I was wondering whether there was any FREE technology for hiding/encrypting PHP code on the server - such that server administrators cannot look at it and perhaps distribute it. I am aware of "turck mmcache" which looks brilliant. The thing is - boy is it complicated to set up and this complication does not lend itself well to my being on a virtual server where I do not have extensive admin permissions. Does anyone know a solution more appropriate for PHP code on a virtual server (apache)?
Hide Php File Extention
I noticed on most sites, there are no file extentions. Just urls like mydomain.com/action?something&result=this and there is no file extention. An example of this is digg.com. I know its a php site but theres no file extention to be found. At first i was thinking they used mod_rewrite to get rid of the file extention, but i dont think that anymore.
Hide Javascript Source Using Php
I was thinking about using php to write the script file, something like: <script type="text/javascript" src="http://insert_url_here.com/myScript.php"></script> The php file then echo'ing the source code. If that works then how can I stop the php file being loaded directly, that is the user browsing to http://insert_url_here.com/myScript.php and seeing the source. I only want it to write the source when it is called through the script.
How Can I Hide A Title Bar In A Nw Window.
I am oening a new window from javascript function window.open('imgShow.php','ImageName', 'width=100,height=100,titlebar=no, screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + y); I added titlebar=no Still its showing titlebar. I want to hide title bar as well as minimise and close option. I want no border to HTML page. Can anyone suggest me what are the possible options to do this. I have a grid of picture and on mouseover i want to show big image over it.
HIDE LINK In Status Bar !
Kind of Javascript, but here you go: <a href="http://www.page.com" onMouseOver="window.status='Whatever you Want'return true;" onMouseOut="window.status=''return true;">Put your mouse over here.</a>
Hide Mysql_pconnect Password
mysql_pconnect("localhost","user","password") Is there a way so that password will not be text? So someone looking at the file would not be able to know the password?
How To Hide The Document Path
this is my root document path include_once ("C:/wwwroot/user/oneadmin/config.php" can it possible to trace the path of my root document by php functions and if then how to hide the path of root document..
Hide Specific Text
I was wondering whteher anybody knows a code to hide a specific text on a site which u cannot control. For Example, i am currently with a free hosting provider, and they put a simple text on my site saying "Free Web Hosting by something" Is there a way to hide this?. It is not on my actual coding for the page therefore i cannot remove it. I thought there might be a way to block this text or something. It can be a code of any sort like php, html, asp or whatever. I just need to hide this.
Show / Hide Text
I am looking for a way to be able to hide some text that is being pulled from a database. For example If I have the following text being pulled out of a database onto my website, I want a way to be able to hide like the third paragraph on and replace that with a morre button than when a user clicks the more button it reveals the rest of the text:
How To Auto Hide Control When Fullscreen?
I need some help for one critical problem. I need that when someone visit my site then my home page will be fullscreen automatically along with autohide. I have done fullscreen but not able to do auto hide.
How To Hide 'hidden' Form Field?
I am sending the user's password in form's hidden field as Code: <input type=hidden name="studen_pass" value="readfromdatabase"> but i dont want anyone to read it via watching its source code. is there any trick to hide it with php so that no one can read the password hidden field value by watching page's source code.
Hide Password Input In CLI PHP Script?
I have a command line PHP script that logs into a network service with a user name specified on the command line. The script then prompts for a password. Currently the password is echoed on the screen/terminal as it is typed. Is it possible to stop the password being echoed on the command line while it is typed? Or perhaps just print asterix's instead of the literal characters? A few details: platform is Linux, PHP version is 4.3.9.
Show/Hide Portion Of Text
I want to have a webpage with some biographies. The bio's are stored in an mysql table and read from Php. The thing is that I am trying to do the usual show/hide more text link and I don't know where to post such a message! I don't want to leave the current page, I just want to have the first 5 lines of text,with a more option at the end that when clicked shows the rest of the text. This for every bio ( thats not a problem, a while loop will do it) So what to use and how? Javascript? Css? I don't know so well those stuff so any help will be great.
How Do I Hide My Google Analytics Code?
I want to be able to "hide" my Google Analytics code whenever I personally visit one of my pages... what I've been trying to do is make it so that when I type in a url like this: www.mysite.com/index.php?hide=yes The page would load without the Google Analytics (and my visit would deliberately not be tracked). How do I do this? I've tried variations of the following code but always get errors...
|