[PHP] uuencode
Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? thanks Michi -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uuencode
to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uuencode
uuencode() is a function, not a process. You cannot read and write to it. It takes a string and converts it. Then use uudecode() to translate it back. it's the first time, I hear of this php-function (which version do you use). I use v4.0.6 and there isn't such a function! I only knew of the base64_encode and -_decode - function! Now, what do you REALLY want to do?? I want to save (binary) files as uuencoded-files! thanks michi to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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 -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] uuencode
Sorry...I missed it...I was thinking of urlencode(). Lack of sleep, I guess and I thougth it was my lack of sleep ;-) I would suggest doing GOOGLE search for the uuencode algorithm and coding it in PHP already done - found only a non-binary-safe coding!! thanks michi -Original Message- From: Michael Mehlmann [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:38 AM To: Rick Emery Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] uuencode uuencode() is a function, not a process. You cannot read and write to it. It takes a string and converts it. Then use uudecode() to translate it back. it's the first time, I hear of this php-function (which version do you use). I use v4.0.6 and there isn't such a function! I only knew of the base64_encode and -_decode - function! Now, what do you REALLY want to do?? I want to save (binary) files as uuencoded-files! thanks michi to convert take a look at http://www.php.net/manual/en/function.popen.php thanks, but you can only write OR read to popen() but I need to write AND read to/from uuencode!!! thanks michi IMHO M.N. --- Michael Mehlmann wrote: Hi! All I want is, to call my php with a URL in my querystring! myphp.php?URL=http my php should download the URL, uuencode it, and then return the uuencoded text! as this should be binary-safe, it thought of using the linux-included uuencode! But how to get the (perhaps large binary) file and use uuencode like uuencode input output? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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 -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] temporary image
hallo, my applications generates a html-page, with a link to an image. this image is created by the application, and should exist only temporarily - so it can be deleted after being accessed by the html-page - any ideas how to implement this? is working with timetamps (microseconds) safe for creating the image's unique name? thanks michi -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- 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] Insecurity with PHP authorization
If you don't have a very high load, then you could move all not-php-files out of htdocs-root and use a pseudo-root directory htdocs/../rawfiles as root for redirect.php. For example image.jpg is placed in htdocs/../rawfiles/images then access it with /redirect.php?/images/image.jpg ! redirect.php only checks for authorization and then does a fpassthru! that won't cost much! hth Michael Hello all I have just implemented a mySQL authorization: each html and php page checks to see whether a user is logged in by checking a cookie in the user browser. The user can log out and edit her profile (including password). If a page is called without the user being logged in, he is presented with a log in form. This works very well. There is an SSL connection to the server. Only a hash value of the password is stored in the database. However, if I directly request a graphic (or a ZIP file etc) from the site, by entering: https://www.myserver.com/photo.jpg for example, I can download that file without being logged in (naturally). In the particular *intranet* project that I am working on, this is particularly undesirable, as only personnel at the company#8217;s four locations may have access to the intranet. And there certainly will be a lot of #8216;confidential#8217; ZIP and graphic files placed on the server. I do realize that if I were to place a .htaccess file in the root of the intranet server, I could prevent the above from happening, but then I loose the advantage of having the users profile in a database, where a user can easily change her password. Allowing a web user to edit a password in the .htaccess file poses more problems than it solves, especially as it certainly could occur that more than one persons wants to edit his password simultaneously. Could anyone suggest a method to allow a user to easily edit his password, but at the same time, not allow direct access to specific non-PHP files on the intranet server? Perhaps one method would be to restrict access to the company#8217;s four gateway servers (IP addresses). However, I feel this is not to secure, and these IPs could be spoofed (and this does not really solve the problem). Any enlightenment on this subject would be well received. TIA S. _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- 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] -- Aufgepasst - jetzt viele 11 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a -- 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] urlencode/decode
this script works as expected, if you don't submit ,' and \ but if you use ,' or \ these characters will be quoted with \ '\test'\ - \\'\\test\\'\\ ? echo htmlentities($val).form method=GETinput type=text name=valinput type=submit/form; ? how to get rid of this??? I don't want any character been quoted!!! thanks michi -- Aufgepasst - jetzt viele 11 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a -- 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] how to show banners
I would like to hear your opinion: how would you organize showing banners? .) save the banners in database or filesystem? .) choose the banner in the main.php: $banner=my_random_func(); echo img src=${banner}.gif; .) or choose them in a separate script: img src=banner.php .) how to output the gif? fpassthrough ??? thanks for any hints and ideas Michael -- Aufgepasst - jetzt viele 11 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a -- 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] Problem with require(), determining context.
Hello! :) I have a script that loads another script with require() and based on the context, I'd like different things to happen. So, index.php is calling the required file require.php. And when require.php is run, if there's no HTTP_REFERER and the file is index.php, everything is OK. But if the file is accessed directly (say by GET) then I want an error to be thrown. Reason being is require.php can also accept POST operations, but I don't want it to accept GETs, because it's not supposed to be used alone. Problem is, when it's required with another file, GET is OK. So basically, I want to detect if the file is being required or called on its own. At least, that's what it sounds like I want to do from my above explanation. Any ideas how I can accomplish this? Thanks! :) I think $PHP_SELF is your friend! hth Michael -- Aufgepasst - jetzt viele 11 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a -- 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] mail - sendmail
Hi! I wanted to use the full SMTP-Protocol including MAIL FROM: and RCPT TO:, and therefore I can't use mail(). I have written a perl-script, I call from PHP, that connects to the SMTP-server directly and this worked fine - until a server went down, and my ISP's-SMTP-Server told my perl-script, that the emailaddress is not routable. If the mail had been in a mailqueue, no problem - after a few hours it would be up again! So is there a way to combine these 2 features? 1. give the mail not directly to the SMTP-Server, but to the mailqueue 2. use the full SMTP-Protocol: for example: -- MAIL FROM: [EMAIL PROTECTED] RCPT TO: [EMAIL PROTECTED] From: Newsletter [EMAIL PROTECTED] To: Newsletter-List [EMAIL PROTECTED] Subject: blabla BODY ... -- thanks Michi -- Aufgepasst - jetzt viele 11 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00736T0492a -- 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] list all included files
Hi! this is half OT :-[ I want to list all files, that are included in my script with include() or require(). I am convinced I can do this in Linux with some command, that listes all files, that have been accessed the last xxx hours or minutes or seconds ... (and this would be exactly what I need!) thanks Michi -- GMXler aufgepasst - jetzt viele 11 New WebHosting Pakete ohne Einrichtungsgebuehr + 1 Monat Grundgebuehrbefreiung! http://puretec.de/index.html?ac=OM.PU.PU003K00717T0492a -- 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] perl2php - question
Hi to all of you again!! I have a perl-script for sending a mail (don't ask - I *need* it for sending mails!). In perl I use it like: -- open(MAIL, |mail.pl); print MAIL From: \xx\@xx.com\ xx\@xx.com\n. To: \xx\@xx.com\ xx\@xx.com\n. Subject: TEST\n\n. This is the body;#[EMAIL PROTECTED] is only example close(MAIL); $error=($? 8); if ($error) { print Error: .$error.\n;} -- 1. how to do this: open(MAIL, |mail.pl); print MAIL $message; close(MAIL); 2. how to do a return-value-check (in perl I get 0 if no error, 1 if an error occured in mail.pl) tanks witty -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- GMX Tipp: Machen Sie Ihr Hobby zu Geld bei unserem Partner 11! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a