Re: [PHP] encrypted urls, mcrypt and mod_rewrite

2006-02-23 Thread Dan Rossi
Yes somehow in this case apache is treating the urlencoded string of a 
forward slash as a forward slash and so isnt matching the rule 
properly.


On 23/02/2006, at 9:58 PM, Jared Williams wrote:




Subject: Re: [PHP] encrypted urls, mcrypt and mod_rewrite

Somehow this part of the string is a problem, it has
underscores, but there is probably other things in this.

_%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ


I'd base64 encode that first then urlencode :)



On 23/02/2006, at 6:01 PM, Dan Rossi wrote:


Hi ive been trying to find answers with no luck. I am sending a
urlencoded encrypted string made with mcrypt. what is happening is
there is somehow special characters that mod_rewrite doesnt

like so it

wont find a regex match properly with this rule

RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA]

Any ideas what it could be doing ? The strings are also

quite random,

so it will work sometimes for a particular url then other

times not ?



Jared

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Altering subject of email in a pop3 mailbox

2006-02-23 Thread IG

Chris wrote:

IG wrote:
Is it possible to alter a subject line (or body for that matter) of an 
email in a pop3 mailbox?


If it's already in the mailbox, then I highly doubt you can do this.

You need to do this on the way in before it gets to the account.

Consider the ramifications if you could:

Anyone could login to your mail account and change the emails already 
there.


Eek!



Thanks- I completely see your point.

How do antispam filters work on client's computers? They seem to have no 
problem with adding to subjects. Also our hosting provider uses a spam 
filter which adds it to the subject line. However I am finding that not 
particularly good.


Many thanks,

IG

--

[EMAIL PROTECTED]
www.selectperformers.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Calling API on Windows?

2006-02-23 Thread HoWang Wang
Dear all,

I have a question on w32api ( http://hk.php.net/manual/en/ref.w32api.php
). I'm developing a command line program with PHP on windows, and I want
to call some API. But I cannot found the dll required for the w32api
extension. I'm using PHP/5.0.5, does anyone have an idea? Or there is
another extension can call Windows API?

Thanks
Ho Wang

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Altering subject of email in a pop3 mailbox

2006-02-23 Thread Duncan Hill
On Thursday 23 February 2006 11:49, IG wrote:
  IG wrote:
  Is it possible to alter a subject line (or body for that matter) of an
  email in a pop3 mailbox?

 Thanks- I completely see your point.

 How do antispam filters work on client's computers? They seem to have no
 problem with adding to subjects. Also our hosting provider uses a spam
 filter which adds it to the subject line. However I am finding that not
 particularly good.

ISP Mailbox - POP3 over TCP/IP - client filter app - client pc mailbox

Once the data is in mid-stream across the net, the filtering app can affect it 
any way it likes.

Ditto for the ISP method, they just tend to do it as the mail is received and 
before it gets written to the mail spool.

You can change things on a POP server, if you have access to the OS on the POP 
server and can edit the mail spool.  Not normally available to anyone but the 
system administrator(s).

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How secure is this?

2006-02-23 Thread Björn Bartels
Yo, tedd...

[David Tulloh]
Your example fails for me, Firefox and Mozilla. The rpc.php file
doesn't seem to return anything.
[/David Tulloh]

...it does the same for me... ok, on that way a bot will never get your
mail-adr... ;)

[David Tulloh]
To answer your question though, a bot is capable of getting anything
that a human can, probably more. It's all a question of effort. As the
email scrapers get plenty of hits looking for standard email addresses,
they don't put much effort into getting addresses from people who try
to
hide them (people who hide them are also less likely to fall for spam).
In the current environment, I don't think any bot is going to bother
running javascript, so any obstuftication using javascript should be
safe.
[/David Tulloh]

I have to agree, even the image-method isn't that save anymore nowadays
and
it is definetly not recommended by accessibility guidelines !  (see
CAPTCHA and related)...

bb


Björn Bartels
-Development/IT-Services-

--
dbusiness.de gmbh
digital business  printing gmbh

Greifswalder Str. 152
D-10409 Berlin

Fon: [0.30] 4.21.19.95
Fax: [0.30] 4.21.19.74

www.dbusiness.de
[EMAIL PROTECTED]
ftp://dbusiness.dyndns.org

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: auto download

2006-02-23 Thread Jens Kleikamp

Benjamin Adams wrote:

I have three links. The code already auto selects one.
I'm trying to take that one link and automaticly start the download.
I tryed with header('location:$link');
but it tells me Warning: Cannot modify header information
what would I use to start downloading?
one of the link is another page so I need it to pop up in a new window.

Thanks for any help

Moin,

You can´t start the browsers download dialog if you already sent any 
data. No header(), echo(), print() etc.


Have a look at http://pear.php.net/package/HTTP_Download.

cheers,
Jens

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How secure is this?

2006-02-23 Thread tedd

Björn, and David said:


Yo, tedd...

[David Tulloh]
 Your example fails for me, Firefox and Mozilla. The rpc.php file
 doesn't seem to return anything.
[/David Tulloh]

...it does the same for me... ok, on that way a bot will never get your
mail-adr... ;)


LOL

Björn  David:

The current site renders in Safari, but I failed 
to check it in BrowserCam for other browsers.


The rcp code checks to see where the request is 
coming from before doing anything. I'm trying to 
protect from a directory traversal attack by 
using:


if(isset($_SERVER['HTTP_REFERER']))

but apparently, browsers treat that differently -- I didn't know that.

I feel like I'm beating a dead horse that 
wouldn't pull a wagon anyway, but at least it has 
been a learning experience for me.


Thanks for your review and effort.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with mail() on Debian

2006-02-23 Thread Jochem Maas

George Pitcher wrote:

Manuel,



I have found that any changes I make to php.ini are ignored, even after
restarting Apache. I have been editing httpd.conf via Webmin,


personally I'd rather stick my head in a blender than use webmin to edit
such conf files. (no I wouldn't but you get the point hopefully)

how are you restarting apache? possibly your being told that the restart
occured but really your being lied to ... try doing it 'manually':

e.g.:

? apachectl stop; sleep 5; apachectl start





which for most


configs works fine (and is displayed in phpinfo(), the sendmail


changes are


never displayed (always shows sendmail_path = /usr/sbin/sendmail).


until the sendmail_path changes when you view
phpinfo() your updated php.ini has not been read in - for whatever
reason.



There are no miracles. If you change restarted Apache and phpinfo()
shows the same in sendmail_path, either you have other Apache
configuration changing PHP options, or you have not really changed
php.ini, which is very likely.

No, I am not saying you are crazy. It is very likely that the real
php.ini is not in the path you think it is. This may happen if you have
installed Zend Studio or some other tool that needs to replace the real
php.ini and moves it elsewhere.

Look again to the phpinfo() output to determine the real path of php.ini .



That's the crazy part! phpinfo() shows the path to the php.ini file as the
one that I have been editing, and if I open that file in vi, it shows all
the changes I've made. This is a bare debian install in as much as it has no
windowing environments. No Zend Studio, or anything else fancy. Smarty and
PEAR work, its just the emailing that is letting me down just now. Once
that's resolved I'll move on to spreadsheet reading.

Cheers

George



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Problem with mail() on Debian

2006-02-23 Thread George Pitcher
Jochem,


 personally I'd rather stick my head in a blender than use webmin to edit
 such conf files. (no I wouldn't but you get the point hopefully)

 how are you restarting apache? possibly your being told that the restart
 occured but really your being lied to ... try doing it 'manually':

 e.g.:

 ? apachectl stop; sleep 5; apachectl start


Webmin was a means to an end. Your restarting method solved the problem of
php.ini being read (or at least being displayed in phpinfo()), but doesn't
get round my email problem.

 My apache error.log says:

sh: line 1: /usr/sbin/sendmail -t: no such file or directory

 if I replace sendmail with exim4, i get an equivalent error.

ls -l sendmail in /usr/sbin gives me:
lrwxrwxrwx  1 root root 5 2005-11-17 15:51 sendmail - exim4

Any (constructive) thoughts?

Cheers

George

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How secure is this?

2006-02-23 Thread matt stone
On 2/22/06, tedd [EMAIL PROTECTED] wrote:



 PS: This site works for: Opera 8.5+, Safari, Netscape 7.2+, Mozillia
 1.6+, FireFox 1.0.7+, Konqueror 3.4.0+, and IE 5+ (except Mac)


Doesn't work for me firefox 1.0.3 on fedora core 3.

FYI, javascript consoles outputs:
Error: document.getElementById(update[0]) has no properties
Source File: http://www.xn--ovg.com/aja/test.js
Line: 35

Cheers
Matt


Re: [PHP] Problem with mail() on Debian

2006-02-23 Thread John Nichel

George Pitcher wrote:

Jochem,


personally I'd rather stick my head in a blender than use webmin to edit
such conf files. (no I wouldn't but you get the point hopefully)

how are you restarting apache? possibly your being told that the restart
occured but really your being lied to ... try doing it 'manually':

e.g.:

? apachectl stop; sleep 5; apachectl start



Webmin was a means to an end. Your restarting method solved the problem of
php.ini being read (or at least being displayed in phpinfo()), but doesn't
get round my email problem.

 My apache error.log says:

sh: line 1: /usr/sbin/sendmail -t: no such file or directory

 if I replace sendmail with exim4, i get an equivalent error.

ls -l sendmail in /usr/sbin gives me:
lrwxrwxrwx  1 root root 5 2005-11-17 15:51 sendmail - exim4

Any (constructive) thoughts?


Permissions on exim4?

Oh, and don't use Webmin.  ;)

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] File database, a href= works, but direct url access in address bar doesn't

2006-02-23 Thread Mathieu Dumoulin

I got a really weird and annoying problem:

I have a file database that people can access, depending of the file 
status (pending, active, deleted) i allow access to it from different 
people. For example, pending is available only to owner and admins, 
active is avail to everyone and delete is not available anymore.


My problem starts here, i did a web page that looks like a file browser, 
every file uploaded by the current user is diplayed there, its nothing 
complicated, just a simple html list of the different folders and files.


If you click on the file's link it loads the content-type, filename, 
reads the file and everything is sent to the user perfectly fine. Now if 
i take the URL of the link leading to the file and copy paste it in the 
same window's address bar, the download fails. For example:


http://dev.palliscience.com/dev_mvg/Palli-Sciences/file_explorer/file.php?element_id=8214
Works perfectly fine if its a link inside of the web site... BUT, if i 
copy paste this URL in my address bar, it fails. This is no special site 
with engines rewritting urls its a simple normal file by file website.


Some other clues:

When i click on the link, IE states the filename, contenttype and source 
perfectly fine. When i copy paste the url, instead of seeing


magistra_recipes.sql
text/plain
dev.palliscience.com

i see

file.php?element_id=8113
text/plain
dev.palliscience.com

Both urls are the same but IE reacts differently...

Here is the code of the page... (Line returns may make the code strange 
dont mind them... there are none in the original file)


/**/
?php
include(../include/authentification.php);
include('../includes/base.php');
include('../includes/db.php');
include('../includes/log.php');
include('../includes/lib/lib_filedb.php');

if(($sql = sql_connect()) === false){
	exit('Erreur de connection à la base de données. Veuillez réesaayer 
plus tard merci.');

}
log_pageaccess($sql);

//Block access if not in V2
if(!isset($_SESSION['sess_usev2']) || $_SESSION['sess_usev2'] != true){
header('location: ../profile/trans.php');
sql_disconnect($sql);
exit();
}

//Catch element_id
if(!isset($_GET['element_id']) || !is_numeric($_GET['element_id'])){
$_GET['element_id'] = 0;
}

//Get the element
$element = mysql_fetch_assoc(sql_query('SELECT * FROM filedb_elements 
WHERE id = '.sql_escape($_GET['element_id']).'', $sql));


ob_start();
/*print_r($element);
echo 'brbr';
print_r($active_account);
echo 'brbr';*/
if($element['sys_status'] == FILEDB_STATUS_ACTIVE){
echo 'public';
	echo 'reading : 
'.'../filedb/'.$element['id'].substr($element['element_name'], 
strrpos($element['element_name'], '.'));

}elseif($element['sys_status'] == FILEDB_STATUS_PENDING){
echo 'pending - ';
if($active_account-id == $element['sys_owner']){
echo 'owner access';
		echo 'reading : 
'.'../filedb/'.$element['id'].substr($element['element_name'], 
strrpos($element['element_name'], '.'));

}else{
echo 'not owner access - ';
		if(($active_account-profile_profileflags  ACCOUNT_ADMIN) == 
ACCOUNT_ADMIN){

echo 'admin access - ';
			echo 'reading : 
'.'../filedb/'.$element['id'].substr($element['element_name'], 
strrpos($element['element_name'], '.'));

}else{
echo 'not admin access';
}
}
}

$content = ob_get_contents();
ob_end_clean();
$fp = fopen('../filedb/log.txt', 'a');
fwrite($fp, str_replace('br', \r\n, $content));
fclose($fp);

//Check element type and owner
if($element['contenttype'] != 'system/folder'){
	//Check for status, if public, anyone can access it, if private, allow 
access only to admins or owner
	if(($element['sys_status'] == FILEDB_STATUS_ACTIVE) || 
(($element['sys_status'] == FILEDB_STATUS_PENDING)  
(($active_account-id == $element['sys_owner']) || 
(($active_account-profile_profileflags  ACCOUNT_ADMIN) == 
ACCOUNT_ADMIN{

//Authorize download// We'll be outputting a PDF
header('Content-type: '.$element['contenttype']);
// It will be called downloaded.pdf
		header('Content-Disposition: inline; 
filename='.$element['element_name'].'');

// The PDF source is in original.pdf
		readfile('../filedb/'.$element['id'].substr($element['element_name'], 
strrpos($element['element_name'], '.')));

}else{
//Bad file, can't access it
header('HTTP/1.0 404 Not Found');
		echo 'File not found 0x55498a3ff22 ('.$element['sys_owner'].' / 
'.$active_account-id.')';

}
}else{
//Bad file, can't access it
header('HTTP/1.0 404 Not Found');
echo 'File not found 0x6ef445a22d1';
}

//Disconnect the database
sql_disconnect($sql);
?
/**/
log.txt:

[PHP] Re: File database, a href= works, but direct url access in addressbar doesn't

2006-02-23 Thread Mathieu Dumoulin

Update update update


I tried with mozilla firefox and it worked fine, i just need to find out 
now what IE does that makes this process fail. If any of you have an 
idea that could help me solve my problem don't hesitate cause i need to 
find a solution.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: auto download

2006-02-23 Thread Mathieu Dumoulin
If your page is already displayed and you want to auto start a link, its 
not done via PHP, its done via javascript to open a new window towards 
one of those links. Nothing prevents you from outputting javascript 
yourself from PHP, give it a try its really fun to build dynamic 
javascript applications.


Jens Kleikamp wrote:

Benjamin Adams wrote:


I have three links. The code already auto selects one.
I'm trying to take that one link and automaticly start the download.
I tryed with header('location:$link');
but it tells me Warning: Cannot modify header information
what would I use to start downloading?
one of the link is another page so I need it to pop up in a new window.

Thanks for any help


Moin,

You can´t start the browsers download dialog if you already sent any 
data. No header(), echo(), print() etc.


Have a look at http://pear.php.net/package/HTTP_Download.

cheers,
Jens


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: File database, a href= works, but direct url access in addressbardoesn't

2006-02-23 Thread Barry

Mathieu Dumoulin wrote:

Update update update


I tried with mozilla firefox and it worked fine, i just need to find out 
now what IE does that makes this process fail. If any of you have an 
idea that could help me solve my problem don't hesitate cause i need to 
find a solution.

Probably not the appropriate headers are set to send the file?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How can I stop PHP from resolving symlinks?

2006-02-23 Thread Roy Souther




I have been doing something to that affect in the past. The problem with that is that every time a newer version of the CMS program is released I have to go around to about 50 files and add that hack again.

I want to reduce the manual labour needed to maintain these web site.

Thanks for trying. I am thinking this is an Apache issue. I tested PHP CLI and it works as expected just like a shell. Apache must be at fault for this problem.

On Thu, 2006-02-23 at 11:37 +1100, Chris wrote:


Roy Souther wrote:

 How can I make PHP use the symlink and stop trying to resolve the 
 original files?

Can you try:

$mydir = dirname(__FILE__);
include($mydir . '/../config.php');

?

or

$mydir = dirname(__FILE__);
include(dirname($mydir) . '/config.php');

-- 
Postgresql  php tutorials
http://www.designmagick.com/










Royce Souther
www.SiliconTao.com
Let Open Source help your business move beyond.

For security this message is digitally authenticated by GnuPG.













signature.asc
Description: This is a digitally signed message part


[PHP] databases, loops and tables oh my...

2006-02-23 Thread Jason Gerfen
Not sure about this one, I am trying to execute a SQL query to retrieve 
records then loop over the records and display X amount per line.  Any 
help is appreciated.


$sql = @mysql_query( SELECT * FROM subnets, $db );
$num = @mysql_num_rows( $sql );
$subnets .= table width=\100%\trtd bgcolor=\#C10202\ 
class=\fntTR\ colspan=\$num\Subnets and global parameters for 
each/td/trtr;

$i = 1;
while( $list = @mysql_fetch_array( $sql ) ) {
 list( $id, $subnet, $mask, $dns01, $dns02, $router, $vlan, $scope, 
$range1, $range2, $vlan ) = $list;

 if( $i % 2 == 0 ) {
  $tr = /trtr;
 }
 if( $scope == no ) {
  $range1 = NULL; $range2 = NULL;
 }
 $subnets .= td valign=\top\ valign=\center\
  table cellspacing=\3\ border=\0\
  trtd colspan=\2\ 
align=\center\bu$vlan/u/b/td/tr

  trtdbSubnet:/b/tdtd$subnet/td/tr
  trtdbMask:/b/tdtd$mask/td/tr
  trtdbDNS:/b/tdtd$dns01/td/tr
  trtdbDNS:/b/tdtd$dns02/td/tr
  trtdbGateway:/b/tdtd$router/td/tr
  trtdbVlan:/b/tdtd$vlan/td/tr
  
trtdbScope:/b/tdtd$range1nbsp;-nbsp;$range2/td/tr

  /table/td . $tr;
$i++;
}
$subnets .= /tr/table;

--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] databases, loops and tables oh my...

2006-02-23 Thread Jochem Maas

Jason Gerfen wrote:
Not sure about this one, I am trying to execute a SQL query to retrieve 
records then loop over the records and display X amount per line.  Any 


X ammount of what per 'line'? db records (or elelphants)?
and by line do you mean 'html table row'?

assuming I got that correct, check my comments below
(hopefully it's understandable):


help is appreciated.

$sql = @mysql_query( SELECT * FROM subnets, $db );
$num = @mysql_num_rows( $sql );
$subnets .= table width=\100%\trtd bgcolor=\#C10202\ 
class=\fntTR\ colspan=\$num\Subnets and global parameters for 
each/td/trtr;

$i = 1;


// add the following line here:

$numPerRow = 3; // number of records to show per table row.


while( $list = @mysql_fetch_array( $sql ) ) {
 list( $id, $subnet, $mask, $dns01, $dns02, $router, $vlan, $scope, 
$range1, $range2, $vlan ) = $list;


// and replace this if():


 if( $i % 2 == 0 ) {
  $tr = /trtr;
 }


// with this:

$tr = ($i % $numPerRow) ? /trtr : ;


 if( $scope == no ) {
  $range1 = NULL; $range2 = NULL;
 }
 $subnets .= td valign=\top\ valign=\center\
  table cellspacing=\3\ border=\0\
  trtd colspan=\2\ 
align=\center\bu$vlan/u/b/td/tr

  trtdbSubnet:/b/tdtd$subnet/td/tr
  trtdbMask:/b/tdtd$mask/td/tr
  trtdbDNS:/b/tdtd$dns01/td/tr
  trtdbDNS:/b/tdtd$dns02/td/tr
  trtdbGateway:/b/tdtd$router/td/tr
  trtdbVlan:/b/tdtd$vlan/td/tr
  
trtdbScope:/b/tdtd$range1nbsp;-nbsp;$range2/td/tr

  /table/td . $tr;
$i++;
}
$subnets .= /tr/table;



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: CLASS/Object lifetime - more info

2006-02-23 Thread Jochem Maas

Roger Helgesen wrote:

ain't that the other way around ?


I don't get the context of the question.
isn't what supposed to be the otherway around?



$var1=$var2 ($var1 is a copy of $var2)
$var1= $var2 ($var1 is a reference to $var2)
$var1='Test'
echo $var2  (outputs Test)

roger
Jochem Maas wrote:


REFERENCES.

the object you get back is a copy (foreach has the same
effect as creating a new variable as in the example below).

... see below ...

notice the use of the  symbol (and the 'refcount' values).
(there is loads of info out there on references/php4/objects
out there that explain it better than me.) - see what happens
when you start removing ''s.

or you could try php5 and forget about 'object hell'. :-)

roger helgesen wrote:


The function that gives me trouble
-
function fyll_sub_konto($pv){
foreach($this-subposter AS $konto){
$konto-fyll_fra_post($pv);
}



class Test
{
var $number;
var $subposter;

function Test($n = 0) { $this-number = $n; }

function sqar() { if (is_numeric($this-number)) { $this-number *= 
$this-number; } return $this; }

function doit() { echo strval($this-number),\n; }
function make() {   static $c = 1;
$t = new Test($c++);   $s = $t; // watch what happens when 
you remove the '' (php4 only)

$s-sqar();
$this-subposter[] = $t-sqar();
}
function goan() {   $cnt = count($this-subposter);
$this-doit();
for($i=0;$i$cnt;$i++) {
// watch what happens when you remove the '' (php4 only)
$tmp = $this-subposter[$i];
$tmp-sqar();
$this-subposter[$i]-doit();
}
}
}

$t = new Test(infinity); $i = 0;
while($i++  5) $t-make();
$t-goan();



}
-

$this-subposter is the array of CLASS2

function fyll_fra_post($post_vars){
echo (gruppe)class = .get_class($this) .br\n;
$teller=0;
foreach($this-poster AS $post=$verd){
$best=bestilt_.$post;
$avik=avvik_.$post;
$fakt=faktura_.$post;
$this-poster[$post][bestilt]=$post_vars[$best];
$this-poster[$post][avvik]=$post_vars[$avik];
$this-poster[$post][faktura]=$post_vars[$fakt];
}
$this-endret='ja';
$this-sett_sum();
}

If I print the data (after setting the new data) inside 
'fyll_fra_post' it puts out the new data.
If I do the same from 'fyll_sub_konto' (after foreach) it gives me 
the old data.








--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: CLASS/Object lifetime - Solution

2006-02-23 Thread Jochem Maas

roger helgesen wrote:

 function fyll_sub_konto($pv){
foreach($this-subposter AS $konto=$kt){
$kontoen= $this-subposter[$konto];
$kontoen-fyll_fra_post($pv);
$kontoen-endre();
}
}
the line
$kontoen= $this-subposter[$konto];


yeah - you grokked it!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Calling API on Windows?

2006-02-23 Thread Jochem Maas
Hi Ho, (7 dwarfs anyone? ;-)

click this link to download php4.4.2 (not the installer version)
it contains the DLL your looking for:

http://hk.php.net/get/php-4.4.2-Win32.zip/from/a/mirror

in the event that your using php5 then w32api is no longer
available - it has been replaced with fcc:

http://pecl.php.net/package/ffi

you can download a binary ddl (built automatically from cvs) here:
http://pecl4win.php.net/ext.php/php_ffi.dll


HoWang Wang wrote:
 Dear all,
 
 I have a question on w32api ( http://hk.php.net/manual/en/ref.w32api.php
 ). I'm developing a command line program with PHP on windows, and I want
 to call some API. But I cannot found the dll required for the w32api
 extension. I'm using PHP/5.0.5, does anyone have an idea? Or there is
 another extension can call Windows API?
 
 Thanks
 Ho Wang
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Reading binary http post

2006-02-23 Thread Dirk Vanden Boer

Manuel Lemos schreef:

Hello,

on 02/21/2006 03:40 PM Dirk Vanden Boer said the following:
I have a C++ application that posts binary data to a php script that I 
created using libcurl. Everything works fine except when my binary data 
happens to start with the '' symbol. In that case I can't read the http 
post data (isset returns false).


The post argument then looks like data=ÑÚA
Reading the post is done like this:
if (isset($_POST['data'])
Is there a way to fix this problem?


The problem is that you are misleading PHP telling that you are posting
form data. You need to correct the request Content-Type. It must not be
application/x-www-form-urlencoded nor multipart/form-data . I think you
can use anything except those types, like for instance
application/octet-stream which is the default for binary files.

I don't know how can you hack libcurl to make it use the right request
content-type. It is probably easy. If you are not able to do it, you may
want to try this PHP HTTP client class . It can send custom POST requests.

http://www.phpclasses.org/httpclient



You are correct, setting the headers is necessary but I was already 
doing that, curl supports it by calling


struct curl_slist *headers=NULL;
headers = curl_slist_append(headers, Content-Type: text/xml);
curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);

I have everything working at the moment by base64 encoding my data and 
then doing a urlencode. One pitfall I noticed: do not urlencode the post 
 argument, only the data, eg:


data=JtVLV43XWl...

urlencoded
data%3DJtVLV...

This doesn't work, so I just urlencoded my base64 data, and prepended 
the data= string.



Thanks for all your help guys from this thread ;)

Cheers,

Dirk

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Reading binary http post

2006-02-23 Thread Manuel Lemos
Hello,

on 02/23/2006 02:55 PM Dirk Vanden Boer said the following:
 The problem is that you are misleading PHP telling that you are posting
 form data. You need to correct the request Content-Type. It must not be
 application/x-www-form-urlencoded nor multipart/form-data . I think you
 can use anything except those types, like for instance
 application/octet-stream which is the default for binary files.

 I don't know how can you hack libcurl to make it use the right request
 content-type. It is probably easy. If you are not able to do it, you may
 want to try this PHP HTTP client class . It can send custom POST
 requests.

 http://www.phpclasses.org/httpclient

 
 You are correct, setting the headers is necessary but I was already
 doing that, curl supports it by calling
 
 struct curl_slist *headers=NULL;
 headers = curl_slist_append(headers, Content-Type: text/xml);
 curl_easy_setopt(easyhandle, CURLOPT_HTTPHEADER, headers);

Maybe you think you are doing that correctly but in fact that may not be
accurate.

If you are sure that the content type of the request being sent is
text/xml and PHP is treating as a form post, you should report that as a
PHP bug because PHP should only process form requests when the content
type specifies that.

For binary posts, the way to retrive posted data is not via $_POST.
There are other request variables for that.

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [How-to]flatfile New system with comments

2006-02-23 Thread Nicholas Couloute
How would I make a flatfile new systen with the ability for users to 
comment on the news selection (no login required)?

~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problem with mail() on Debian

2006-02-23 Thread Manuel Lemos
Hello,

on 02/23/2006 11:32 AM George Pitcher said the following:
  My apache error.log says:
 
 sh: line 1: /usr/sbin/sendmail -t: no such file or directory

/usr/sbin/sendmail is not the correct sendmail program path. The correct
path is /usr/lib/sendmail . It may be odd that a program is located in
/usr/lib but that has always been the standard path for sendmail and
compatible MTA. Sometimes it is a symbolic link to /usr/sbin/sendmail
but that is not necessarily true.

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread John Nichel

Nicholas Couloute wrote:
How would I make a flatfile new systen with the ability for users to 
comment on the news selection (no login required)?


Write the code for it.

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread Jay Blanchard
[snip]
 How would I make a flatfile new systen with the ability for users to 
 comment on the news selection (no login required)?

Write the code for it.
{/snip]

Carefully and thoughtfully.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread John Nichel

Nicholas Couloute wrote:
LOL. I see the point your trying to make! I have made a news script 
before but how would I add coments to each individual new article! How 
would I keep it all together! and also to show only the lastest news 
articles!


Without seeing one iota of your code, or your data structure, who knows?

The way *I* would do it is; get rid of the flatfile, setup a db.  Two 
tables to start, one for news, one for comments.  Each news article is 
assigned an unique id.  Comments are tagged with that id to link them to 
the article.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread Jay Blanchard
[snip]
LOL. I see the point your trying to make! I have made a news script 
before but how would I add coments to each individual new article! How 
would I keep it all together! and also to show only the lastest news 
articles!
[/snip]

See http://www.php.net/fopen and look at appending files.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread Robert Cummings
On Thu, 2006-02-23 at 15:18, John Nichel wrote:
 Nicholas Couloute wrote:
  LOL. I see the point your trying to make! I have made a news script 
  before but how would I add coments to each individual new article! How 
  would I keep it all together! and also to show only the lastest news 
  articles!

On the filesystem:

category_001 (dir -- everything for category 1)
details.txt (file -- title, description, perms, *shrug*)
article_001.txt (file -- you know... THE ARTICLE)
comments_001 (dir -- all the comments for article of same index)
comment_001.txt (a comment)
comment_002.txt (another comment)
comment_0923874.txt (a very busy article)
category_002 (dir -- everything for category 2)
details.txt (file -- title, description, perms, *shrug*)
article_001.txt (file -- you know... THE ARTICLE)
comments_001 (dir -- all the comments for article of same index)
comment_001.txt (a comment)
comment_002.txt (another comment)
article_002.txt (file -- you know... THE ARTICLE)
comments_002 (dir -- all the comments for article of same index)
comment_001.txt (a comment)
comment_002.txt (another comment)
comment_002.txt (yet another comment)
category_xxx (dir -- everything for category xxx)
details.txt (file -- title, description, perms, *shrug*)
article_xxx.txt (file -- article title, details, perms, etc.)
comments_xxx (dir -- all the comments for article of same index)
comment_xxx.txt (a comment)

By using this kind of organization it becomes simplistic to retrieve
ordered entries, first 5 entries, last 5 entries, whatever you want.
Mind you, ordering by category name will be more work, but I'll leave
that to you since I'd use a database :)

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread Jason Gerfen

John Nichel wrote:


Nicholas Couloute wrote:

How would I make a flatfile new systen with the ability for users to 
comment on the news selection (no login required)?



Write the code for it.


lol, too funny.

The filesystem reference: 
http://us2.php.net/manual/en/ref.filesystem.php (this will help you with 
some of the runtime vars)
To write a file use this function: 
http://us2.php.net/manual/en/function.fwrite.php
To read in a file use this function: 
http://us2.php.net/manual/en/function.fopen.php


There are quite a few internal functions PHP can help you read, write 
files with.  HTH



--
Jason Gerfen

When asked what love is:
Love is the Jager talking.
~Craig Baldo

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread John Nichel

Jay Blanchard wrote:

[snip]
How would I make a flatfile new systen with the ability for users to 
comment on the news selection (no login required)?


Write the code for it.
{/snip]

Carefully and thoughtfully.



That goes for questions too.

http://www.catb.org/~esr/faqs/smart-questions.html

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [How-to]flatfile New system with comments

2006-02-23 Thread Nicholas Couloute
LOL. I see the point your trying to make! I have made a news script 
before but how would I add coments to each individual new article! How 
would I keep it all together! and also to show only the lastest news 
articles!


On Thu, 23 Feb 2006 3:04 pm, Jay Blanchard wrote:

[snip]

 How would I make a flatfile new systen with the ability for users to
 comment on the news selection (no login required)?


Write the code for it.
{/snip]

Carefully and thoughtfully.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

~Nick Couloute
co-owner/Web Designer
Sidekick2Music.Com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] without session variables

2006-02-23 Thread Ing. Tom�s Liendo
Hi

a system that I developed and I tested in my PC and it runs to the 
perfection, when I upload this to the hosting server it has many problems. I 
think that is because the session variables don't work in the server. It is 
possible? How can I solve this???

Ahead of time, thank you very much,

Tom. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] return node-set to stylesheet via php:function

2006-02-23 Thread kwmccabe

using:  RedHat ; PHP 5.1.2 ; libxml 2.6.22

How do I return a node-set to an xsl stylesheet via php:function?

I've had no difficulty returning strings, but so far xsl refuses to see 
the result as something I can iterate as real XML.



php fragment:
-
// return String
function getNodesOne()
{
   return 'RESULTNODEfoo/NODENODEbar/NODE/RESULT';
}

// return DomDocument
function getNodesTwo()
{
   $xml = 'RESULTNODEfoo/NODENODEbar/NODE/RESULT';
   $doc = DomDocument::loadXML($xml);
   return $doc;
}
-

xsl fragment:
-
xsl:variable name=nodes
   xsl:copy-of select=php:function('getNodes') /
/xsl:variable

cnt=xsl:value-of select=count($nodes/RESULT/NODE) /
-

expected result: 
   cnt=2


actual result:
   cnt=0

Same result calling php:function('getNodesOne') or 
php:function('getNodesTwo').
In both case, the xsl variable $nodes contains a string, not an actual 
node-set that can be iterated and otherwise worked with.  
$nodes/RESULT, like $nodes/RESULT/NODE, doesn't exist.



I also tried this, but it returns an empty node-set and not even a string:
-
xsl:copy-of select=document(php:function('getNodes')) /
-


Finally, I've also tried this, but libxml2 evidently does not support the 
inline-data URI form:

-
xsl:variable name=tmp
   xsl:value-of select=php:function('getNodes') /
/xsl:variable
xsl:variable name=nodes
   xsl:copy-of select=document(concat('data:text/xml,',$tmp)) /
/xsl:variable
-

So, in all cases/combos of the above code, I get a string or an empty 
node-set.


Clearly, there should be a way to get a node-set via php:function, without 
creating a temporary xml file and without making a full request to apache.


Am I missing something?  Is something broken or, worse, broken by design?

Any help would be greatly appreciated.
thanks

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: auto download

2006-02-23 Thread Jochem Maas

Jens Kleikamp wrote:

Benjamin Adams wrote:


I have three links. The code already auto selects one.
I'm trying to take that one link and automaticly start the download.
I tryed with header('location:$link');
but it tells me Warning: Cannot modify header information
what would I use to start downloading?
one of the link is another page so I need it to pop up in a new window.

Thanks for any help


Moin,

You can´t start the browsers download dialog if you already sent any 
data. No header(), echo(), print() etc.


not completely true. you can call header() many times, IIRC even
over writing specific previous calls e.g.

?php
header('Location: http://www.foo.com');
header('Location: http://www.bar.com');
exit

would send the user to bar.com (ask him to buy all a drink).
essentially the headers are not sent until output in initiated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Can php.ini include another config file

2006-02-23 Thread Khai
In my development environment I have Zend Debugger / Zend Studio 
installed.  I like to put all the directives for this into studio.ini, 
and include this file into the main php.ini somehow.  Is this possible? 
 Also can I put php directives into the apache httpd.conf file?


Khai

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can php.ini include another config file

2006-02-23 Thread Richard Lynch
On Thu, February 23, 2006 4:28 pm, Khai wrote:
 In my development environment I have Zend Debugger / Zend Studio
 installed.  I like to put all the directives for this into studio.ini,
 and include this file into the main php.ini somehow.  Is this
 possible?

I don't think so, but if it's part of the .ini standard from MS, maybe...

   Also can I put php directives into the apache httpd.conf file?

Yes, but the format changes a bit:

php.ini---
xyz = 42

httpd.conf---
php_value xyz 42

Also, some short-hand forms for php.ini do not work in httpd.conf:
E.G. E_ALL and 8M are interpred by PHP, not by Apache.

This is all documented on http://php.net/ -- you'll have to search to
find the exact page.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: How can I stop PHP from resolving symlinks?

2006-02-23 Thread Joel Leibow
You need to check your httpd.conf and make sure the Options FollowSymLinks 
is set for the server.  Check the apache documentation for further 
information.

Joel Leibow

Roy Souther [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
I am trying to stop PHP from resolving symlinks. I have a PHP CMS that I use 
to host dozens of sites using Apache virtual hosting features. I need all 
the sites to run the exact same PHP CMS code but use their unique 
directories to host the different config files. The problem is that the PHP 
scripts are running from the directory that the links point to and not the 
directory where the site is. The big problem with that is the CMS tries to 
read a configuration file that is in a relative location to the PHP script 
like ../config.php.

[EMAIL PROTECTED] ls -l /usr/local/cms
-rw-r--r--  1 user users 20 Jan 16 02:17 index.php
drwxr-xr-x  9 user users 4096   Feb 22 16:40 admin
[EMAIL PROTECTED] ls -l /vhost/test01.com/var/www/html/
-rw-r--r--  1 user users 20 Jan 16 02:17 config.php
lrwxrwxrwx  1 root root  31 Feb 22 14:05 index.php - 
/usr/local/cms/index.php
lrwxrwxrwx  1 root root  31 Feb 22 14:05 admin - 
/usr/local/cms/admin
[EMAIL PROTECTED] cd /vhost/test01.com/var/www/html/admin/
[EMAIL PROTECTED] pwd
/vhost/test01.com/var/www/html/admin
[EMAIL PROTECTED]

Bash is doing what I need. It sees the current directory as the full path of 
the symlink.

The admin.php at this point only has system(pwd); in it and it prints out 
/usr/local/cms/admin as the directory it is in, not what I want. It will 
never see the ../config.php file.

I tried doing this
chdir ($_SERVER[DOCUMENT_ROOT]./.$_SERVER[REQUEST_URI]);
but it still resolves the link and does not accept the path that I 
constructed.

How can I make PHP use the symlink and stop trying to resolve the original 
files?


Royce Souther
www.SiliconTao.com
Let Open Source help your business move beyond.

For security this message is digitally authenticated by GnuPG. 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] base64_encode, forward slashes and mod_rewrite

2006-02-23 Thread Dan Rossi
Continueing on my prior problem, Ive discovered that base64_encode adds 
forward slashes in its encoded string, when its urlencoded it becomes 
something like


/feeds/UmFuZG9tSVZd%2FMChU7sMQqdUi%2FrgYHD7


mod_rewrite doesnt seem to like the %2F in the string and fails with a 
404 as it doesnt get a match using


RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE]

What should i do ? Should i replace the / with a different character 
then convert it back later ?


Re: [PHP] How can I stop PHP from resolving symlinks?

2006-02-23 Thread Chris

Roy Souther wrote:
I have been doing something to that affect in the past. The problem with 
that is that every time a newer version of the CMS program is released I 
have to go around to about 50 files and add that hack again.


Don't make it a hack - make it how it works.

I use it all over the place and it works every time.



I want to reduce the manual labour needed to maintain these web site.

Thanks for trying. I am thinking this is an Apache issue. I tested PHP 
CLI and it works as expected just like a shell. Apache must be at fault 
for this problem.


On Thu, 2006-02-23 at 11:37 +1100, Chris wrote:


Roy Souther wrote:

How can I make PHP use the symlink and stop trying to resolve the 
original files?


Can you try:

$mydir = dirname(__FILE__);
include($mydir . '/../config.php');



--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] base64_encode, forward slashes and mod_rewrite

2006-02-23 Thread Dan Rossi
sorry Ive done it again, for anyones interest, you might have to 
urlencode the string twice for mod_rewrite to accept encrypted and 
base64_encoded strings which add slashes and ampersands into their 
strings.


It is confirmed there is a bug in mod_rewrite and doesnt like the 
urlencoded %2F characters.


On 24/02/2006, at 10:31 AM, Dan Rossi wrote:

Continueing on my prior problem, Ive discovered that base64_encode 
adds forward slashes in its encoded string, when its urlencoded it 
becomes something like


/feeds/UmFuZG9tSVZd%2FMChU7sMQqdUi%2FrgYHD7


mod_rewrite doesnt seem to like the %2F in the string and fails with a 
404 as it doesnt get a match using


RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE]

What should i do ? Should i replace the / with a different character 
then convert it back later ?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] verification of mail success

2006-02-23 Thread mattias
Hi,

This might be too simple or not...

I'm trying to send emails from my PHP page, and while both mail() and PEAR Mail
work, I'm having a hard time finding out whether a message was actually sent or
not.

With both mail() and PEAR Mail, an email to an invalid domain (syntactically
valid) name returned success... Running mailq at the command prompt gives me:

(Host or domain name not found. Name service error for name=activeagenda.org
type=MX: Host not found, try again)

Basically, I'd like my PHP script to know of issues like these.

TIA for any suggestions.

Mattias Thorslund

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] without session variables

2006-02-23 Thread Chris
a system that I developed and I tested in my PC and it runs to the 
perfection, when I upload this to the hosting server it has many problems. I 
think that is because the session variables don't work in the server. It is 
possible? How can I solve this???


What problems?

You can check if sessions are enabled from a phpinfo page.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] verification of mail success

2006-02-23 Thread Chris

[EMAIL PROTECTED] wrote:

Hi,

This might be too simple or not...

I'm trying to send emails from my PHP page, and while both mail() and PEAR Mail
work, I'm having a hard time finding out whether a message was actually sent or
not.


The short answer is 'not really'.

The long answer..

If the mail server accepts the mail, then the php mail() command returns 
true.


If it doesn't accept it (eg it's down), then it returns false.

Since (in this case) your mail server accepts the email to attempt 
delivery and places it in the queue, mail() returns true. Whether it 
works after that is up to the mail server to figure out.


You could try to send emails through an smtp server but I don't think 
this would give you any extra benefits and it's a lot harder because you 
have to check at each step that the command works.. I don't know if pear 
mail can handle this for you.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: verification of mail success

2006-02-23 Thread Manuel Lemos
Hello,

on 02/23/2006 09:22 PM [EMAIL PROTECTED] said the following:
 This might be too simple or not...
 
 I'm trying to send emails from my PHP page, and while both mail() and PEAR 
 Mail
 work, I'm having a hard time finding out whether a message was actually sent 
 or
 not.
 
 With both mail() and PEAR Mail, an email to an invalid domain (syntactically
 valid) name returned success... Running mailq at the command prompt gives 
 me:
 
 (Host or domain name not found. Name service error for name=activeagenda.org
 type=MX: Host not found, try again)
 
 Basically, I'd like my PHP script to know of issues like these.

What you want is impossible most of the time. The problem is that
usually applications are MUA (Mail User Agents) and so do not deliver
messages. They rather queue them in the MTA (Mail Transfer Agent) queue.
So you only know whether the message was successfully deliver or not if
you request some kind of delivery notification.

Alternatively, if you want to know whether an address is valid, you may
want to try this e-mail validation class.

http://www.phpclasses.org/emailvalidation

You may also want to try this other class that can act partially as an
MTA. It is a normal mail composing and sending class with a SMTP
delivery sub-class that has a direct delivery mode. This means that it
will attempt to send the message directly to the destination SMTP server
rather than queueing in the local MTA queue.

It comes with a wrapper function named urgent_mail(). It is compatible
with the mail function, except that it uses the class direct delivery
mode to attempt to deliver the message right away. If it fails due to
some temporary error, it falls back to the mail() function.

http://www.phpclasses.org/mimemessage

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: verification of mail success

2006-02-23 Thread Mattias Thorslund
Manuel Lemos wrote:
 Hello,

 on 02/23/2006 09:22 PM [EMAIL PROTECTED] said the following:
   
 This might be too simple or not...

 I'm trying to send emails from my PHP page, and while both mail() and PEAR 
 Mail
 work, I'm having a hard time finding out whether a message was actually sent 
 or
 not.

 With both mail() and PEAR Mail, an email to an invalid domain (syntactically
 valid) name returned success... Running mailq at the command prompt gives 
 me:

 (Host or domain name not found. Name service error for name=activeagenda.org
 type=MX: Host not found, try again)

 Basically, I'd like my PHP script to know of issues like these.
 

 What you want is impossible most of the time. The problem is that
 usually applications are MUA (Mail User Agents) and so do not deliver
 messages. They rather queue them in the MTA (Mail Transfer Agent) queue.
 So you only know whether the message was successfully deliver or not if
 you request some kind of delivery notification.

 Alternatively, if you want to know whether an address is valid, you may
 want to try this e-mail validation class.

 http://www.phpclasses.org/emailvalidation

 You may also want to try this other class that can act partially as an
 MTA. It is a normal mail composing and sending class with a SMTP
 delivery sub-class that has a direct delivery mode. This means that it
 will attempt to send the message directly to the destination SMTP server
 rather than queueing in the local MTA queue.

 It comes with a wrapper function named urgent_mail(). It is compatible
 with the mail function, except that it uses the class direct delivery
 mode to attempt to deliver the message right away. If it fails due to
 some temporary error, it falls back to the mail() function.

 http://www.phpclasses.org/mimemessage
   

First, thanks for quick replies, everyone!

Manuel: I'll look into the mimemessage class.

Yes I'm aware of the mail queue. I guess what I'm after is way to get a
more detailed status message. I notice that in the mail queue, each
message is given a unique ID, which I suspect could be used for my
purpose, i.e. has the message been processed yet, is there a temporary
or permanent delivery problem, etc. I don't see how the PHP function
would be able to get the message ID of the message it just handed over
to the MTA.

I guess one way would be to implement a queue of my own, and use the
direct SMTP approach to deliver messages.

/Mattias

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: verification of mail success

2006-02-23 Thread Manuel Lemos
Hello,

on 02/23/2006 10:52 PM Mattias Thorslund said the following:
 This might be too simple or not...

 I'm trying to send emails from my PHP page, and while both mail() and PEAR 
 Mail
 work, I'm having a hard time finding out whether a message was actually 
 sent or
 not.

 With both mail() and PEAR Mail, an email to an invalid domain (syntactically
 valid) name returned success... Running mailq at the command prompt gives 
 me:

 (Host or domain name not found. Name service error for 
 name=activeagenda.org
 type=MX: Host not found, try again)

 Basically, I'd like my PHP script to know of issues like these.
 
 What you want is impossible most of the time. The problem is that
 usually applications are MUA (Mail User Agents) and so do not deliver
 messages. They rather queue them in the MTA (Mail Transfer Agent) queue.
 So you only know whether the message was successfully deliver or not if
 you request some kind of delivery notification.

 Alternatively, if you want to know whether an address is valid, you may
 want to try this e-mail validation class.

 http://www.phpclasses.org/emailvalidation

 You may also want to try this other class that can act partially as an
 MTA. It is a normal mail composing and sending class with a SMTP
 delivery sub-class that has a direct delivery mode. This means that it
 will attempt to send the message directly to the destination SMTP server
 rather than queueing in the local MTA queue.

 It comes with a wrapper function named urgent_mail(). It is compatible
 with the mail function, except that it uses the class direct delivery
 mode to attempt to deliver the message right away. If it fails due to
 some temporary error, it falls back to the mail() function.

 http://www.phpclasses.org/mimemessage
   
 
 First, thanks for quick replies, everyone!
 
 Manuel: I'll look into the mimemessage class.
 
 Yes I'm aware of the mail queue. I guess what I'm after is way to get a
 more detailed status message. I notice that in the mail queue, each
 message is given a unique ID, which I suspect could be used for my
 purpose, i.e. has the message been processed yet, is there a temporary
 or permanent delivery problem, etc. I don't see how the PHP function
 would be able to get the message ID of the message it just handed over
 to the MTA.

It is the Message-ID: header. Just set it to your unique identifier for
tracking purposes.


 I guess one way would be to implement a queue of my own, and use the
 direct SMTP approach to deliver messages.

It may be a way to go, but keep in mind that the temporary failure rates
are increasing due to the number of SMTP servers that use grey listing.

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: verification of mail success

2006-02-23 Thread Chris

Yes I'm aware of the mail queue. I guess what I'm after is way to get a
more detailed status message. I notice that in the mail queue, each
message is given a unique ID, which I suspect could be used for my
purpose, i.e. has the message been processed yet, is there a temporary
or permanent delivery problem, etc. I don't see how the PHP function
would be able to get the message ID of the message it just handed over
to the MTA.


PHP can't directly (you could parse the 'mailq' output but is it worth it?).

Those numbers / id's apply to the mta only, they have no meaning to 
anyone else.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Can php.ini include another config file

2006-02-23 Thread Rasmus Lerdorf

Khai wrote:
In my development environment I have Zend Debugger / Zend Studio 
installed.  I like to put all the directives for this into studio.ini, 
and include this file into the main php.ini somehow.  Is this possible? 
 Also can I put php directives into the apache httpd.conf file?


No, you can't chain ini files like that, but you can build your PHP using:

--with-config-file-scan-dir=/etc/php

Then any .ini file you put in /etc/php will be parsed in alphabetical 
order.


-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Calling API on Windows?

2006-02-23 Thread HoWang Wang
Hi,

How can I use it?
For example:
[lib='user32.dll'] int MessageBoxA(int handle, char *text, char
*caption, int type);
How can I write this sentence?
What is the format?
And I want to use GetComputerNameA, what can I do?

?php
$win32_idl = [lib='user32.dll'] int MessageBoxA(int handle, char *text,
char *caption, int type);
[lib='kernel32.dll'] int GetComputerNameA (char *lpBuffer, DWORD nSize);;

$ffi = new ffi($win32_idl);
$compname = '';
$r = $ffi-GetComputerNameA($compname,255);
echo $r; //Debug
echo $ffi-MessageBoxA(0, The Computer Name is  . $compname, Test, 0);
?

doesn't work, it give me an error.
Please help, thx!


Jochem Maas wrote:
 Hi Ho, (7 dwarfs anyone? ;-)
 
 click this link to download php4.4.2 (not the installer version)
 it contains the DLL your looking for:
 
 http://hk.php.net/get/php-4.4.2-Win32.zip/from/a/mirror
 
 in the event that your using php5 then w32api is no longer
 available - it has been replaced with fcc:
 
 http://pecl.php.net/package/ffi
 
 you can download a binary ddl (built automatically from cvs) here:
 http://pecl4win.php.net/ext.php/php_ffi.dll
 
 
 HoWang Wang wrote:
 
Dear all,

I have a question on w32api ( http://hk.php.net/manual/en/ref.w32api.php
). I'm developing a command line program with PHP on windows, and I want
to call some API. But I cannot found the dll required for the w32api
extension. I'm using PHP/5.0.5, does anyone have an idea? Or there is
another extension can call Windows API?

Thanks
Ho Wang


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Floored!

2006-02-23 Thread Ben Miller
If anyone has an answer for this, I would be greatly appreciative.

I was trying to compare two values, the first is the total cost of products
to be refunded, and the second is the original order total.  To the naked
eye, they both were coming out as 102.85, yet an if($Refund_Amount 
$Order_Total) was coming back true, so.

I ran some tests, and did the following:

$Order_Total = sprintf(%01.20f,$Order_Total);
$Refund_Amount = sprintf(%01.20f,$Refund_Amount);

which produced:

$Order_Total = 102.84431566
and $Refund_Amount = 102.85852651

so, I figured I would try the following to make sure that the figures in the
database weren't weird:

$Bar = 102.85;
$Foo = sprintf(%01.20f,$Bar);

echo \$Foo = $Foo;

which produced:

$Foo = 102.84431566;

I am completely lost.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Manual in PDF format

2006-02-23 Thread Kaushal Shriyan
Hi ALL

I am looking out for PHP Manual in PDF Format

Thanks in Advance

Regards

Kaushal

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Floored!

2006-02-23 Thread Ruben Rubio Rey

|What PHP versioan are u using? (Maybe a known bug?)
What options did u use to compile?

|Temporarily solutions ...|
- round($Bar, 2)  
Or

- intval($Bar*100)/100
|
Ben Miller wrote:


If anyone has an answer for this, I would be greatly appreciative.

I was trying to compare two values, the first is the total cost of products
to be refunded, and the second is the original order total.  To the naked
eye, they both were coming out as 102.85, yet an if($Refund_Amount 
$Order_Total) was coming back true, so.

I ran some tests, and did the following:

$Order_Total = sprintf(%01.20f,$Order_Total);
$Refund_Amount = sprintf(%01.20f,$Refund_Amount);

which produced:

$Order_Total = 102.84431566
and $Refund_Amount = 102.85852651

so, I figured I would try the following to make sure that the figures in the
database weren't weird:

$Bar = 102.85;
$Foo = sprintf(%01.20f,$Bar);

echo \$Foo = $Foo;

which produced:

$Foo = 102.84431566;

I am completely lost.

 



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Beta Testers Wanted

2006-02-23 Thread Barry

Matt Palermo wrote:
Hey guys.  I would like to first say thanks for all the help you have all 
given me in the past (especially in my early programming days).  Once again, 
I would like to show my appreciation by offering an opportunity to use a new 
PHP program I have created.  The program is called TotalXplorer.  Basically 
it's an online file manager for your website that uses PHP's FTP 
functionality to perform actions on files/folders (this get's rid of the 
need to make them writable for PHP).  The file manager also has a built-in 
file upload feature, file editor, mp3 music player (to play tracks directly 
from your site without downloading them first), and more.  You can view the 
demo of it here:


http://sweetphp.com/projects/TotalXplorer/

I'm looking for 5-10 people who would be willing to help test it out and 
give feedback about it.  In exchange for this, you will receive a free copy 
of the software when it's ready to go.  If you are interested, please let me 
know.  This will be first come, first server, but please be willing to put 
in a little time with the testing of it.  I have offered similar beta 
testing programs for some of the other scripts I have available at 
http://sweetphp.com and they have become very successful because of all your 
help.


Thanks,

Matt Palermo
[EMAIL PROTECTED]
http://sweetphp.com 


lol, how about you give your images some ALT tags?
And i don't think the text shouldn't break right after the folder icon.
(looks kinda crappy for me though ;)

greets
Barry

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] parse_url not parsing hosts with www properly in php 5.1.2

2006-02-23 Thread Jochem Maas

Dan Rossi wrote:
Ok it looks like when i exploded the urls by a comma, one has space 


exploding the urls??? - this list is not called 'php-psychics'
for a reason. i.e. don't assume we know that you happen to have a
string which contains 'urls' that you seem to explode on a comma before
going on to run parse_url() on each item in the ensuing array. ;-)

padding, i had to trim it first, the array was coming out like 
host=__http path=//www.thedomain.com :\


that 'array' is clear as mud.

next time maybe post some code and show (copy+paste) the actual output not
some handtyped approximation. And before doing even that I recommend
you always do some simple debugging with var_dump() to examine the
actual contents of the variables in the code that seems to be broken
(once you see what in a variable it is quite often obvious what is going
wrong).

anyway you got it fixed on your own steam - that's a good thing :-)

rgds,
Jochem



On 23/02/2006, at 1:05 PM, Chris wrote:


Dan Rossi wrote:

Ive just discovered a strange issue where parse_url is not splitting 
up the url properly. in the host key its returning like //www.php.net 
where the url is http://www.php.net. any ideas ?



If the behaviour changed between versions without it being documented 
or noted somewhere, post a bug report - http://bugs.php.net.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] parse_url not parsing hosts with www properly in php 5.1.2

2006-02-23 Thread Dan Rossi


On 23/02/2006, at 8:45 PM, Jochem Maas wrote:


Dan Rossi wrote:

Ok it looks like when i exploded the urls by a comma, one has space


exploding the urls??? - this list is not called 'php-psychics'
for a reason. i.e. don't assume we know that you happen to have a
string which contains 'urls' that you seem to explode on a comma before
going on to run parse_url() on each item in the ensuing array. ;-)


PHP slang == explode()



padding, i had to trim it first, the array was coming out like 
host=__http path=//www.thedomain.com :\


that 'array' is clear as mud.

next time maybe post some code and show (copy+paste) the actual output 
not

some handtyped approximation. And before doing even that I recommend
you always do some simple debugging with var_dump() to examine the
actual contents of the variables in the code that seems to be broken
(once you see what in a variable it is quite often obvious what is 
going

wrong).



The previous part was from the var_dump ,as explained the url needed 
trimming as it had a space before the http://.



anyway you got it fixed on your own steam - that's a good thing :-)

rgds,
Jochem


On 23/02/2006, at 1:05 PM, Chris wrote:

Dan Rossi wrote:

Ive just discovered a strange issue where parse_url is not 
splitting up the url properly. in the host key its returning like 
//www.php.net where the url is http://www.php.net. any ideas ?



If the behaviour changed between versions without it being 
documented or noted somewhere, post a bug report - 
http://bugs.php.net.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Beta Testers Wanted

2006-02-23 Thread Dotan Cohen
On 2/22/06, Matt Palermo [EMAIL PROTECTED] wrote:
 Hey guys.  I would like to first say thanks for all the help you have all
 given me in the past (especially in my early programming days).  Once again,
 I would like to show my appreciation by offering an opportunity to use a new
 PHP program I have created.  The program is called TotalXplorer.  Basically
 it's an online file manager for your website that uses PHP's FTP
 functionality to perform actions on files/folders (this get's rid of the
 need to make them writable for PHP).  The file manager also has a built-in
 file upload feature, file editor, mp3 music player (to play tracks directly
 from your site without downloading them first), and more.  You can view the
 demo of it here:

 http://sweetphp.com/projects/TotalXplorer/

 I'm looking for 5-10 people who would be willing to help test it out and
 give feedback about it.  In exchange for this, you will receive a free copy
 of the software when it's ready to go.  If you are interested, please let me
 know.  This will be first come, first server, but please be willing to put
 in a little time with the testing of it.  I have offered similar beta
 testing programs for some of the other scripts I have available at
 http://sweetphp.com and they have become very successful because of all your
 help.

 Thanks,

 Matt Palermo
 [EMAIL PROTECTED]
 http://sweetphp.com


I'll give it a shot. I've been wanting to replace Cpanel for a while.

Dotan Cohen
http://lyricslist.com/lyrics/biography/359/morrison_van.php


Re: [PHP] encrypted urls, mcrypt and mod_rewrite

2006-02-23 Thread Jochem Maas

Dan Rossi wrote:
Somehow this part of the string is a problem, it has underscores, but 
there is probably other things in this.


give code, give the whole string.



_%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ

On 23/02/2006, at 6:01 PM, Dan Rossi wrote:

Hi ive been trying to find answers with no luck. I am sending a 
urlencoded encrypted string made with mcrypt. what is happening is 
there is somehow special characters that mod_rewrite doesnt like so it 
wont find a regex match properly with this rule


RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA]


why do you have the QSA flag here?



Any ideas what it could be doing ? The strings are also quite random, 
so it will work sometimes for a particular url then other times not ?





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] parse_url not parsing hosts with www properly in php 5.1.2

2006-02-23 Thread Jochem Maas

Dan Rossi wrote:


On 23/02/2006, at 8:45 PM, Jochem Maas wrote:


Dan Rossi wrote:


Ok it looks like when i exploded the urls by a comma, one has space



exploding the urls??? - this list is not called 'php-psychics'
for a reason. i.e. don't assume we know that you happen to have a
string which contains 'urls' that you seem to explode on a comma before
going on to run parse_url() on each item in the ensuing array. ;-)



PHP slang == explode()


I understand what exploding means in the context of php, what I didn't
understand was that you started to go about exploding urls in a follow
on post without any clarification (in the previous post there was no mention
of the processing being done to the _url_ let alone that your dealing
with a whole list of urls)

obviously you didn't get the point about not forcing
other people to infer whatever it is you are doing [prior
to where your code 'breaks']  when you want them to help you fix your
code.





padding, i had to trim it first, the array was coming out like 
host=__http path=//www.thedomain.com :\




here is another example of what I mean: in the string __http
you _seem_ (that what I infer but I don't for sure) assume that
everyone implicitly understands that where yuou place an underscore
should be read as a blank space.



that 'array' is clear as mud.

next time maybe post some code and show (copy+paste) the actual output 
not

some handtyped approximation. And before doing even that I recommend
you always do some simple debugging with var_dump() to examine the
actual contents of the variables in the code that seems to be broken
(once you see what in a variable it is quite often obvious what is going
wrong).



The previous part was from the var_dump ,as explained the url needed 


do you see the difference between the following 2 statements?:

1. 'one has space padding'
2. 'it had a space before the http://'

and with regard to the remark The previous part was from the var_dump
that is just not true as the following code demonstrates
(unless you happen to have a php install with a serverly borked
var_dump() function):

$r = array(
host = __http,
path = //www.thedomain.com
);

var_dump($r);

this outputs (notice how the output is nothing like the string
host=__http path=//www.thedomain.com that you posted originally):

array(2) {
  [host]=
  string(6) __http
  [path]=
  string(19) //www.thedomain.com
}



http://www.google.com/search?num=100q=define%3Averbatim

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] encrypted urls, mcrypt and mod_rewrite

2006-02-23 Thread Jared Williams
 
 Subject: Re: [PHP] encrypted urls, mcrypt and mod_rewrite
 
 Somehow this part of the string is a problem, it has 
 underscores, but there is probably other things in this.
 
 _%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ

I'd base64 encode that first then urlencode :)

 
 On 23/02/2006, at 6:01 PM, Dan Rossi wrote:
 
  Hi ive been trying to find answers with no luck. I am sending a 
  urlencoded encrypted string made with mcrypt. what is happening is 
  there is somehow special characters that mod_rewrite doesnt 
 like so it 
  wont find a regex match properly with this rule
 
  RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA]
 
  Any ideas what it could be doing ? The strings are also 
 quite random, 
  so it will work sometimes for a particular url then other 
 times not ?
 

Jared

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] encrypted urls, mcrypt and mod_rewrite

2006-02-23 Thread Dan Rossi

Ahh thanks heaps, its working more nicely

However, trying to add more data into the encrypted string which is 
then base64_encoded I get a slash in the string which is breaking the 
rewriterule like the other cases.


UmFuZG9tSVYljfOW15UlfzVJV8zBtaEXPh0mPku64cowVrHo%2Fgno9LeTfwejwsmG

The requested URL 
/feeds/UmFuZG9tSVYljfOW15UlfzVJV8zBtaEXPh0mPku64cowVrHo/gno9LeTfwejwsmG 
was not found on this server.


The rewrite rule

RewriteEngine On
RewriteRule ^feeds/(.*)$ /refer.php?$1 [L,NE]

On 23/02/2006, at 9:58 PM, Jared Williams wrote:




Subject: Re: [PHP] encrypted urls, mcrypt and mod_rewrite

Somehow this part of the string is a problem, it has
underscores, but there is probably other things in this.

_%E5%D4%13%82%C9%DFN%5EFs%5E47%B2v%2F%D7%A4%0C%C6%9EnJ


I'd base64 encode that first then urlencode :)



On 23/02/2006, at 6:01 PM, Dan Rossi wrote:


Hi ive been trying to find answers with no luck. I am sending a
urlencoded encrypted string made with mcrypt. what is happening is
there is somehow special characters that mod_rewrite doesnt

like so it

wont find a regex match properly with this rule

RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA]

Any ideas what it could be doing ? The strings are also

quite random,

so it will work sometimes for a particular url then other

times not ?



Jared

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Altering subject of email in a pop3 mailbox

2006-02-23 Thread IG

Thanks, Nobody Special.

You like filling people with confidence. We all have to start somewhere 
don't we? I am starting this completely from scratch and it will be 
quite a while before I put this into service.


However thanks for the information on mail boxes. I don't have much 
knowledge on them because they are all run by our hosting provider. If 
you could point me to somewhere where I can find more information out on 
mailboxes I would be most grateful.


Many thanks,

IG

Nobody Special wrote:

POP is a protocol used for a client to retrieve emails from a mail
box.  There are not pop3 mail boxes.  The types of mail boxes are mbox
and maildir.You cannot modify a message using the pop3 protocol.

I think you are the last person I would want writing a spam filter
because you don't seem to know how mail is stored to begin with.


On 2/22/06, IG [EMAIL PROTECTED] wrote:

Hi all.

Tried to find this and can't find any info.

I am writing a spam filter to run over multiple pop3 mail boxes which
will work on keywords and Bayesian. With a very high score the filter
will simply delete the email, with a med-high it will back the email in
a 'bulk-mail' folder and delete it from the mailbox. with medium score I
was wanting it to append the keyword [spam?] to the subject line and
keep it in the pop3 mailbox. I can't work out how to do this in php. Can
anyone help me on this one? Is it possible to alter a subject line (or
body for that matter) of an email in a pop3 mailbox?

Thanks.

--

[EMAIL PROTECTED]
www.selectperformers.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
Use Linux.
W=Wrong
Proud member of the reality-based community!
In opposing the Federalists, [Jefferson] ushered in a
kind of sustained partisan activity that had never existed
before. Initially called the Republican party, it became known
in the era of Andrew Jackson as simply the Democracy;
later on, it was called the Democratic party. But even the modern
Republican party, formed in 1854, chose its name in part to honor
Jefferson.  -- Joyce Appleby on Jefferson




--

[EMAIL PROTECTED]
www.selectperformers.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php