[PHP] Including Google Ads

2006-08-10 Thread C.F. Scheidecker Antunes

Hello all,

How do I include Google Ads on my PHP script?

I do not want to include it only but to be able to set the keywords for 
the add.


Maybe even have it to change from time to time, probably using AJAX.

Any good pointers on Google Ads?

Thanks,

C.F.

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



[PHP] DDE + PHP

2006-04-09 Thread C.F. Scheidecker Antunes

Hello,

I have an Excel spreadsheet that is automatically updated with quotes. I 
am doing a project for my BS and I need to grab the information from 
this spreadsheet and populate a MySQL database. Any ideas on how to 
accomplish that with PHP? The spreadsheet uses a DDE feed to fetch 
information from a third party service and needs to be opened.


I understand that I can do that with Java as well but if there is a way 
with PHP I prefer.


Thanks,

C.F.

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



[PHP] PHP + DDE live feed

2006-04-09 Thread C.F. Scheidecker Antunes

Hello,

I have an Excel spreadsheet that is automatically updated with quotes. I 
am doing a project for my BS and I need to grab the information from 
this spreadsheet and populate a MySQL database. Any ideas on how to 
accomplish that with PHP? The spreadsheet uses a live DDE feed to fetch 
information from a third party service and needs to be opened.


This is not a matter of reading a static XLS spreadsheet but what I need 
is a DDE way to talk to the open spreadsheet and update the database 
when the cells are changed or have a 1 minute loop to go over the cells.


I understand that I can do that with Java with a commercial package 
called Java DDE as well but if there is a way with PHP I prefer.


Thanks,

C.F.

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



Re: [PHP] Re: PHP book recommendations

2005-02-14 Thread C.F. Scheidecker Antunes
I've enjoyed Schlossnagle as I have it on my personal library.
Also I am finishing to read PHP 5 Power Programming from Prentice Hall 
and the creators of PHP.
If you want to learn coding style and coding good practices check out 
this book.
A cheap place to get books here in the US is bookpool.com

Jason Barnett wrote:
Dave Bosky wrote:
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm 
coding in
the most efficient manner.

What's a few of the better books out there?

HTC Disclaimer:  The information contained in this message may be 
privileged and confidential and protected from disclosure. If the 
reader of this message is not the intended recipient, or an employee 
or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please 
notify us immediately by replying to the message and deleting it from 
your computer.  Thank you.

Advanced PHP Programming by George Schlossnagle is for you.
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins 

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


[PHP] MySQL 4.1 upgrade under PHP4

2005-02-13 Thread C.F. Scheidecker Antunes
Hello all,
Does anyone upgraded from MySQL 4.0 to MySQL 4.1 using PHP 4 code?
If so, what are the changes that were required on the code?
PHP website says that it is required to install a new MySQL extension.
I am doing PHP4 programming under Linux.
What do you suggest that I should be aware while upgrading the server?
Thank you,
C.F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Artificial Intelligence for PHP

2005-02-12 Thread C.F. Scheidecker Antunes
Hello,
I am interested on Artificial Intelligence for PHP, pattern maching, etc.
More specifically: data mining, statistics and pattern maching.
Couple of years ago there was a presentation on the MELL Extension - AI 
for PHP.

I've tried to google it but I've found no code or examples.
Does anyone have any knowledge on using PHP for AI systems or know of 
any resource, a book
or on the internet that might help me out?

Thanks in advance,
C.F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Which PHP for MySQL 4.1

2004-11-11 Thread C.F. Scheidecker Antunes
Hello,
I would like to migrate my MySQL servers from 4.0 to 4.1.
As I use PHP as well as Java with these servers I wonder what PHP 4 
version would be compatible with MySQL 4.1.

Has anyone used MySQL 4.1 with PHP yet?
I appreciate your thoughts.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] opensource php compiler

2004-09-23 Thread C.F. Scheidecker Antunes
Hello all,
There's a compiler called Roadsend which gives you the ability to 
compile php scripts into binaries executables.

That is nice but I wonder if there would be any other compiler that 
would do the job and be opensource.

Does anyone know anything about it or could point me to resources about it?
Thanks,
C.F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] How to get mime type from file name

2004-08-15 Thread C.F. Scheidecker Antunes
Hello,
Is there any function where I can pass a file name like file.png and 
get return the string of its type 'image/png' ?

Basically it is a funcion that takes a file name and returns a string of 
its mime type.

I have used mime_mail to send attachments but the I need when I am 
attaching the file to know its mime type, for instance a zip file or a 
jpg or a txt etc.

Thanks in advance for the help.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] checking for upper case letter on string

2004-08-12 Thread C.F. Scheidecker Antunes
Hello all,
I need to check if there are any upper case letters on a given string. 
There can be one or more letters that might be upper case on a given 
string no matter their position within the string.

Is there any way to check for it?
obs: I do not want to convert to lowercase, but to check for the 
presence of upper case letters.

I copuld iterate through the string and evaluate each caracter but I 
wonder if there is a more effective method to achieve that.

examples:
uyYmfawelk  = returns true
YlsngfswU  = returns true
kjnsdfW  = true
fwerg;m = false
thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Still need help with regex function

2004-07-31 Thread C.F. Scheidecker Antunes
Hello,
In order to get the filenames from the output below I have tried the 
following:

preg_match_all('/inflating:(.*?)/', $stdout, $matches);
print_r($matches);
return $matches[1];
But I only get empty arrays with it.
I need to fix that so I can have the filenames stored on arrays and also 
evaluate the type of output according to
the situations ilustrated bellow.

Contents of $stdout:
unzip test.zip
Archive:  test.zip
inflating: arch1.txt
inflating: arch2.txt
inflating: arch3.txt
inflating: arch4.txt
inflating: arch5.txt
inflating: arch6.txt
The same I have from a pkware execution :
pkunzip teste.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: teste.zip
  Inflating: arch1.txt
  Inflating: arch2.txt
  Inflating: arch3.txt
  Inflating: arch4.txt
  Inflating: arch5.txt
So, I need some help on how to write a regexp to get the values after 
inflating, that is the filenames, and put them in an array. Both outputs 
above are stored on a $stdout php variable.

Also, I need to be able to indentify errors with the unzip utility that 
does not support some types of zip file, the output is like this:

unzip test1.zip
Archive:  test1.zip
 skipping: test1.txt  `shrink' method not supported
There's a skipping instead of a inflating or Inflating in pkware.
The third situation is an error on the zip file itself :
unzip test2.zip
Archive:  test2.zip
End-of-central-directory signature not found.  Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive.  In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of test2.zip or
  test2.zip.zip, and cannot find test2.zip.ZIP, period.
or
pkunzip test2.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: test2.zip
Errors were found in .ZIP file, attempt to fix (Yes/No)? N
PKZIP: (Z152) No CE signature found
Help is much appreacited.
Thanks in advance to all.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] help with regex

2004-07-30 Thread C.F. Scheidecker Antunes
Hello,
I has as the output of a unzip command called from a PHP script the 
following:

unzip test.zip
Archive:  test.zip
 inflating: arch1.txt
 inflating: arch2.txt
 inflating: arch3.txt
 inflating: arch4.txt
 inflating: arch5.txt
 inflating: arch6.txt
The same I have from a pkware execution :
pkunzip teste.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: teste.zip
   Inflating: arch1.txt
   Inflating: arch2.txt
   Inflating: arch3.txt
   Inflating: arch4.txt
   Inflating: arch5.txt
So, I need some help on how to write a regexp to get the values after 
inflating, that is the filenames, and put them in an array. Both outputs 
above are stored on a $stdout php variable.

Also, I need to be able to indentify errors with the unzip utility that 
does not support some types of zip file, the output is like this:

unzip test1.zip
Archive:  test1.zip
  skipping: test1.txt  `shrink' method not supported
There's a skipping instead of a inflating or Inflating in pkware.
The third situation is an error on the zip file itself :
unzip test2.zip
Archive:  test2.zip
 End-of-central-directory signature not found.  Either this file is not
 a zipfile, or it constitutes one disk of a multi-part archive.  In the
 latter case the central directory and zipfile comment will be found on
 the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of test2.zip or
   test2.zip.zip, and cannot find test2.zip.ZIP, period.
or
pkunzip test2.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: test2.zip
Errors were found in .ZIP file, attempt to fix (Yes/No)? N
PKZIP: (Z152) No CE signature found
Help is much appreacited.
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Extracting string from shell_exec call

2004-07-28 Thread C.F. Scheidecker Antunes
Hello all. I have a function that executes the unzip command.
function test_unzip($command) {
   $stdout = shell_exec($command);
   echo $stdout;
}
This is the content of $stdout  after calling it with $command = unzip 
./email/test.zip;
Archive:  ./email/test.zip
 inflating: ./txt/test.txt

What I want to do is to extract the value(s) after inflating, so that I 
can check what was extracted from the zip. The reason why I cannot use 
the PHP zip functions is that I have to use a different decompressing 
utility other than unzip which outputs a different thing. Depending on 
what is output then I can decide what tool to use.

So I need to extract test.txt from the string above. How can I do it?
Sometimes the unzip utility is not compatible with the zip file because 
it might be proprietary. Therefore I will call pkzipc instead of unzip. 
Whenever I have the string from executing unzip :

Archive:  proprietary.zip
  skipping: proprietary.txt  `shrink' method not supported
Now, instead of inflating I have skiping because I cannot unzip this zip 
file with the free unzip utility, instead I call pkzipc and I then suceed:

pkunzip proprietary.zip
PKZIP(R)  Version 6.0  FAST!  Compression Utility for Linux X86
Copyright 1989-2002 PKWARE Inc.  All Rights Reserved. Evaluation Version
PKZIP Reg. U.S. Pat. and Tm. Off.  Patent No. 5,051,745
Extracting files from .ZIP: pv0551.zip
 Unshrinking: proprietary.txt
Therefore, what I need help with is to analyze the $stdout variable:
If that contains inflating I need to know what was decompressed. If 
contains skipping then I must call this function using pkzipc instead. 
Then I must extract whatever value after Unshrinking:

Can anyone help?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Problem with circular include statement

2004-07-27 Thread C.F. Scheidecker Antunes
Hello all,
I have 3 scripts script1.php and script2.php where both include the same 
general.inc file of functions. Then I have script3.php that calls 
functions from both scritp1.php and script2.php. As both script1 and 
script2 include general.inc when I try to use diferent function on 
script3 I have a circular problem that functions on general.inc are 
declared twice. Therefore, how can I solve this circular include 
problem? Can anyone help me?  In C++ you have the pragma keyword to 
avoid this. What can be done in PHP?

When I do a include_once() the problem stays the same.
Thanks in advance.
Here's the scenario in case what I wrote is complicated.
script1.php :
?php
   include(general.inc);
  functions..
?
script2.php :
?php
   include(general.inc);
  functions..
?
script3.php :
?php
   include(script1.php);
   include(script2.php);
   call script1 functions
   call script2 functions
  functions..
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Converting regional decimal numbers

2004-07-23 Thread C.F. Scheidecker Antunes
Hello all,
I have a few users that use a different number format, other than the US 
one, which is 1.526,23 . That is, the comma is used as a separator for 
the fractional part of the number (.23) and the dot is used to separate
thousands. Therefore, I need to convert 1.526,23 to 1,526.23, invert the 
comma and the dot. Some numbers are formated correctly so nothing needs 
to be done, while other need that.

I have writen a function to perform that but it reads char by char and 
has test cases. I first check the position of the dot and the comma. It 
one is higher than the other than I need to convert, if not than I do
nothing. I would like to make it simpler and more efficent and for that 
I need some help from some of the PHP regex experts.

Can anyone help me with this matter?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] replace n first occurences of a char in a string

2004-07-23 Thread C.F. Scheidecker Antunes
Hello all,
If I have a string like this 123.456.789.01 , where dots are used to 
separate the thousands and the decimal part.

How can I first detect this situation? More than one dot. I guess I 
could use str_word_count() from the manual, right?

Then, once I have determined there are more than one dot, how can I 
remove all the dots but the right most one?

so 123.456.789.01 would become 123456789.01 with just the dot before the 
zero.

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


[PHP] Efficient way to filter this string

2004-07-22 Thread C.F. Scheidecker Antunes
Hello,
I have an email string that sometimes has a name and the email address 
between  and sometimes has the email adress right away.

Two examples of the possible value of $address
Joe Doe [EMAIL PROTECTED] 
[EMAIL PROTECTED]

I need to convert this string always to the email address and discard 
the name to the left of the  character, if the string is already 
correct (like [EMAIL PROTECTED]) then do not change it, keep it 
as it is.

I have writen a function to do a for loop and check for the  then copy 
everything to the end removing the . I wonder, is there a more 
efficient, clear way to accomplish this?

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


[PHP] string filtering

2004-07-20 Thread C.F. Scheidecker Antunes
Hello all,
I need to filter some strings. They can only contain characters like 
a...z or A..Z and 0..9. Some strings have blank spaces, -,./?, 
characters that must be discarded. I wrote a function to check each and 
every character but I guess there must be something else more efficient.

Any suggestions?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] More PHPEclipse

2004-07-19 Thread C.F. Scheidecker Antunes
Dan,
I have done the same thing and I have the same problem. Did you make it 
work yet?

In my case however, under Windows, preferences I can see PHP SQL 
(Quantum DB) but not the rest of the
PHP options.

My registry shows (under Help, Configuration details)
*** Plug-in Registry:
net.sourceforge.phpeclipse.debug.core (1.1.0) PHPEclipse Debug Core
net.sourceforge.phpeclipse.debug.ui (1.1.0) PHPEclipse Debug UI
net.sourceforge.phpeclipse.launching (1.1.0) PHPEclipse Launching Support
net.sourceforge.phpeclipse.phphelp (1.1.0) PHP Plugin Help
net.sourceforge.phpeclipse.quantum.sql (2.3.3) Quantum DB Utility
Dan Joseph wrote:
Hi,
I was wondering, is anyone running Eclipse 3.0 w/PHPEclipse 1.1.0?
I'm having trouble getting it working.  I downloaded the July .ZIP file and
unzipped it into the plugins directory.  Its not recognizing it.  Anyone
have this working?
-Dan Joseph
 

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


[PHP] Importing Excel data using PHP

2004-07-19 Thread C.F. Scheidecker Antunes
Hello all,
I need to have some excel capabilities for an automated script. Excel 
can save files in CSV which are very easy to read and parse with PHP as 
they are nothing more than text files.

Pear has a module called Spreadsheet_Excel_Writer so that you can create 
Excel files.

However I need to read data from a simple Excel spreadsheet.
Anyway to do it using PHP?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] separating a file extention

2004-07-18 Thread C.F. Scheidecker Antunes
Hello all,
Is there any easy and efficient way to separate files extention that 
vary in size?

Some have 3 chars after the dot, some 2, some 1, some 4, some none.
Examples:
test.zip
test.gz
test.z
test.jpeg
test.jpg
test  (no extention)
an have the result returned on a $fext field?
I think this can also be done with email domains, returning the string 
right to the at sign.

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


[PHP] Compare two TXT files

2004-07-17 Thread C.F. Scheidecker Antunes
Hello all,
Is there a more efficient way to compare 2 TXT files other than reading 
line by line ?

What I was doing was reading line by line and compare both files, if one 
line is different the loops are interrupted and the function returns true.

Any ideas?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] finding a substring

2004-07-16 Thread C.F. Scheidecker Antunes
Hello all,
I need to read lines within a text file that might have a  
value='somevalue'  string the position of value= varies from line to 
line but there's only one value= in each line.

So what I need to do is to parse the file and find the value= and put 
their values in an array.

Suposse I have the following text file with 3 lines :
snLADEFEFfdgvalue=1234rwgjngrgj
value=23456gkerlgwg
132fngdhbvalue=5678bfl928
I would like to get an array like this:
array[0] = 1234;
array[1] = 23456;
array[2] =  5678;
The value is delimited always by double quotes but its position on the 
line varies. I need to extract these values and put them on a string.

Any ideas or help is appreciated.
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Help on copying part of a text file

2004-07-16 Thread C.F. Scheidecker Antunes
Hello all,
I need some help on the following:
I need to extract a paragraph from a text file that is delimited with a 
--start-paragraph-- and --end-paragraph-- However, after 
--start-paragraph-- there's a blank line that I need to remove.

The delimiter --start-paragraph-- might be one the first line or it 
might be on any middle line of the line. That is, --start-paragraph line 
starts at some point on the file.

Here's na example:
--start-paragraph--
This is a paragraph that I need to extract with a php function and 
return just
the string of it.
--end-paragraph--

After I run the function extract_paragraph($content) I should get the 
string:

This is a paragraph that I need to extract with a php function and 
return just
the string of it.

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


[PHP] MIME files decoding

2004-07-15 Thread C.F. Scheidecker Antunes
Hello all,
In order to use pear mimedecode.php I have a few questions that were not 
answered by the documentation.

I have emails that have .zip, .pdf, .txt and .csv files.
Some emails have more than one attachment.
I would like to have a php script to fetch these emails and save only 
those with .zip , .txt and .csv deleting everything else.

Can anyone point me how to use mimedecode so that I can keep the 
original filename of the attachment. How can I obtain the file name?

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


[PHP] Offset error

2004-07-15 Thread C.F. Scheidecker Antunes
Hello,
error: PHP Notice:  Undefined offset:  1 in 
/home/ant/test.app/teste3/getfiles.php on line 217

I have this Undefined offset error in PHP because I am trying to get a 
value from this $att[$k]-parameters[1]-value  that sometimes does not 
exist with offset 1 as the parameters go up to 0 and not one.

Can anyone tell me how to test the offset 1 or more in the array 
$att[$k]-parameters[1] so that I can avoid this error?

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


[PHP] Problems saving some email attachments

2004-07-15 Thread C.F. Scheidecker Antunes
Hello all,
This is part of a code to save the attachments of an email message that 
I am trying to figure out.

Maybe someone can help me figuring this one out. The code is bellow. I 
am also including part of the emails source codes. One is not multi-part 
and does not work, while the second is a
multi-part one and does work.

If I have a multi-part email body I can parse it and save it easily with 
the code bellow, however if the message has a different body structure, not
being a multipart but something like this:

This does not work:
From: [EMAIL PROTECTED]
To: =[EMAIL PROTECTED]
Subject: =Test
Date: Thu, 15 Jul 2004 14:22:06 -0300
Message-ID: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: application/x-zip-compressed;
   name=nto.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
   filename=nto.zip
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Importance: Normal
X-yoursite-MailScanner-Information: Please contact the ISP for more 
information
X-yoursite-MailScanner: Found to be clean
X-yoursite-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.9,
   required 6, autolearn=not spam, BAYES_00 -4.90)
X-MailScanner-From: [EMAIL PROTECTED]
Status: O
X-UID: 35476
Content-Length: 67371
X-Keywords:

UEsDBBQIABZx7zB9XrH1WMIAAEqjBgAKUEZPMTEzLlRYVMydzXLjOtKm9xMx98Doxcyi
+9j4J7maoChKpkuW1JTs4zrXfyNDQLKYkBK0kcmK+LyqRemJxA+BRCLzxeYwrAvsT6pWPr/6f4nx
z4jr35OUxUe3a4p+u+/b5vC//1eSoFT7+lxcCFKpG0GUEeHxhzPMzbYqv5hCyhvTqGLT784DQvuO
OZq5MTfmzczRzirYeSoozM3b5tl99Z67MfW190jM4/HteeOuzKnt2pKZOmWnMeS2awOZspyYVzvX
Then I cannot parse it with the code bellow.
The following type of message body does work though.
The code bellow only works with a message in this format:
Message-ID: [EMAIL PROTECTED]
From: Me [EMAIL PROTECTED]
To: You [EMAIL PROTECTED]
Subject: estoque
Date: Thu, 15 Jul 2004 18:46:26 -0300
MIME-Version: 1.0
Content-Type: multipart/mixed;
   boundary==_NextPart_000_0001_01C46A9C.08A6AD40
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Virus-Scanned: by MAV
X-Mav-Antispam: pontos
X-yoursite-MailScanner-Information: Please contact the ISP for more 
information
X-yoursite-MailScanner: Found to be clean
X-yoursite-MailScanner-SpamCheck: not spam, SpamAssassin (score=1.034,
   required 6, BAYES_30 -0.90, HTML_MESSAGE 0.10,
   MIME_MISSING_BOUNDARY 1.84)
X-yoursite-MailScanner-SpamScore: 1
X-MailScanner-From: [EMAIL PROTECTED]
X-IMAPbase: 1086548203 35629
Status: O
X-UID: 35629
Content-Length: 147519
X-Keywords:

This is a multi-part message in MIME format.
--=_NextPart_000_0001_01C46A9C.08A6AD40
Content-Type: multipart/alternative;
   boundary==_NextPart_001_0002_01C46A9C.08AFD500
--=_NextPart_001_0002_01C46A9C.08AFD500
Content-Type: text/plain;
   charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
--=_NextPart_001_0002_01C46A9C.08AFD500
Content-Type: text/html;
   charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTMLHEAD
META http-equiv=3DContent-Type content=3Dtext/html; =
charset=3Diso-8859-1
META content=3DMSHTML 6.00.2800.1400 name=3DGENERATOR
STYLE/STYLE
/HEAD
BODY bgColor=3D#ff
DIVnbsp;/DIV/BODY/HTML
--=_NextPart_001_0002_01C46A9C.08AFD500--
--=_NextPart_000_0001_01C46A9C.08A6AD40
Content-Type: application/x-zip-compressed;
   name=not.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
   filename=not.zip
UEsDBBQAAgAIAOSU7zCWW3IuFacBALfKBwAKcHYwNzU3LnR4dKSd23LjtrJA389X8O2kUhwL
DTRuj5RMe5RIlkPJ3jr5/w85ACWL3U0CtGvPruyaVLwGt743wGmaptmkf5qtUnrT3X7fqPxLO/X1
C7C14eXwsX8+Nc998zL0+1Ojnuz/NHcclfJ6owzBFdxhnX7bevx7f2neh9Px5XRtdhMIaGHj1QME
xX61gOf+cGq65/68/zw1Q/+5P3cnwjvFeGU5r/zLaTg+pZFfn7rP7rDvdhyPnuF0Bqhb4w5p3tvT
The contentParts for the first message  is zero, while for the second 
(the multipart) it has more than 2.

Code for Multipart parsing:
$struct = imap_fetchstructure($mbox,$msgno);
$contentParts = count($struct-parts);
  
   show_msg(\tContentParts $contentParts \n,$debug);
  
   if ($contentParts = 2) {
   for ($i = 2; $i = $contentParts; $i++) {
   $att[$i-2] = imap_bodystruct($mbox,$msgno,$i);
   }
   for ($k = 0; $k  sizeof($att); $k++) {
  
   if (strtolower($att[$k]-parameters[0]-value) == 
us-ascii) {
   if ($att[$k]-parameters[1]-value != ) {
   $filenames[$k] = $att[$k]-parameters[1]-value);
   }
   }
   else if (strtolower($att[$k]-parameters[0]-value) != 
iso-8859-1) 

[PHP] PHP5 for Fedora Core 2

2004-07-14 Thread C.F. Scheidecker Antunes
Hello all,
Are there any pre compiled rpm packages from Fedora Core 2 yet?
If not, I will most likely built it myself.
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Best external app from php

2004-06-29 Thread C.F. Scheidecker Antunes
Hello all,
I need to have a web application to call an external app that needs to 
execute on the background. (It is an *NIX server)

The app that is being called will do a lenghty work but will be called 
by a php script through the web server.
An user will log in, request a computation, the script will call an 
external app which will run on the
background. Once the job is completed, a notification will be sent to 
the user which will log in again and check the results.
The external app performs a data mining computation on the SQL server to 
produce  results which will then be written to an SQL table.

My question is this:
Is it better to write the external app in PHP or Java?
If I write in PHP then I have to have a way to make the PHP not bound to 
time limitations as the operation might take a while.
If I write it in Java I won't have this concern. However, I am concerned 
with speed and overhead.
Which one would put a higher load to the processor, a PHP app or a Java 
one?
Which one will take longer?

Also, there might be more than 20 of these threads running on the server 
at the same time, hence my concern on which language the app should be 
writen.

Does anyone has experience with such a scenario?
The input is much apreciated.
Thanks in advance,
C.F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] mail command with PHP 4.3.4-1.1 and Fedora Core 1

2004-05-18 Thread C.F. Scheidecker Antunes
Hello all,
I have updated an old system to Fedora 1 and php php-4.3.4-1.1.
However the mail comand does not work anymore.
The php.ini of the original system did not have anything special.
Sendmail is not being run locally in this machine.
What might be causing it?
Thanks in advance,
C.F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Werid problemswith mail() command: From address on sent messages

2002-11-28 Thread C.F. Scheidecker Antunes
Hello All,

I wonder if is there anyone who ever had the same problem and know how to solve it.

I have a web site that does send e-mail to some users based on requests. The problem 
is that although I pass the right user/from address on the mail function, the message 
source shows From as beeing apache@localhost and therefore some messages bouce back 
due to anti spam filters.

This server is a Red Hat Linux 7.2 and it does not have apache 2.0 but 1.3. It does 
not have sendmail runnig or installed but another server on the same network does have 
it.

The problem is that I do not want and cannot have my message headers with a From: 
Apache@LocalHost as this copy bellow shows:

I've changed the header variable and put a From in it so it does displays the right 
FROM: address as bellow. But as you can see, the Received: (from apache@localhost) by 
servername, etc is there so the spam filters filter it.

Return-Path: apache
Received: (from apache@localhost)
 by ns1.nando.net (8.11.2/8.11.2) id gASLtQM27458;
 Thu, 28 Nov 2002 19:55:26 -0200
Date: Thu, 28 Nov 2002 19:55:26 -0200
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED] 
Subject: Order # 603 (511066220021128194052)
Content-Type: text/html
From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
X-Mailer: PHP/

My php.ini has an smtp entry but no sendmail is running on the local machine. Do I 
have to have one running? I wish I did not have to do it. Any other way to fix this 
issue?




Carlos Fernando Scheidecker Antunes
Linux User #207984



[PHP] Difficult MIME question

2002-09-18 Thread C.F. Scheidecker Antunes

Hello all,

I have one situation other than the normal that I cannot extract/save the
MIME content of an e-mail which Content-type is different than the normal.

When I get attachments that have the following normal structure:

===
Content-Type: application/x-zip-compressed;
name=file1.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=file1.zip
===

It works perfectly. But I some e-mail clients e-mail me somthing like
bellow:

===
Content-Type: application/octet-stream;
name=file2.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=file2.zip
X-MailScanner: Found to be clean
Status:
===

Then, it does not work and the system thinks that the e-mail has NO
ATTACHMENTS.

This is weird. Since the only difference here is the Content-Type besides
the X-MailScanner and Status in the last lines, could anyone help me handle
it?

Also, is there anyway to get arrays for each of then separately like :
Content-Type, Content-Transfer-Encoding and Content-Disposition?

A regular mail client like Netscape and OutlookExpress can easily see the
attachment but I cannot do it with PHP imap.

This is a difficult question. Does anyone know how to answer it?

Thanks,

Carlos Fernando Scheidecker Antunes
Linux User #207984


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