[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Notice: in file [ROOT]/includes/session.php on line 2208: Array to string conversion
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Poco Forums • View topic - get last instance of header?

get last instance of header?

Scripting questions and ideas

Moderators: Eric, Tomas, robin, Michael

get last instance of header?

Postby mrQQ » Thu Oct 13, 2005 7:39 am

Hello,

how could I get last instance of header? for example header Received: can appear numerous times in message, so how could I get the very last of it (cause that's the one containing IP of the sender, right). I need this to fix DNSBL script, which doesnt seem to work for me :(

thanks!
mrQQ
Frequent Visitor
 
Posts: 66
Joined: Wed Feb 09, 2005 6:03 am

Postby Michael » Sat Oct 15, 2005 4:56 am

Try the following code:
Code: Select all
Set $Hdr ""
ReadAllHeaders $Headers %Message
:HdrLoop
LocateLine #ix "Received:" $Headers False
If #ix = -1 Then EndHdrLoop
GetLine $Hdr #ix $Headers
DeleteLine $Headers 1 #ix
GoTo HdrLoop
:EndHdrLoop
MessageBox $Hdr
Michael
Moderator
 
Posts: 866
Joined: Mon Jul 26, 2004 12:14 pm
Location: Victoria BC, Canada


Return to PocoScript Help and How-To

Who is online

Users browsing this forum: No registered users and 1 guest

cron