Jump to content

swestfield

New Members
  • Posts

    5
  • Joined

  • Last visited

swestfield's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the assistance. With the . before the =, I get the same thing. I will keep researching. Thanks
  2. OrionSuperman, Thanks for the assistance. When I ran your suggested code, this is what I got via text: carrier=verizon&message=bvcv&Submit=Submit Content-Type: image/jpg; name="picture.jpg" Content-Transfer-Encoding: base64 Content-disposition: attachment; file="picture.jpg" ZnJvbT0zMjEyOTIyMjkyJnRvPTMyMTI5MjIyOTImY2Fycmllcj12ZXJpem9uJm1lc3NhZ2U9YnZj diZTdWJtaXQ9U3VibWl0 --1a2a3a-- Basically it sent me everything in the quotes.
  3. I certainly do not take someone acting rudely as an insult, that would be the problem of the one being rude. Anyway, Maybe in the future you can choose to waste your (and my) time by just not responding if you are going to be a prick. Now that that's over; Being that I know very little about PHP, I did not realize that file_put_contents is a standard function. When I have programming-type issues, I have better results asking in places such as this as I find that when I RTFM, they are more geared towards those already in-the-know. I am currently looking into PHPMailer, it seems like it will do what I need once I figure it out. Question regarding AddAttachment() in PHPMailer: With the image that gets generated with the webcam snapshot php, would the code be $mail->AddAttachment($result) The attachments are going to be code generated so each one will be different.
  4. The reasoning behind my assumptions is that I am not a PHP coder and it seemed reasonable. I came here looking for some assistance, not to deal with some rude asshole who would rather make idiotic assumptions and bash people who are less knowledgeable instead of being helpful. I really hope all new members are not treated this way. Now, to anyone else: It appears that everything needed to accomplish the goal is there, I just can't figure out how to put it all together.
  5. I have a project that I am working on where I need to take a snap shot from a webcam and send it via sms. I have code to take the pic and code to send a text and they both work, but I cannot seem to combine the two to get the pic to send. I would think that adding $result here $formatted_number = $to."@vzwpix.com"; mail("$formatted_number", "SMS", "$message", "$result"); would work, but it doesn't. (I am only concerned with verizon at the moment) Here is entire php code: <?php /* JPEGCam Test Script */ /* Receives JPEG webcam submission and saves to local file. */ /* Make sure your directory has permission to write files as your web server user! */ $filename = date('YmdHis') . '.jpg'; $result = file_put_contents( $filename, file_get_contents('php://input') ); if (!$result) { print "ERROR: Failed to write data to $filename, check permissions\n"; exit(); } $url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['REQUEST_URI']) . '/' . $filename; print "$url\n"; $from = $_POST['from']; $to = $_POST['to']; $carrier = $_POST['carrier']; $message = stripslashes($_POST['message']); if ((empty($from)) || (empty($to)) || (empty($message))) { //header ("Location: sms_error.php"); } else if ($carrier == "verizon") { $formatted_number = $to."@vzwpix.com"; mail("$formatted_number", "SMS", "$message", "$result"); // Currently, the subject is set to "SMS". Feel free to change this. //header ("Location: sms_success.php"); } else if ($carrier == "tmobile") { $formatted_number = $to."@tomomail.net"; mail("$formatted_number", "SMS", "$message"); // header ("Location: sms_success.php"); } else if ($carrier == "sprint") { $formatted_number = $to."@messaging.sprintpcs.com"; mail("$formatted_number", "SMS", "$message"); //header ("Location: sms_success.php"); } else if ($carrier == "att") { $formatted_number = $to."@txt.att.net"; mail("$formatted_number", "SMS", "$file_put_contents()"); //header ("Location: sms_success.php"); } else if ($carrier == "virgin") { $formatted_number = $to."@vmobl.com"; mail("$formatted_number", "SMS", "$message"); //header ("Location: sms_success.php"); } ?> Thanks for any help. -Sean
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.