php-windows Digest 19 Jun 2001 22:18:54 -0000 Issue 618 Topics (messages 7936 through 7949): Basic Authentication 7936 by: Thomas Dedeyne 7940 by: Johan Lundqvist 7943 by: Thomas Dedeyne 7944 by: Thomas Dedeyne Re: cosine and sin in PHP on Win2K & IIS 5 7937 by: Piotr Pluciennik 7938 by: Phil Driscoll 7939 by: Gu Weidong-a1923c 7941 by: Kelvin Luck Php interact with Dreamwaver 7942 by: Jack 7945 by: Johan Lundqvist 7946 by: Clint Tredway 7947 by: Brian Paulson 7948 by: Scott RE:[PHP-WIN] Php interact with Dreamwaver 7949 by: Brian Paulson Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Hello, I have a folder with some restrictions on. Now I want to give some people access to this folder and some not from within my webpage. When I use basic authentication, I get a window where I can enter my username and password. That's OK, for a bit. :) I want to get rid of that window and give my username and password via php code, so I don't get or see that window anymore. I hope you know what I mean :). I use Win2k with IIS5. Thanx for the help! Greetz
Hi, You could use fopen and read the file n then parse it to the reader. $fp = fopen ("http://username:[EMAIL PROTECTED]/folder/file.html", "r"); Have a closer look at fopen() and the "Filesystem" section in PHP manual. Just a warning: Be very, VERY careful when dealing with usernames and passwords like this. They must never get exposed in anyway. Your most dirty mind just can't imagine what people end up doing with it... /Johan Thomas Dedeyne wrote: > > Hello, > > I have a folder with some restrictions on. Now I want to give some people > access to this folder and some not from within my webpage. When I use basic > authentication, I get a window where I can enter my username and password. > That's OK, for a bit. :) I want to get rid of that window and give my > username and password via php code, so I don't get or see that window > anymore. I hope you know what I mean :). > I use Win2k with IIS5. > > Thanx for the help! > > Greetz > > -- > PHP Windows 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]
Thanks for the help, but in fact I don't use authentication to open a file, but I use it for writing in a folder. So, people who are logged in get write access, other people (who are not logged in) can only view the folder. But I'll give it a try with your suggestion. :) Thanks again. "Johan Lundqvist" <[EMAIL PROTECTED]> schreef in bericht [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > You could use fopen and read the file n then parse it to the reader. > > $fp = fopen > ("http://username:[EMAIL PROTECTED]/folder/file.html", "r"); > > Have a closer look at fopen() and the "Filesystem" section in PHP > manual. > > Just a warning: Be very, VERY careful when dealing with usernames and > passwords like this. They must never get exposed in anyway. Your most > dirty mind just can't imagine what people end up doing with it... > > /Johan > > Thomas Dedeyne wrote: > > > > Hello, > > > > I have a folder with some restrictions on. Now I want to give some people > > access to this folder and some not from within my webpage. When I use basic > > authentication, I get a window where I can enter my username and password. > > That's OK, for a bit. :) I want to get rid of that window and give my > > username and password via php code, so I don't get or see that window > > anymore. I hope you know what I mean :). > > I use Win2k with IIS5. > > > > Thanx for the help! > > > > Greetz > > > > -- > > PHP Windows 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 Windows 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] >
What you say, works when I enter it in the explorer address bar! When I do a redirect using PHP like this: header('Location: http://user1:[EMAIL PROTECTED]/restricted/'); I have to enter a username and password in that little window :). ""Thomas Dedeyne"" <[EMAIL PROTECTED]> schreef in bericht 9gnhh0$4ps$[EMAIL PROTECTED]">news:9gnhh0$4ps$[EMAIL PROTECTED]... > Hello, > > I have a folder with some restrictions on. Now I want to give some people > access to this folder and some not from within my webpage. When I use basic > authentication, I get a window where I can enter my username and password. > That's OK, for a bit. :) I want to get rid of that window and give my > username and password via php code, so I don't get or see that window > anymore. I hope you know what I mean :). > I use Win2k with IIS5. > > Thanx for the help! > > Greetz > > > > -- > PHP Windows 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] >
Hi, use arguments of trigonometric functions in radians, not degrees. Everything is ok in your example. Put as an argument for example pi/2... it will work. Greetings Piotr --- Bradley J Bristow-Stagg <[EMAIL PROTECTED]> wrote: > Hey guys, > I am currently dabbling in a little graphics > generation with gd_lib in PHP > on my Win2K box with IIS 5. Up until now I have had > ZERO problems and am > really loving working with PHP. My problem then? > Well I am rotating a > polygon around a point and PHP is not giving me > correct values for cos() and > sine().. Some sample code and values follow: > > <code> > print "cos:".cos(270); > print "sine:".sine(270); > </code> > <display> > cos:0.9843819506325 > sin:-0.17604594647121 > </display> > > What's wrong with this picture? Well using my > trusty scientific > calculator (from the ol' school days) I get: > cosine(270) = 0 > sine(270) = -1 > > Without getting correct values for the sine and > cosine the rotation > equations do some really funky stuff =). So what do > I do now? > > Regards > > Bradley J Bristow-Stagg > /------------------------------------------------------------------------\ > > \ "Luminous beings are we.. not this crude matter" - > Yoda / > > / "The earth is but ONE country and Mankind it's > citizens" - Baha'u'llah \ > > \------------------------------------------------------------------------/ > > / www: http://www.staggmatrix.f2s.com | ICQ#: > 8618833 \ > > \------------------------------------------------------------------------/ > > > > > -- > PHP Windows 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] > ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
PHP, like every other programming language I have ever come across, uses radians for its trig functions. you need 3*pi/2 for 270 degrees see deg2rad and rad2deg in the manual. Cheers -- Phil Driscoll
Use cos(270/360*2*pi()) instead of cos(270). -----Original Message----- From: Bradley J Bristow-Stagg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 1:16 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] cosine and sin in PHP on Win2K & IIS 5 Hey guys, I am currently dabbling in a little graphics generation with gd_lib in PHP on my Win2K box with IIS 5. Up until now I have had ZERO problems and am really loving working with PHP. My problem then? Well I am rotating a polygon around a point and PHP is not giving me correct values for cos() and sine().. Some sample code and values follow: <code> print "cos:".cos(270); print "sine:".sine(270); </code> <display> cos:0.9843819506325 sin:-0.17604594647121 </display> What's wrong with this picture? Well using my trusty scientific calculator (from the ol' school days) I get: cosine(270) = 0 sine(270) = -1 Without getting correct values for the sine and cosine the rotation equations do some really funky stuff =). So what do I do now? Regards Bradley J Bristow-Stagg /------------------------------------------------------------------------\ \ "Luminous beings are we.. not this crude matter" - Yoda / / "The earth is but ONE country and Mankind it's citizens" - Baha'u'llah \ \------------------------------------------------------------------------/ / www: http://www.staggmatrix.f2s.com | ICQ#: 8618833 \ \------------------------------------------------------------------------/ -- PHP Windows 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]
Hi, your problem is probably because php expects your angle to be expressed in radians and you are expressing it in degrees... To covert you can use these equations: degrees=radians*(180/PI) radians=degrees*(PI/180) hth, Kelvin. -----Original Message----- From: Bradley J Bristow-Stagg [mailto:[EMAIL PROTECTED]] Sent: 19 June 2001 06:16 To: [EMAIL PROTECTED] Subject: [PHP-WIN] cosine and sin in PHP on Win2K & IIS 5 Hey guys, I am currently dabbling in a little graphics generation with gd_lib in PHP on my Win2K box with IIS 5. Up until now I have had ZERO problems and am really loving working with PHP. My problem then? Well I am rotating a polygon around a point and PHP is not giving me correct values for cos() and sine().. Some sample code and values follow: <code> print "cos:".cos(270); print "sine:".sine(270); </code> <display> cos:0.9843819506325 sin:-0.17604594647121 </display> What's wrong with this picture? Well using my trusty scientific calculator (from the ol' school days) I get: cosine(270) = 0 sine(270) = -1 Without getting correct values for the sine and cosine the rotation equations do some really funky stuff =). So what do I do now? Regards Bradley J Bristow-Stagg /------------------------------------------------------------------------\ \ "Luminous beings are we.. not this crude matter" - Yoda / / "The earth is but ONE country and Mankind it's citizens" - Baha'u'llah \ \------------------------------------------------------------------------/ / www: http://www.staggmatrix.f2s.com | ICQ#: 8618833 \ \------------------------------------------------------------------------/ -- PHP Windows 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]
Dear All I'm fresh on the php, but i just want to ask what should i do to let my existing Dreamwaver Made homepage to interact with Php, which means i had used dreamwave to draw the layout, using firework for the image, then i want to provide some function for the user like forms input, which i knew php can handle these things well, so i want to let the php to interact with the Dreamwaver! Is there anything i got to set on the Dreamwaver or the php side? Thx -- Jack [EMAIL PROTECTED]
Hi Jack, Jack wrote: > > I'm fresh on the php, but i just want to ask what should i do to let my > existing Dreamwaver Made homepage to interact with Php, which means i had > used dreamwave to draw the layout, using firework for the image, then i want > to provide some function for the user like forms input, which i knew php can > handle these things well, so i want to let the php to interact with the > Dreamwaver! > > Is there anything i got to set on the Dreamwaver or the php side? > If having to set anything, it's on the Dreamwaver side. A look at: http://www.macromedia.com/support/dreamweaver/ts/documents/comment_php_code.htm will perhaps give you some hints... If you also have a looksie at: http://www.macromedia.com/exchange/dreamweaver/ you will learn that DreamWeaver can be extended with extensions. Just type "php" in the "Search Extensions" box and hit "GO", and there you are... /Johan
You need to use a text based editor to add the php to your pages. Dreamweaver may not like your PHP code. ---------- Original Message ---------------------------------- From: "Jack" <[EMAIL PROTECTED]> Date: Tue, 19 Jun 2001 18:45:00 +0800 Dear All I'm fresh on the php, but i just want to ask what should i do to let my existing Dreamwaver Made homepage to interact with Php, which means i had used dreamwave to draw the layout, using firework for the image, then i want to provide some function for the user like forms input, which i knew php can handle these things well, so i want to let the php to interact with the Dreamwaver! Is there anything i got to set on the Dreamwaver or the php side? Thx -- Jack [EMAIL PROTECTED] -- PHP Windows 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]
Yep http://www.interakt.ro/ (php server model for Dreamweaver4-Ultra dev) This will make you a very happy person. Used it on a few projects and works great. You might also go look around the extensions area at macromdia there is some php stuff in there that is worth getting as well. Thank You Brian Paulson Sr. Web Developer [EMAIL PROTECTED] The Pueblo Chieftain www.chieftain.com 1-800-279-6397 -----Original Message----- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 4:45 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Php interact with Dreamwaver Dear All I'm fresh on the php, but i just want to ask what should i do to let my existing Dreamwaver Made homepage to interact with Php, which means i had used dreamwave to draw the layout, using firework for the image, then i want to provide some function for the user like forms input, which i knew php can handle these things well, so i want to let the php to interact with the Dreamwaver! Is there anything i got to set on the Dreamwaver or the php side? Thx -- Jack [EMAIL PROTECTED] -- PHP Windows 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]
What version of Dreamweaver are you using? Usually Dreamweaver will leave your code alone. I think Dreamweaver 3 and 4 will both open PHP files with no trouble. It will NOT write PHP code for you though. I can tell you that I have used Dreamwever to modify the layouts on a PHP page and have never had trouble with it messing with the code. At 06:45 PM 6/19/2001 +0800, Jack wrote: >Dear All >I'm fresh on the php, but i just want to ask what should i do to let my >existing Dreamwaver Made homepage to interact with Php, which means i had >used dreamwave to draw the layout, using firework for the image, then i want >to provide some function for the user like forms input, which i knew php can >handle these things well, so i want to let the php to interact with the >Dreamwaver! > >Is there anything i got to set on the Dreamwaver or the php side? > >Thx > >-- >Jack >[EMAIL PROTECTED] > > > >-- >PHP Windows 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]
Yep http://www.interakt.ro/ (php server model for Dreamweaver4-Ultra dev) This will make you a very happy person. Used it on a few projects and works great. You might also go look around the extensions area at macromedia there is some php stuff in there that is worth getting as well. Thank You Brian Paulson Sr. Web Developer [EMAIL PROTECTED] The Pueblo Chieftain www.chieftain.com 1-800-279-6397 -----Original Message----- From: Jack [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 19, 2001 4:45 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Php interact with Dreamwaver Dear All I'm fresh on the php, but i just want to ask what should i do to let my existing Dreamwaver Made homepage to interact with Php, which means i had used dreamwave to draw the layout, using firework for the image, then i want to provide some function for the user like forms input, which i knew php can handle these things well, so i want to let the php to interact with the Dreamwaver! Is there anything i got to set on the Dreamwaver or the php side? Thx -- Jack [EMAIL PROTECTED] -- PHP Windows 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]