I send a mp3 file download url which was taken from database and mailed to an user in php.
When the links are triggerd to users,
- some links contain “!” marks and No hyperlink is generated.
- In some of the links, download.php file is downloaded.
Note:
When i print the message sent to mail, all the links are working fine. Only the problem in mail. i checked with Yahoo, and Gmail. Both have the same problem in same files.
$this->_res['Song_Info'] contains the information of all mp3 files such as name , links and so on…
$emailto = "xxxx@yahoo.com";
$user_name = $this->_res['User_Info']['Name'];
$header = "MIME-Version: 1.0" . "\r\n";
$header.= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$header.= "From:no-reply@example.com\r\n";
header.= "Bcc: yyy@gmail.com\r\n";
$message = "<table>";
$message = $message. "<tr><th align='left' colspan='3'>Dear user</th><tr>";
$message = $message."<tr><td colspan='3'>Here is the Download links</td></tr>";
$message = $message."<tr><td colspan='3'></td></tr>";
foreach ($this->_res['Song_Info'] as $key => $value) {
$message = $message."<tr><td colspan='3'><a href='www.example.com/download.php?dlink='.trim($value['Song_Url'])."'>".trim($value['Song_Name'])."<a></td></tr>";
}
$message = $message."<tr><td colspan='3'></td></tr>";
$subject = "Download Links";
mail($emailto,$subject,$message,$header);
Thanks
Change below two lines and then check
1) $ is missing
2) String is broken
Also make sure when you run any songfile url with download.php?dlink=something it should download song. If it is not working check http://www.zubrag.com/scripts/download.php or [http://www.finalwebsites.com/forums/topic/php-file-download