[PHP] Caching in php?

2002-02-06 Thread Erick Papadakis

hello, 

i used asp and it seems there is an application object
which can help in caching of data. (e.g.,
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=142).


is this possible using php? what can i do to use
caching on my website which is totally database
driven?

thanks/erick

__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




[PHP] regexp question - extracting wanted ascii characters only?

2001-04-04 Thread Erick Papadakis

Hi,

I need to do a simple thing. I want to read a binary
file (e.g., microsoft word, excel etc) and then
extract only the text from it. I am using simple
fopen() and fread() and when I print out the contents
of the file, it returns me the text but apart from the
text, there is some junk which is probably because of
the file being binary. 

Is it possible through the regexp to specify that I
only want some of the ASCII characters from the binary
stream? Here is the perl equivalent: 

/([\040-\176\s]{3,})/g

I want only those words that are minimum 3 characters
and I want the characters to match the ASCII numbers
from 40 to 176. 

Would really appreciate any help 

Thanks!




__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] login without database

2001-04-01 Thread Erick Papadakis

Does this work on Windows machines?  WHat is the $PHP_AUTH_USER and where
does it come from? What should my access.inc.php look like? I saw the
PHP_AUTH_USER on the www.php.net website but looks like it is only possible
on PHP module, not pHP CGI?

Thanks in advance




-
"Romeo Manzur" [EMAIL PROTECTED] wrote:

 require('acces.inc.php');
 if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $st_LOGIN)  (
 $PHP_AUTH_PW == "$st_PASSWORD" )) ) {
   header("WWW-Authenticate: Basic entrer=\"Admin Basta\"");
   header("HTTP/1.0 401 Unauthorized");
   echo "Access in-autorizado...";
   exit;
 }

 where access.inc.php has the variables $st_LOGIN and st_PASSWORDS for
 authenticate you login, you have to put this code before the html tag...
 luck...



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 07-Mar-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mail(): \r\n gives extra empty line between each line in Outlook

2001-04-01 Thread Erick Papadakis

I am not sure what you want to do, but you could try this:

$myText = nl2br($dataFromSubmittedTextBox);


Then $myText will have the correct values.

Cheers


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 07-Mar-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] reading microsoft word, excel, pdf document text

2001-03-25 Thread Erick Papadakis

hi david,

thanks for the note. ok, here is what i want to do. i
want my users to upload WORD, XLS, PPT and PDF files.
when they upload, i store these files in the temp
directory, grab the text from them, and then put it
into my database for later searching. i dont care
about the formatting, i only care about the text
because i need the keywords later for searching. 

can i run some sort of a parser on the server side
like the wvware.com's word parser and just call it
through php? i have not been able to figure out how to
do this using php. 

i would really appreciate any ideas and suggestions! 

thanks/erick



__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] reading microsoft word, excel, pdf document text

2001-03-25 Thread Erick Papadakis

hi renike,

thanks for that link, but looks like that tutorial
will only work on windows machines (because of COM
objects)?

i am on a linux box.


cheers/erick



--- Reinke Bonte [EMAIL PROTECTED] wrote:
 Hey Erick,
 
 unfortunately I know little about this myself, but
 I'm sure, this article
 will help you as a starting point.
 
 http://www.phpbuilder.com/columns/alain20001003.php3
 
 
 Good luck
 
 
 -ren



__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] reading microsoft word document text in php?

2001-03-23 Thread Erick Papadakis

hi david, thanks for the response! would u also know how i can read some
excel and powerpoint files?

thanks/erick




 If youu are on a *nix system, there is a package called mswordview, or
 alternatively you could check the www.htdig.org site for document parsers
 (catdoc.pl and parsedoc.pl, I think).




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] reading microsoft word document text in php?

2001-03-23 Thread Erick Papadakis

actually, i am not sure how i can use this to convert an uploaded word or
pdf file into plain text and then do somethign with that text? can someone
please help?

thanks/erick




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP_SELF problems!

2001-03-23 Thread Erick Papadakis

hi,

i am using my program

http://localhost/test.php

inside this program is a form, which points to $PHP_SELF

but, when i submit this form, the link actually becomes

http://localhost/php/php.exe/test.php

this results in some images not being displayed correctly!

is there anyway i can disable this, and make the PHP SELF same as the
original?

thanks/erick





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] reading microsoft word document text in php?

2001-03-21 Thread Erick Papadakis

hello, i need to read a microsoft Word document on the server through my
file system. is there a way i can read the text of a word document?

thanks/erick





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] problem with include/require

2001-03-11 Thread Erick Papadakis

Hi Yasuo,

Thanks for the reply, but yes I do know that the include_path in php.ini
should have the entries. But is this something new? I want to know how to
allow including and requiring files just like we used to do in PHP3!

For instance, let us say that we have two software programs on the server
which are completely unrelated (I use Windows platform, so here it is):

c:\apache\htdocs\software1\includes
c:\apache\htdocs\software2\includes

Now with the latest PHP I have to include both these above paths in my
PHP.INI's "include_path" directive. is there a way to avoid this, and only
include the "c:\apache\htdocs"?

Yes, I know that I can make a common INCLUDES folder, but come on lets be
practical.  It is a lot cleaner if we can have an include folder INSIDE the
software-specific folder.

Any ideas would be greatly appreciated!

Thanks/Erick


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 07-Mar-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problem with include/require

2001-03-10 Thread Erick Papadakis

i installed my php on my windows machine using the "php triad" software
which i downloaded from www.sourceforge.net. however, now i have a problem
with "include" command. for everything i wish to include into my programs, i
need to speficy this folder in the "include_path" inside my php.ini. can i
change this configuration?

for example, lets say i have a directory called:

c:/apache/htdocs/phpprograms/

inside this phpprograms, i have the following files:

class_include.phpi
actual_program.php

inside my "actual_program.php", i require the "class_include.phpi", but this
gives me a runtime error.

i think it must be some configuration problem? i would appreciate if someone
can tell me how to do this!

cheers/erick




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 07-Mar-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Is PHP ready for XML?

2001-03-05 Thread Erick Papadakis

I am beginning on how to work with xml, but i need some prelim help. let us
say i have an XML file as follows:

---
Book
AuthorJonathan Swift/Author
NameGulliver's Travels/Name
/Book

Book
AuthorAgatha Christie/Author
NameMurder on 57/Name
/Book
---

I want to know if PHP supports the following to do with the above file:

- How to list the above information on a HTML page (I mean
  using PHP of course) - in tables.Which functions should
  I use, EXPAT functions or DOM functions? (Whats the
  difference?)

- What if I need to search through a XML file? How would
  I go about doing it - recommended way?

- What if I needed to add a new tag to all the BOOKS in the
  XML file. For instance,


Isbn2390737-380973/Isbn

  How would I do this for all the books in my XML file?



I'd appreciate any help! Thanks!

Erick.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Stripping HTML selectively?

2001-03-03 Thread Erick Papadakis

Thanks Brian, I have tried the allowable tags, but I need to remove the
ATTRIBUTES of a tag, not the tag itself. STRIP_TAGS totally removes the tag,
and ALLOWABLE_TAGS lets the tag be. WHat I wish to do is let the main tag be
but remove its attributes, as follows:

Original text:
font class="something" style=""Hi!/font

Parsed text:
fontHi!/font

Thanks/erick


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Stripping HTML selectively?

2001-03-02 Thread Erick Papadakis

Hello,

need some help. i need to take an HTML file that is written by a user in a
very bad format, for instance:

font class="sometihng" style=""Hi!/font

and get the following:

fontHi!/font


i tried to look at "strip_tags" but then it only returns me:


Hi!


thanks in advance/erick



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] newbie: xslt help!

2001-01-23 Thread Erick Papadakis

hi, 

i dug around and found that there is something called
XSLT and that there are things like coccon etc in java
from apache group, and php's own parser (sablotron?)
that i can use to transform xml into javascript and
html. 

my problem is that i need to create a xslt parser that
i can use both in java and jsp based implementations
as well as php based ones. so most likely i should use
something that is supported on both platforms. 

my questions: 

1. which parser should i use to achieve this? i would
really appreciate any ideas.

2. are there any examples of doing this? i mean
converting an xml file into html and javascript at
runtime? so that i have just one php script that reads
the xml files and draws my pages on my website. 

3. does anyone know why php.net chose sablotron for
their xslt functions? i am interested in just the
reasons that i can bounce off as well. 

thanks in advance/erick



__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] random no. between two numbers?

2001-01-16 Thread Erick Papadakis

hi,

in php, how can i generate a random no. but between
two numbers? for example, i need to generate any
integer, randomly, between 1 and 1000. 

thanks a lot! 

regards/erick


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]