lisawebs
-
Posts
22 -
Joined
-
Last visited
Posts posted by lisawebs
-
-
After reading an existing txt file in UNICODE format,
(no problem with that)
I need to rewrite the txt file again UNICODE
(not UTF-8, to flash isn't the same thing)
I dont need to use the UNICODE stuff internally,
I just need to set something to the written file
keeps the originally UNICODE format.
I new previous version cannot support that
what about PHP 5?
Thanks a lot
Lisa
-
I tried two pieces of code, both WORK and deliver the emails
but hotmail recipients never receive them, not even in the junk folder.
Even adding the $from address to the hotmail address book
nothing happened, so gotta be something with the structure itself.
// all boundaries has been set to " " (blanks) $headers = 'From: ' . $fromaddress . "\n"; $headers .= 'To: ' . trim($addresses[$index]) . "\n"; $headers .= 'Return-Path: ' . $fromaddress . "\n"; $headers .= 'MIME-Version: 1.0' ."\n"; $headers .= 'Content-Type: multipart/alternative; boundary="' . $boundary . '"' . "\n\n"; $headers .= $body_simple . "\n"; $headers .= '--' . $boundary . "\n"; $headers .= 'Content-Type: text/plain; charset=ISO-8859-1' ."\n"; $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n"; $headers .= $body_plain . "\n"; $headers .= '--' . $boundary . "\n"; $headers .= 'Content-Type: text/HTML; charset=ISO-8859-1' ."\n"; $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\n"; $headers .= $body_html . "\n"; $headers .= '--' . $boundary . "--\n";
this one also works (but neither hoitmail friendly)
$headers = "From: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol; $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol; $headers .= "MIME-Version: 1.0" . "\r\n"; $headers .= "X-Mailer: PHP v".phpversion().$eol.$eol;
Thanks
-
Particularly Hotmail seems to dislike
messages sent through mail()
Is there any other procedure to sent emails through php?
What kind of info we could place in the headers for msgs to be accepted.
Can we remove the x-PHP info placed on msg headers
(in case this is the main reason for servers discard the msg)
-
Main solution was using the trim()
The only problem with this code is
the @hotmail.com addresses are not receiving emails
(not even as junk)
Yahoo and other mails are receiving normaly
So I'll open a new issue about how to control the
mail() info/headers to allow messages be accepted.
Thanks to everyone!!!
<? $addresses = file("data/lista.lst"); for ($index=0; $index < count($addresses); $index++) { $subject = 'the subject'; $message = 'hello'; $headers = 'From: lisawebs@yahoo.com' . "\r\n" . 'Reply-To: lisawebs@yahoo.com' . "\r\n"; if (mail(trim($addresses[$index]), $subject, $message, $headers)) echo "yes"; else echo "no"; }
-
On code above,
when the $to variable is set to "anyemail@domain.com"
it works, msg is sent.
But doing
$to = $addresses[$index];
it never works, no matter how I write it (with "", with (), etc)
the echo is right, it shows the right email,
but the
if (mail()...
returns false... so what is this???
a) could be a var type issue?
b) is it possible the server understand
the emails comes from an array and discard them?
-
None of the code hints worked,
I'm lost...
-
this last code works,
when I use $addresses[$index] seems that nothing is passed
again I dont know what's wrong here
<html><head><title>sending....</title></head><body> <? $addresses = file("data/lista.lst"); for ($index=0; $index < count($addresses); $index++) { $to = "$addresses[$index]"; $subject = 'the subject'; $message = 'hello'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers);} ?> Your message was sent! <br><br> <a href="index.php3">Home</a>. </body></html>
-
thanks, but is this EXPLODE() a php4 function??? or later
because isnt working, gives error...
-
no, the lista.lst file contains only one email address per line,
there are no such separators... this is strange,
if there's no error msg then maybe the problem isnt in php
but on the server, but where?
Maybe the question is
what in a server can prevent these emails to be sent...
because the mail system in general is working fine,
besides, I've just received an email from another php program
running in my server ?????? I'm lost!!
-
the email issue with php when a visitor input an address works fine,
the problem is in the loop to send an email to each address on the list.
-
I have a set of codes to manage a simple mail list,
everything's fine, except for this piece to send an email to each address,
I can't figure out why this is not working,
it doesn't give an error, but no emails are sent
<html><head><title>sending....</title></head><body> <? $addresses = file("data/lista.lst"); for ($index=0; $index < count($addresses); $index++) { $Email = "$addresses[$index]"; mail("$Email","Welcome...","text here","From: IN21\nReply-To: alex@usa21.net"); } ?> Your message was sent! <br><br> <a href="index.php3">Home</a>. </body></html> the file lista.lst has only this inside: alexvvv@hotmail.com|lisawebs@yahoo.com|
thanks!
lisawebs@yahoo.com
-
there are 2 email addresses on lista.lst
but the emails are never sent, but no error,
why is this?
<html><head><title>Updating file....</title></head><body> <? $addresses = file("data/lista.lst"); for ($index=0; $index < count($addresses); $index++) { mail("$addresses[$index]","Welcome...","text here","From: IN21\nReply-To: alex@usa21.net"); } ?> Your message was sent! <br><br> <a href="index.php3">Home</a>. </body></html>
-
I'm looking for the easiest/free mail list program
to let site visitors store their emails
and then use the email list to send message to everyone.
It has to use Mysql server (I guess)
or is there something that works on a simple txt file?
-
I dont see any errors,
I'm lost, it should be easier!
Lisa
-
Hi, I got a problem
on windows web servers when trying to use text files in UNICODE
instead of ANSI.
Do you know how to use/display this text files
as in Linux web servers?
Beacuse when using locally in Windows xp has no problem.
Thanks
Lisa
lisawebs@yahoo.com
Not sure how to easily do this in php, BUT if your .php scripts run on a Linux/*nix machine (I see it's windows based in the code -- however, don't know if windows cmd line can perform the following), you can use *nix's grep -A NUM syntax from the exec() function. the -A NUM tells grep to display (or pipe) all of the text after a certain line. There is a windows version of grep, http://www.wingrep.com/download.htm. With that installed you can prepare the file before trying to read it into php with AT/CRON jobs and then do your thing in php.
Now, if you solely want to use php, then you're going to have to store the file into an array of some sorts (maybe) and then parse out only the data you need. Maybe something I've provided will help, maybe not... ;-)
ps: the exec() function can be ref'd here: http://us2.php.net/function.exec
-
Hi, I'm using this to upload a file
but doesnt work,
the php part simply do nothing.
PAGE 1
<html><body>
<form enctype="multipart/form-data" action="http://www.usa21.net/testupload.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="80000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="send file">
</form></body></html>
PAGE 2 php
<html><body>this is the php<br>
<?php
$uploaddir = '';
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
print "<pre>";
if ($_FILES['userfile']['size'] > 80000)
print "file too big";
else if ($_FILES['userfile']['type'] != "image/jpg)
print "file isnt a JPG format"
else if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir . $_FILES['userfile']['name'])) {
print "file was uploaded:\n";
print_r($_FILES);
} else {
print "unable to complete operation:\n";
print_r($_FILES);
}
print "</pre>";
?>
</body></html>
-
I want to to know if the visitor to a page
is using dial up conn. or anything better (as broadband)
to redirect him to one page or another.
Can I use php to know this?
Thanks, Lisa
lisawebs@yahoo.com -
Hi can you explain me how to convert an avi video into a wmv,
is just to run the converter in the server background?
How can I do this?
What converter do you use?
Thanks, Lisa.
lisawebs@yahoo.com
[quote author=SDraconis link=topic=108192.msg435776#msg435776 date=1158447787]
I am not really familiar with media-convert.com, but I have made a page before where users can submit video clips and my site converts them into Windows Media. I don't think you can do this using just a PHP script. Our solution was to have the server run an encoder program in the background.
[/quote] -
Hi there, will you share with me your script to upload videos?
I'm comitted to share any improvement and GUI that I'll develop
around this.
Thanks, Lisa, lisawebs@yahoo.com
-
Can you help me on a method to prevent video files
to be cached (copied) into the Internet temp file?
This is to protect content.
Thanks, Lisa
lisawebs@yahoo.com
[quote author=gmwebs link=topic=111377.msg451296#msg451296 date=1160734788]
I may be missing the point completely here (wouldn't be the first time) but surely you could just supply the full path to the file you wish to delete? Have a look at some snippets below. I know it can be done in one line, but I am using these variables elsewhere in the script.
[code]
// Set the temp directory relative to the executing script
$temp_dir = "../tmp";
// Set the filename suffix to a UNIX timestamp
$filename = time();
// Assign the full path to the file to a variable
$tempfile = $temp_dir."/tmp_".$filename;
// Delete the temporary file
unlink($tempfile);
[/code]
HTH
[/quote] -
I've seen that videos in Yahoo or Youtube
are not been cached or copied on the Internet temp folder.
Can PHP help on this?
Is there a good/stable hosting service somewhere?
in Applications
Posted
Where ? Please! I have 50 php websites and many problems with several hosting services
NOT about performance,
but for issues regarding miss-maintenance and basic configuration on the server,
basically a poor service, either for one site or 50.
Thanks!