Re: [PHP] is there a way to track downloads
On Sun, 23 Jun 2002, Kevin J wrote: > Hey all, > > I would like to place some files on my site and use PHP to track how many > users have downloaded those files. > > Is this possible? Approach the problem logically: 1) You have a series of files that you want people to download. 2) You want to track which files are downloaded. 3) You don't want people accessing the files directly. So, a file called download.php. Accepts a parameter - the file name to make available. Logs an entry of IP and file (and whatever else) to a file / database / whatever. Makes the file available to the user - but the path is hidden / created on the fly so that a particular file cannot be pulled without going through the script. The actual code is left as an excercise for the reader. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there a way to track downloads
Hello, My fault, I didn't state that i was a complete Newbie to PHP. I am looking at scripts and realize that I need to use a database for this, etc... so I am just gonna forget the whole thing. Thanks anyways Kevin J "Duncan Hill" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Sun, 23 Jun 2002, Kevin J wrote: > > > Hey all, > > > > I would like to place some files on my site and use PHP to track how many > > users have downloaded those files. > > > > Is this possible? > > Approach the problem logically: > > 1) You have a series of files that you want people to download. > 2) You want to track which files are downloaded. > 3) You don't want people accessing the files directly. > > So, a file called download.php. > Accepts a parameter - the file name to make available. > Logs an entry of IP and file (and whatever else) to a file / database / > whatever. > Makes the file available to the user - but the path is hidden / created on > the fly so that a particular file cannot be pulled without going through the > script. > > The actual code is left as an excercise for the reader. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there a way to track downloads
i have a opensource redirect script that can easily be adapted to track downloads - just need to replace a absolute url for a file name. check it out at http://user:[EMAIL PROTECTED]/lab cheers Henry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to keep variables between php scrits ?
On Thu, May 30, 2002 at 03:55:47PM +0200, Anne Le Bot wrote: > I need to keep the values of variables from one php page to another : is > there a way to do this ? Three options: sessions pass the values in hidden fields of a form pass them in the query strings of hyperlinks --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is there a way to set apache's auth_user from php?
> I would like to have the authenticated user name > appear in my apache access web logs but I am not using > HTTP authentication. I am using phplib to have better > control over the authentication process. > Is there a way to set this apache api variable > from php code so that apache will log these user names? I think not. That variable is sent/set by the *browser* to Apache on each URL request. What you *could* do is log stuff yourself from PHP using http://php.net/error-log You could log the time, their IP, and their user_agent using that, and then later mix-and-match those entries with Apache entries to figure out who asked for what. For that matter, you could turn off Apache logging, and use PHP's to log everything you need. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is there a way to get the content type with php
On Fri, 1 Feb 2002 12:37:24 +0100, you wrote: >Hi all > >i have a skript that sends out various files after versifying tat the >user is authenticated. >can i determine the content type of a file with php? like using it on >pdf and it return >applicatin/pdf etc? That information is in $APACHE/conf/mime.types I'm not certain how you'd get it out though. Parse the file? You'd miss any that had been added with Apache's AddType directive. djo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there a way to put a scroll in a table ???
Hello Sir, Thanks for your response, but my problem is I have a main form, from which I get the user's input(i.e user can select the start date and end date), using these date I have to fetch records from the tables. If I use frames, then how to send the prameters from main form to other three scripts, I tried this before but I'am not able to get the arguments in the frames file. I don't want to use Java Applet. I have to do this with PHP and HTML, If there is a way to send a value to three different file at a time then that would be great. If possible please send me some samples. > Heck I would probably suggest using frames. You could even get pretty slick > with it by going with iFrames for IE and frames for Netscape. Of course > there is the other option of using a Java Applet... > > There are what first occured to me, Im sure there are plenty more options > out there if I where to give it some concreate thought. > > > > - Original Message - > From: "J.F.Kishor" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, February 26, 2002 12:21 AM > Subject: [PHP] Is there a way to put a scroll in a table ??? > > > > Hi all, > > > > I'am breaking my head by trying to put a scroll in a table, > > my problem is, using php 'am trying to display a report and the report > > should have three tables, data to display are taken from three different > > tables and number of rows returned are three different values, the number > > of rows returned may be 10, 100 or more then 100, since I have to show > > all three table in a single form, I have decided to display five rows in > > each table, so I need to put a scroll in all the tables through which the > > user could scroll till the last records. > > > > 1. Is there any other solution to solve it out ? > > 2. Is there a way to put a scroll in a table ? > > > > I tried using layers and its working fine in Internet explorer, and in > > Netscape the scroll does'nt work. > > > > I kindly request you, to help me out in this problem. > > > > Thanks in adv.. > > > > - JFK > > kishor > > Nilgiri Networks > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- - JFK kishor Nilgiri Networks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is there a way to put a scroll in a table ???
J.F.Kishor wrote: >1. Is there any other solution to solve it out ? >2. Is there a way to put a scroll in a table ? > >I tried using layers and its working fine in Internet explorer, and in >Netscape the scroll does'nt work. > Try using iframes - they are supported in IE, Netscape 6 / Mozilla and Opera - however they won't work in Netscape 4. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is there a way not to pop up the default login window?
Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a way not to pop up the default login window? If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is there a way not to pop up the default login window?
Thanks for the suggestion. I think I didn't explain it clearly, what I really want to do is: whenever someone types any of the secured URL (it might be any secured php page or other files), how can we configure the server to automatically redirect to a customized PHP login page instead of popping up the default login window? Regards. -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 11:36 AM To: 'Zhu George-CZZ010'; [EMAIL PROTECTED] Subject: RE: [PHP] Is there a way not to pop up the default login window? Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a way not to pop up the default login window? If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is there a way not to pop up the default login window?
if (!isset ($PHP_AUTH_USER)) { header ("Location: http://mydomain.com/mypage";); } would probably do the trick Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:51 To: Jon Haworth; [EMAIL PROTECTED] Subject: RE: [PHP] Is there a way not to pop up the default login window? Thanks for the suggestion. I think I didn't explain it clearly, what I really want to do is: whenever someone types any of the secured URL (it might be any secured php page or other files), how can we configure the server to automatically redirect to a customized PHP login page instead of popping up the default login window? Regards. -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 01, 2001 11:36 AM To: 'Zhu George-CZZ010'; [EMAIL PROTECTED] Subject: RE: [PHP] Is there a way not to pop up the default login window? Yep. Design your own form, and feed the data from that to $PHP_AUTH_USER and $PHP_AUTH_PW. Don't send the header() for the 403. Cheers Jon -Original Message- From: Zhu George-CZZ010 [mailto:[EMAIL PROTECTED]] Sent: 01 November 2001 17:18 To: [EMAIL PROTECTED] Subject: [PHP] Is there a way not to pop up the default login window? If we are using the default Apache/PHP authentication, it will always pop up the default login window for login user ID /password. Is there a method to redirect to a customized PHP login page instead of the default pop up window? Thanks ahead. ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is there a way to call php functions in perl? and vice versa
> Is there a way to call php functions in perl? or call perl functions from > PHP codes? \n"; } if ($error){ echo "OS Error: $error. Usually path/permissions.\n"; } ?> Perl could call PHP the same way it calls anything (which I can say blithely since I have no clue how that is), but you'll need to install PHP as a stand-alone binary (aka CGI) or make Perl call wget or lynx to surf to a PHP page. [It's kinda like if you had mod_perl installed but *not* Perl itself... PHP compiled as "CGI" is akin to Perl itself. Except better, of course. :-)] -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]