[PHP] ssl
Anyone have experience with authentication on ssl connections, I have a (working) script to authenticate a user but as soon as I put it on my ssl it just stops working. -- 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] Email Attachment
This should do the trick, experiment wit hit; function mail_attachment($email, $buffer) { //subject $subject = "Testing pdf attachment.." //sender $x_sender = "F. Hertogs"; //extra (optional) headers $x_headers = "From: [EMAIL PROTECTED]\n"; $x_headers .= "PHP mailer\n"; $x_headers .= "MIME-version: 1.0\n"; //tell mail program it's multipart/mixed $x_headers .= "Content-type: multipart/mixed; "; //tell mail program what boundary looks like $x_headers .= "boundary=\"Message-Boundary\"\n"; //encoding $x_headers .= "Content-transfer-encoding: 7BIT\n"; //to prevent error in case email is empty (I only use this for testing //normally; use php or javascript to check forms before submitting if(!IsSet($email)) $email = "[EMAIL PROTECTED]"; //first boundary $body = "--Message-Boundary\n"; //start text message $body .= "Content-type: text/plain; charset=US-ASCII\n"; $body .= "Content-transfer-encoding: 7BIT\n"; $body .= "Content-description: Mail message body\n\n"; //text for message $body .= "Dear sir,\n\nHere is the requested file blabla" //end text message $body .= "\n\n--Message-Boundary\n"; //start application pdf in this example $body .= "Content-type: application/pdf name=\"attach.pdf\"\n"; $body .= "Content-Transfer-Encoding: base64\n"; $body .= "Content-disposition: attachment; filename=\"attach.pdf\"\n\n"; $enc_pdf = chunk_split(base64_encode($buffer)); $body .= $enc_pdf . "\n"; } $body .= "--Message-Boundary--\n"; //mail actual message mail($email, $subject, $body, $x_headers); } I hope this helps you. Frank. -Oorspronkelijk bericht- Van: Mauricio Sthandier [mailto:[EMAIL PROTECTED]] Verzonden: vrijdag 1 februari 2002 20:45 Aan: [EMAIL PROTECTED] Onderwerp: [PHP] Email Attachment Hello, I'm new in php development... I was wondering how can I attach a Word (.doc) Document in an email sent with the mail() function (if I can do it just with it). I know it has to see with the additional headers of the email, but I would be grateful If anyone could tell where can i go to for this specific information. I couldn't find it in PHP manual (.pdf version). Thanxs ! -- 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] ssl
James, The problem has, in my case, nothing to do with switching from SSL to non SSL. On my non SSL test machine everything works 100% but when I run the same script on a different machine with SSL it doesn't work. I think I know where the problem I'm having is coming from; My non SSL connection runs on apache with php, the SSL server is running Win2K with PHP as CGI (I am testing this soon on a cobalt; keep you posted on the issue). Please correct me if I'm wrong, but I think the CGI version of PHP doesn't support the WWW authentication method. So I'm guessing my subject was a little off. Maybe a good solution for you is creating a form on the page just before leaving SSL with the variables you want to transfer in hidden fields, and re-registering them in the non SSL environment. Frank. -Oorspronkelijk bericht- Van: James Arthur [mailto:[EMAIL PROTECTED]] Verzonden: zaterdag 9 februari 2002 22:03 Aan: Frank Hertogs Onderwerp: Re: [PHP] ssl On Friday 01 Feb 2002 22:25, Frank Hertogs wrote: > Anyone have experience with authentication on ssl connections, I have a > (working) script to authenticate a user but as soon as I put it on my > ssl it just stops working. Frank, can you elaborate a little? Are you using cookies, sessions etc? I have a problem where I send my user to a https page which allows them to enter username and password. They then get given a session cookie. When they are redirected to the non-SSL page the session variables are not transferred. Is this a little like the problem you have? Have you found a way around it yet? --jaa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help me!!!Can I use PHP to send SMS message???
Another way of doing it is thru an e-mail to sms gateway; free or paid. That way you could make a simple form and use mail(); Just a thought. Frank. -Oorspronkelijk bericht- Van: Simon Willison [mailto:[EMAIL PROTECTED]] Verzonden: donderdag 28 februari 2002 12:30 Aan: hei CC: [EMAIL PROTECTED] Onderwerp: Re: [PHP] Help me!!!Can I use PHP to send SMS message??? hei wrote: >Help me!!!Can I use PHP to send SMS message???If yes, how can I use it??? > > >(((Please e-mail the answer to me [EMAIL PROTECTED]))) > One very cheeky way of doing this would be to sign up to one of the free SMS services on the web (such as lycos mobile) and set up a PHP script that can "pretend" to be a browser, log in to your account and post a message to the "send SMS" form. You could do this using something along the lines of CURL or Snoopy (I recommend Snoopy as it doesn't require anything to be installed on your web server): http://snoopy.sourceforge.net/ You would have to figure out how the authentication scheme for your chosen web-based SMS service works (most of them use cookies). The main disadvantage is that it's a bit of a dirty hack and it would stop working if the free web service went down or changed the way its authentication / SMS form worked. Free services also tend to limit you to a certain number of messages a day. The professional alternative is to invest in some kind of web to SMS gateway, but I think that's quite an expensive option. -- 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