Re: [PHP] http header script to stimluate upload with drag and drop??

2004-11-16 Thread Robby Russell
On Tue, 2004-11-16 at 13:10 -0500, Scott Fletcher wrote:
 Hi!
 
 I wonder is is it possible to have an http header that would stimluate
 files/folders upload via dragging over to the browser window?  If so then
 what are the sample functions or scripts that make this possible...
 
 Thanks,
  Scott
 

I have a script that will stimulate you.

;-)

-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
*--- Now supporting PHP5 ---
/


signature.asc
Description: This is a digitally signed message part


Re: [PHP] http header script to stimluate upload with drag anddrop??

2004-11-16 Thread Scott Fletcher
:-)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header

2004-04-17 Thread Daniel Clark
Yes, that works.

Is the following code the best way to redirect someone to a different 
page using PHP?

?php
header(Location: http://www.yahoo.com;);
?

I looked for a redirect function of some kind and didn't come up with 
anything.  Just curious what the consensus is...




Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip]
Is the following code the best way to redirect someone to a different 
page using PHP?

?php
header(Location: http://www.yahoo.com;);
?

I looked for a redirect function of some kind and didn't come up with

anything.  Just curious what the consensus is...
[/snip]

yes

http://www.php.net/header has a good way to redirect to other pages on
your site.

header(Location: http://; . $_SERVER['HTTP_HOST']
 . dirname($_SERVER['PHP_SELF'])
 . / . $relative_url);

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header

2004-04-16 Thread Elfyn McBratney
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Gabe,

On Friday 16 Apr 2004 19:48, Gabe wrote:
 Is the following code the best way to redirect someone to a different
 page using PHP?

 ?php
 header(Location: http://www.yahoo.com;);
 ?

That's also known as breaking the back button, but is the only way to do it 
in PHP.  A better way to redirect someone (and keep the back busson working) 
is to use the meta html tag.

 I looked for a redirect function of some kind and didn't come up with
 anything.  Just curious what the consensus is...

 Thanks

Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

When I say something, I put my name next to it. -- Isaac Jaffee

 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
 ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ 
 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAgEdkaIgMKkVlSLQRAnFsAKCQVkF5SUthf+f7hH0xSwaafvW4/wCeKlK0
oQkwLFAPpT8jjkd3LD9dhvs=
=p4e2
-END PGP SIGNATURE-

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip]
That's also known as breaking the back button, but is the only way to
do it 
in PHP.  A better way to redirect someone (and keep the back busson
working) 
is to use the meta html tag.
[/snip]


How is that breaking the back button?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header

2004-04-16 Thread Chris Shiflett
--- Elfyn McBratney [EMAIL PROTECTED] wrote:
  Is the following code the best way to redirect someone to a
  different page using PHP?
 
  ?php
  header(Location: http://www.yahoo.com;);
  ?

 That's also known as breaking the back button, but is the only way
 to do it in PHP. A better way to redirect someone (and keep the back
 busson working) is to use the meta html tag.

I'm not sure what you mean by breaking the back button. I think you're
talking about when you click back and are immediately forwarded again,
which is annoying for users. This is typically the case of a Refresh
(whether HTTP header or http-equiv meta tag) set with a 0 second delay.

So, I think you've got it backward, because the Location header does not
have this problem, since the redirect is transparent to the history
mechanism.

Also, when you're using PHP, it is rare that it is going to be better to
use a meta tag to emulate an HTTP header. PHP has the header() function,
and it can set real headers.

Hope that helps.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming Fall 2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header

2004-04-16 Thread Matt Matijevich
[snip]
Also, when you're using PHP, it is rare that it is going to be better
to
use a meta tag to emulate an HTTP header. PHP has the header()
function,
and it can set real headers.
[/snip]

also, meta refreshes are easy to turn off.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] http header with target problem

2002-03-11 Thread Analysis Solutions

On Tue, Mar 12, 2002 at 08:08:25AM +0800, Michael P. Carel wrote:
 
 I have here a problem regarding auto redirecting a Frame supported page upon
 session timeout. I'm redirecting the page upon session timeout to
 header(Location:index.php?expire=0); . But i want that to redirect with a
 specified target tags with TARGET=_top to exit in the FRAME page. Any idea?

Have you tried...
   header('Window-target: _top');

By the way, the Location header really should use a complete URI, 
including the http://www...etc..., not just the file name.

Enjoy,

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] http header with target problem

2002-03-11 Thread Michael P. Carel


You mean this

header('Window-target: _top');
header(Location:index.php?expire=0);

 On Tue, Mar 12, 2002 at 08:08:25AM +0800, Michael P. Carel wrote:
 
  I have here a problem regarding auto redirecting a Frame supported page
upon
  session timeout. I'm redirecting the page upon session timeout to
  header(Location:index.php?expire=0); . But i want that to redirect
with a
  specified target tags with TARGET=_top to exit in the FRAME page. Any
idea?

 Have you tried...
header('Window-target: _top');

 By the way, the Location header really should use a complete URI,
 including the http://www...etc..., not just the file name.

 Enjoy,

 --Dan

 --
 PHP scripts that make your job easier
   http://www.analysisandsolutions.com/code/
  SQL Solution  |  Layout Solution  |  Form Solution
  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

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] http header reference

2002-02-26 Thread Rasmus Lerdorf

These are all HTTP request headers.  See the HTTP spec for details.  They
have nothing to do with PHP.

-Rasmus

On Tue, 26 Feb 2002 [EMAIL PROTECTED] wrote:

 Hi all,

 I'm debugging a php script that is using several environmental vars that I'm not 
familiar with:
 HTTP_VIA
 HTTP_CONNECTION
 HTTP_PRAGMA
 HTTP_FROM
 HTTP_RANGE
 -- Does anyone know what these are? or where I could find out about them?

 Thanks for any input,

 Sean


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] http header?

2002-02-15 Thread Rick Emery

you get get some header variable data, such as $HTTP_REFERER

execute ?php phpinfo(); ?  to determine what is available to you (differs
from system to system)

You might also iterate through $HTTP_SERVER_VARS[], $HTTP_ENV_VARS[] 

-Original Message-
From: marcbey [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 3:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] http header?


hello php guys,

how can i get the http header ?


greetings marc


--
---
magic garden GmbH - Agentur für Informationsarchitektur

Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)

www.magic-garden.de ¦ [EMAIL PROTECTED]

Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] HTTP Header

2002-02-04 Thread Mike Maltese

Just use header().

header(HTTP/1.1 200);
header(Date: Mon, 04 Feb 2002 10:01:54 GMT);
etc., etc.

Just make sure that they are all sent before you start any output to the
browser.

Mike

- Original Message -
From: Daniel Reichenbach [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Monday, February 04, 2002 2:06 AM
Subject: [PHP] HTTP Header


 Hy list :-)

 I need to manually send the HTTP header with PHP.

 The following is an example what I have to send to the client:

 HTTP/1.1 200 OK
 Date: Mon, 04 Feb 2002 10:01:54 GMT
 Server: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6
 Connection: Keep-alive, close
 Expires: Thu, 01 Dec 1994 16:00:00 GMT
 Content-Length: 1078
 Content-Type: text/plain

 How would I Do that with PHP?

 Thx,
 Daniel


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] HTTP header question.

2001-07-29 Thread Ben Bleything

All I want to do is output Authentication failed above the form if
they type in invalid credentials.  I want to do it by passing a header
that contains the same information as if there were a form submitted
that contained a field name failed and value true.  Aside from this
one application, I can think of many other places where this would be
valuable.

Am I being unclear?  It seems that my question was not understood.
Please let me know so I can try to re-explain.

Thanks,
Ben

-Original Message-
From: Dave VanAuken [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 29, 2001 7:16 PM
To: Ben Bleything; [EMAIL PROTECTED]
Subject: RE: [PHP] HTTP header question.

what is the logic behind requiring the header?

for example, to avoid using cookies and yet ensuring security, we pass a
loginkey for all pages.

every page has
include('securitycheck.php');
which parses the loginkey, uncompresses/decode it to get the userid and
timestamp, and prompts for a login if the last access was too old (say
10 min).

the security check displays the login screen if no key is available or
key is
expired, and exits, preventing display of the remainder of the page

ifthe key is valid, it updates the key for the current time (reset the
expire
counter so to speak) and displays the page iwth all URL's conyaining the
encoded
key.

you end up with one additional line of code per page (which we include
as part
of site template)

unless you are looking for something else entirely and I am missing the
point
(entirely possible).

Dave

-Original Message-
From: Ben Bleything [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 29, 2001 8:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP header question.


Hey all,

I want to craft a header such that it seems to the page that data has
been POST'ed to it... Here's the situation:  I'm writing a login page
to
my application, and if they log in incorrectly, I want the page to
redisplay, but I want it to throw out an error message.  I'm currently
doing it by

   header(Location: login.php?failure=true);

but I'd like to make it transparent.  Any ideas?

Thanks,
Ben


--
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]





-- 
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] HTTP header question.

2001-07-29 Thread Richard Baskett

The way that I did it was by using sessions which if you have a login you
are probably using anyways.  One of my session variables is message.  That
way I can pass messages back and forth to pages, reinitialize them after the
message has been received, etc etc etc.  If you REALLY want to use headers
this is what Lawrence Sheed (thanks Lawrence) sent me:

header POST /index.php3 HTTP/1.1;
header Host: $host;
header Content-type: application/x-www-form-urlencoded ;
header Content-length: . strlen ($data);
header Connection: close\n\n;  //may only need one, can't remember if
header postpends \n
//Now print variables
//var1=informationvar2=more
//for each var to submit
header $$var1=$var1$$var2=$var2;

I eventually went a different route, but he said this emulates a POST.  Good
luck.. I hope I understand and I hope it helps


 
 All I want to do is output Authentication failed above the form if
 they type in invalid credentials.  I want to do it by passing a header
 that contains the same information as if there were a form submitted
 that contained a field name failed and value true.  Aside from this
 one application, I can think of many other places where this would be
 valuable.
 
 Am I being unclear?  It seems that my question was not understood.
 Please let me know so I can try to re-explain.
 
 Thanks,
 Ben
 
 -Original Message-
 From: Dave VanAuken [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 29, 2001 7:16 PM
 To: Ben Bleything; [EMAIL PROTECTED]
 Subject: RE: [PHP] HTTP header question.
 
 what is the logic behind requiring the header?
 
 for example, to avoid using cookies and yet ensuring security, we pass a
 loginkey for all pages.
 
 every page has
 include('securitycheck.php');
 which parses the loginkey, uncompresses/decode it to get the userid and
 timestamp, and prompts for a login if the last access was too old (say
 10 min).
 
 the security check displays the login screen if no key is available or
 key is
 expired, and exits, preventing display of the remainder of the page
 
 ifthe key is valid, it updates the key for the current time (reset the
 expire
 counter so to speak) and displays the page iwth all URL's conyaining the
 encoded
 key.
 
 you end up with one additional line of code per page (which we include
 as part
 of site template)
 
 unless you are looking for something else entirely and I am missing the
 point
 (entirely possible).
 
 Dave
 
 -Original Message-
 From: Ben Bleything [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 29, 2001 8:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] HTTP header question.
 
 
 Hey all,
 
 I want to craft a header such that it seems to the page that data has
 been POST'ed to it... Here's the situation:  I'm writing a login page
 to
 my application, and if they log in incorrectly, I want the page to
 redisplay, but I want it to throw out an error message.  I'm currently
 doing it by
 
 header(Location: login.php?failure=true);
 
 but I'd like to make it transparent.  Any ideas?
 
 Thanks,
 Ben
 
 
 --
 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]
 
 
 
 
 
 -- 
 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]
 


-- 
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] HTTP header question.

2001-07-29 Thread Ben Bleything

THANK YOU.  Finally.

Unfortunately, in brief tests, I can't get it to work, but I will
continue to beat on it.  That's exactly what I was getting at.

I found some info on the internet regarding what the headers that POST
sends are... you can see it at http://opop.nols.com/write/HTTP.html.
Hope this helps everybody out.

Thanks,
Ben

-Original Message-
From: Richard Baskett [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 29, 2001 8:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] HTTP header question.

The way that I did it was by using sessions which if you have a login
you
are probably using anyways.  One of my session variables is message.
That
way I can pass messages back and forth to pages, reinitialize them after
the
message has been received, etc etc etc.  If you REALLY want to use
headers
this is what Lawrence Sheed (thanks Lawrence) sent me:

header POST /index.php3 HTTP/1.1;
header Host: $host;
header Content-type: application/x-www-form-urlencoded ;
header Content-length: . strlen ($data);
header Connection: close\n\n;  //may only need one, can't remember if
header postpends \n
//Now print variables
//var1=informationvar2=more
//for each var to submit
header $$var1=$var1$$var2=$var2;

I eventually went a different route, but he said this emulates a POST.
Good
luck.. I hope I understand and I hope it helps


 
 All I want to do is output Authentication failed above the form if
 they type in invalid credentials.  I want to do it by passing a header
 that contains the same information as if there were a form submitted
 that contained a field name failed and value true.  Aside from
this
 one application, I can think of many other places where this would be
 valuable.
 
 Am I being unclear?  It seems that my question was not understood.
 Please let me know so I can try to re-explain.
 
 Thanks,
 Ben
 
 -Original Message-
 From: Dave VanAuken [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 29, 2001 7:16 PM
 To: Ben Bleything; [EMAIL PROTECTED]
 Subject: RE: [PHP] HTTP header question.
 
 what is the logic behind requiring the header?
 
 for example, to avoid using cookies and yet ensuring security, we pass
a
 loginkey for all pages.
 
 every page has
 include('securitycheck.php');
 which parses the loginkey, uncompresses/decode it to get the userid
and
 timestamp, and prompts for a login if the last access was too old (say
 10 min).
 
 the security check displays the login screen if no key is available or
 key is
 expired, and exits, preventing display of the remainder of the page
 
 ifthe key is valid, it updates the key for the current time (reset the
 expire
 counter so to speak) and displays the page iwth all URL's conyaining
the
 encoded
 key.
 
 you end up with one additional line of code per page (which we include
 as part
 of site template)
 
 unless you are looking for something else entirely and I am missing
the
 point
 (entirely possible).
 
 Dave
 
 -Original Message-
 From: Ben Bleything [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, July 29, 2001 8:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] HTTP header question.
 
 
 Hey all,
 
 I want to craft a header such that it seems to the page that data has
 been POST'ed to it... Here's the situation:  I'm writing a login page
 to
 my application, and if they log in incorrectly, I want the page to
 redisplay, but I want it to throw out an error message.  I'm
currently
 doing it by
 
 header(Location: login.php?failure=true);
 
 but I'd like to make it transparent.  Any ideas?
 
 Thanks,
 Ben
 
 
 --
 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]
 
 
 
 
 
 -- 
 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]
 


-- 
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]


-- 
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] HTTP header question.

2001-07-29 Thread Don Read


On 30-Jul-2001 Ben Bleything wrote:
 All I want to do is output Authentication failed above the form if
 they type in invalid credentials.  I want to do it by passing a header
 that contains the same information as if there were a form submitted
 that contained a field name failed and value true.  Aside from this
 one application, I can think of many other places where this would be
 valuable.
 
 Am I being unclear?  It seems that my question was not understood.
 Please let me know so I can try to re-explain.
 

?php

$lock=tmp/REMOTE_ADDR;
if (isset ($login)) {
   if (checkuser($login, $passwd)) {
 unlink($lock);
 Header('Location: /goodguy.php');
   } else {
 touch($lock);
 Header('Location: '. $PHP_SELF);
   }
}

if (file_exists($lock)) 
echo 'Authentication failed', 'br'

unlink($lock);

// do yer form
'form method=POST ACTION=' .$PHP_SELF .'';

   input text name=login 
   input text name=passwd 

/form


Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
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] http header

2001-07-10 Thread Adrian Ciutureanu

Use $HTTP_REFERER
http://php.net/manual/en/language.variables.predefined.php

 -Original Message-
 From: Jack [mailto:[EMAIL PROTECTED]]
 Sent: 11 iulie 2001 01:23
 To: [EMAIL PROTECTED]
 Subject: [PHP] http header
 
 
 Dear all folks,
 I want to get the url of the previous page that my visitor 
 came from. Is this correct to use http_header? Or what 
 function that will help me do this job?
 Jack
 [EMAIL PROTECTED]
 Love your enemies, it will drive them nuts
 

--
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]