چگونگی خواندن مقادیری از فایل ؟

mohan21

Member
با سلام

من میخوام قسمت هایی از متن زیر رو در متغییرهای تعیین شده قرار بدم ...
نمیدونم دقیقاً چطور انجام بدم ....

میخوام محتویات (مقادیری که جلوی اونها هست) موارد زیر در متغییر های مربوطه قرار بگیرند ::

To ==> $To
Subject ==> $Subject
From ==> $From
Date ==> $Date
X-Source-Dir ==> $Text

Return-path: <[email protected]>
Envelope-to: [email protected]
Delivery-date: Mon, 28 Sep 2009 15:29:18 +0400
Received: from [110120101210101] (helo=server.Server.com)
by server3.Main.com with esmtps (TLSv1:AES256-SHA:256)
(Exim 4.69)
(envelope-from <[email protected]>)
id 1MsEPt-0007FM-Eo
for [email protected]; Mon, 28 Sep 2009 15:29:17 +0400
Received: from [110120101210101] (helo=Test.org)
by server.Server.com with esmtpa (Exim 4.69)
(envelope-from <[email protected]>)
id 1Ms9cw-0005HT-Cz
for [email protected]; Mon, 28 Sep 2009 01:22:26 -0500
To: [email protected]
Subject: Web Site
Message-ID: <[email protected]>
Date: Mon, 28 Sep 2009 01:13:07 -0500
From: "Test" <[email protected]>
Reply-To: [email protected]
MIME-Version: 1.0
X-Mailer-LID: 8,9,10
List-Unsubscribe: <http://Test.org/unsubscribe.php?M=18471&C=8f19b981608117cacc653be7f7b8d679&L=10&N=13>
X-Mailer-SID: 13
X-Mailer-Sent-By: 1
Content-Type: multipart/alternative; charset="UTF-8"; boundary="b1_d63f4ccda3d51edb790822c4700c4dfc"
Content-Transfer-Encoding: 8bit
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.Server.com
X-AntiAbuse: Original DoTest - mysite.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address DoTest - Test.org
X-Source:
X-Source-Args:
X-Source-Dir:

--b1_d63f4ccda3d51edb790822c4700c4dfc
Content-Type: text/plain; format=flowed; charset="UTF-8"
Content-Transfer-Encoding: 8bit

Hello,

Your email client cannot read this email.
To view it online, please go here: www.Test.com


--b1_d63f4ccda3d51edb790822c4700c4dfc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: 8bit

<html><head></head><body><div style="text-align: center;">
<div><!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt-->&nbsp;&nbsp;<a
href="http://Test.org/link.php?M=18471&N=13&L=1&F=H"><img
src="http://www.Test.com/images/sendmail/mail.jpg" alt="Test
Services" class="style2" /></a></div>
</div><img
src="http://Test.org/open.php?M=18471&L=10&N=13&F=H&image=.jpg"
height="1" width="10"></body></html>

--b1_d63f4ccda3d51edb790822c4700c4dfc--
 

k2-4u

Well-Known Member
با سلام

من میخوام قسمت هایی از متن زیر رو در متغییرهای تعیین شده قرار بدم ...
نمیدونم دقیقاً چطور انجام بدم ....

میخوام محتویات (مقادیری که جلوی اونها هست) موارد زیر در متغییر های مربوطه قرار بگیرند ::

To ==> $To
Subject ==> $Subject
From ==> $From
Date ==> $Date
X-Source-Dir ==> $Text


شما باید کار با Regular Expression رو در PHP کامل یاد بگیرید
جستجو کنید عبارات با قاعده در PHP
 

جدیدترین ارسال ها

بالا