看板 PHP 關於我們 聯絡資訊
請問各位前輩 小妹這幾天試了擷取網頁並寄出電子報http://ppt.cc/G!ft 以yahoo為例,有些專欄還是無法顯示 並且寄出電子報後,css似乎沒有套用進去>"< 我的程式是 $url="http://tw.yahoo.com"; $contents = file_get_contents($url); $headers="From: hsiang.showp@gmail.com\n"; $headers.="MIME-Version: 1.0\n"; $headers.="Content-Type:text/html;charset=utf-8\n"; $headers.="Content-Transfer-Encoding: 8bit\n"; $headers.="Bcc: hsiang.showp@gmail.com"; mail('hsiang.showp@gmail.com', 'epaper_test', $contents,$headers); 不曉得哪邊還需要修正,煩請各位前輩指點>"< -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.125.76.84
kerash:回傳是檔案內容,所以如果不是 inline-css 就讀不到 04/24 16:35
kerash:除非你有CSS檔案,預先把他引入你這個 mail 檔案 04/24 16:36
kerash:這樣取出 contents 就會把CSS吃進去了,但我不確定你這樣 04/24 16:36
kerash:用send會不會接收到(我認為是不會..) 04/24 16:37
mervynW:一定不會. 04/24 17:42
shadowjohn:gmail的web會把style、link都消除,就如同一樓說的 04/25 00:03
shadowjohn:用phpQuery 硬把那些style塞回,的確可很勉強的維持... 04/25 00:04
shadowjohn:http://3wa.tw/mypaper_new/index.php?id=11 勉強 04/25 00:04
shadowjohn:http://3wa.tw/mypaper_new/index.php?id=12 處理前 04/25 00:06
shadowjohn:要弄的更清楚就得下苦工~也許作的到啦XD~應該很花時間 04/25 00:07
shadowjohn:http://3wa.tw/mypaper_new/index.php?id=13 軟體收信 04/25 00:10
mervynW:css 再不同收信程式處理程度也不同. 04/25 11:06