Re: [PHP] Headers already sent error

2005-02-02 Thread Chris
Tim Burgan wrote: Hello, I'm receiving an error "Cannot modify header information - headers already sent by XXX". In my php, I have a heap of code, then use header("Location: blah.php"); to redirect the user. I get this error on the webhost, but not on my local host. I've searched and found th

[PHP] Reading a .doc or .rtf file in php

2005-02-02 Thread sunil
I have got a task of reading a .doc(word document) using php. But while reading doc file, some meta character like boxes and some other characters also appears. I will be highly obliged to you if you send me the code for reading a .doc file using php. Any help appriciated.

Re: [PHP] Multiline data Insert - Resolved

2005-02-02 Thread Alp
Hi Mike, Resolved it. Well, actually your code is a 'for' rather than a 'while' which I realized a bit late. :-) And there were two fullstops that needed to be a comma. Now it works. Thanks a lot for your guidance. Alp "Alp" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Mike,

Re: [PHP] Multiline data Insert Into table from a generated form?

2005-02-02 Thread Alp
Hi Mike, PHP returns a parse error indicating the line number for the while (.) ! Code now is: function add_to_database( $tourid, $dayno, $fromto, $bld, $descrip, &$dberror) { //user connection section--begin $username="root"; $password=""; $database="nazardane"; $link = mysql_pconnect("

[PHP] Re: What's wrong with this rewrite rule?

2005-02-02 Thread Matthew Weier O'Phinney
* Michael <[EMAIL PROTECTED]>: > Chris W. Parker wrote: > > and it's driving me insane. I've got plenty of other rewrite rules > > working perfectly. Here is the rule in question. > > > > RewriteRule ^detail\.asp\?product_id=([\w-]+)$ product.php?id=$1 > > You're insisting that the path to rewrite

Re: [PHP] Headers already sent error

2005-02-02 Thread Robby Russell
On Thu, 2005-02-03 at 12:59 +1030, Tim Burgan wrote: > Hello, > > > I'm receiving an error "Cannot modify header information - headers > already sent by XXX". > > In my php, I have a heap of code, then use header("Location: blah.php"); > to redirect the user. I get this error on the webhost, b

[PHP] Headers already sent error

2005-02-02 Thread Tim Burgan
Hello, I'm receiving an error "Cannot modify header information - headers already sent by XXX". In my php, I have a heap of code, then use header("Location: blah.php"); to redirect the user. I get this error on the webhost, but not on my local host. I've searched and found that this can be cau

[PHP] Re: Is there a function to c if a php function exists

2005-02-02 Thread Jason Barnett
Ben Edwards wrote: ... So something like function_exists( cal_days_in_month() ) http://www.php.net/manual/en/function.function-exists.php And to check if a specific extension is enabled: http://www.php.net/manual/en/function.extension-loaded.php -- Teach a man to fish... NEW? | http://www.catb

Re: [PHP] Is there a function to c if a php function exists

2005-02-02 Thread The Disguised Jedi
The function is called function_exists. Honestly, just look at the manual dude On Tue, 01 Feb 2005 20:33:11 +, Ben Edwards (lists) <[EMAIL PROTECTED]> wrote: > I have been implementing a system on a different ISP than I normally use > and have got:- > > Fatal error: Call to undefined fu

Re: [PHP] Using SELECT IN with arrays

2005-02-02 Thread W Luke
On Thu, 3 Feb 2005 08:37:44 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > > $doms is a "master array" of a user's domains. $d is a > > comma-seperated and unexploded list of domains to filter the SELECT > > down with. (error checking is already in place) > > 1) make both $d and $doms into arra

Re: [PHP] problems with session timeout

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 10:05, Pedro Henrique Calais wrote: > I'm with the following problem: > my PHP scripts takes a very long time to execute (about 3 hours) because > it has has system call to a perl script that is very time consuming. > > in IE (haven't noticed this in Mozilla or Konquer

[PHP] Is there a function to c if a php function exists

2005-02-02 Thread Ben Edwards (lists)
I have been implementing a system on a different ISP than I normally use and have got:- Fatal error: Call to undefined function: cal_days_in_month() in /home/hosted/www.menublackboard.com/public_html/dev/classes/validator.class.php on line 134 I found a reference to this an the web and it seems

[PHP] problems with session timeout

2005-02-02 Thread Pedro Henrique Calais
hey everybody, I'm with the following problem: my PHP scripts takes a very long time to execute (about 3 hours) because it has has system call to a perl script that is very time consuming. in IE (haven't noticed this in Mozilla or Konqueror) the execution of the PHP script doesn't finish, due to

Re: [PHP] Using SELECT IN with arrays

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 07:58, W Luke wrote: > $doms is a "master array" of a user's domains. $d is a > comma-seperated and unexploded list of domains to filter the SELECT > down with. (error checking is already in place) 1) make both $d and $doms into array 2) use array_intersect() to fin

[PHP] Using SELECT IN with arrays

2005-02-02 Thread W Luke
Hi. I'm trying to execute a query which does a SELECT IN on an array...here's how it stands: $doms = implode( "','", $domarray ); $d=$_GET['d'] $qmailsql = "SELECT mq.id, mq.user, mq.domain, mq.sender, mq.arrive_time, mq.subject, mq.body_preview, mq.relay FROM mail_quarantine AS mq WHERE //??

[PHP] Re: How to make binary strings useful?

2005-02-02 Thread DvDmanDT
PHP files can be named whatever you want.. Just know that they are parsed on the serverside, not the client side.. Therefore, text/php would be pretty stupid to do.. And I don't know what you mean be that

[PHP] Re: How to make binary strings useful?

2005-02-02 Thread DvDmanDT
You should use ord() on each of the $cont{} ones.. printf ("%02x %02x %02x %02x", ord($cont{0}), ord($cont{1}), ord($cont{2}), ord($cont{3})); That'll probably work much better.. .. PHP != C++, or C for that matter.. C was designed to be as close as possible to ASM, but high-level.. PH

Re: [PHP] RE: How to make binary strings useful?

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 05:46, Jerry Miller wrote: > Here's the code (with the domain name removed) > that doesn't work, "despite" the poor documentation > of the variable types: > $filename = sprintf ("%s%s", $dir, $file); Wouldn't $filename = $dir . $file; be easier? >

[PHP] Re: How to make binary strings useful?

2005-02-02 Thread DvDmanDT
It's a pretty big difference, so there's logic for that.. You can't really compare them.. Not in my opinion anyway.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Jerry Miller" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > There's a FAQ section entitled "PH

Re: [PHP] How to make binary strings useful?

2005-02-02 Thread Jerry Miller
That should help. Thanks. "Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've written complete file parsers in PHP, and the only snag I've run > into is dealing Signed integers (and larger). > > > Jerry Miller wrote: > > >Is there an example of the UNIX od utility written >

Re: [PHP] Re: How to make binary strings useful?

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 07:00, Jerry Miller wrote: > There's a FAQ section entitled "PHP and Other Languages," > C isn't even listed among them! Neither is Prolog, Pascal, ADA, ..., The point you seem to be missing is that PHP is geared mainly towards creating web pages, that's why ASP, Per

Re: [PHP] How to make binary strings useful?

2005-02-02 Thread Chris
I've written complete file parsers in PHP, and the only snag I've run into is dealing Signed integers (and larger). Jerry Miller wrote: Is there an example of the UNIX od utility written in PHP? Is such a useful task even possible?? From what I've seen of strings, they're completely opaque, so w

RE: [PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Chris W. Parker
Sagaert Johan on Wednesday, February 02, 2005 2:38 AM said: > can i use this kind of construction in my html code ? > > Select high Yes. > if yes , how do i retrieve the passed string in the php code Be sure to validate the data first though. Chris. -- PHP

AW: [PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Mirco Blitz
Hi, There are multiple Ways of getting that string. If your PHP-Server has globals=on in php ini you will recive that string in $selection variable. If not you recive it in $_GET["selection"] So I use a function to handle POST and GET Variabels. function getpost_ifset($test_vars) {

Re: [PHP] Need help with ereg regular expression

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 03:44, KHS wrote: > >On the other hand, I think you could safely do: > > > >$regex = "^#include(.*)$"; > > > >and get what you want by using trim on the captured expression. > > no this would leave me with <, >, and " marks. Then string replace those characters. Or am

[PHP] Re: How to make binary strings useful?

2005-02-02 Thread Jerry Miller
There's a FAQ section entitled "PHP and Other Languages," C isn't even listed among them! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Sagaert Johan
can i use this kind of construction in my html code ? Select high if yes , how do i retrieve the passed string in the php code Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Need help with ereg regular expression

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 02:18, John Nichel wrote: > Argghhhreturn receipts Use a *real* mail client -- one that ignores those stupid things. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Interne

[PHP] PEAR::SOAP returns objects instead of associative arrays

2005-02-02 Thread William Lovaton
Hello, I just found out that since version 0.7, PEAR::SOAP returns stdClass objects instead of associative arrays. http://pear.php.net/package-changelog.php?pacid=87&release=0.7.3 What is the reason for this? I _need_ to get associative arrays, how do I revert to the old behavior? -William --

[PHP] How to make binary strings useful?

2005-02-02 Thread Jerry Miller
Is there an example of the UNIX od utility written in PHP? Is such a useful task even possible?? >From what I've seen of strings, they're completely opaque, so what good does it do to be able to read binary-safe strings from a file??? Even the deprecated (why) $str{$inx} notation apparently r

Re: [PHP] Credit card storing, for processing

2005-02-02 Thread Brian Dunning
It depends on the exact situation, but a lot of times the vendors that process a fraudulent credit card purchase end up eating that loss. I can testify to this by experience. I ate $10,000 on one run of phished transactions. the other 1% by uncrumpling receipts out of a wastebasket. There's no

[PHP] RE: How to make binary strings useful?

2005-02-02 Thread Jerry Miller
Here's the code (with the domain name removed) that doesn't work, "despite" the poor documentation of the variable types: /www/binary/"; $dh = opendir ($dir); do { $file = readdir ($dh); } while (!strncmp ($file, ".", 1)); $filename =

[PHP] PEAR::SOAP returns objects instead of associative arrays

2005-02-02 Thread William Lovaton
Hello, I just found out that since version 0.7, PEAR::SOAP returns stdClass objects instead of associative arrays. http://pear.php.net/package-changelog.php?pacid=87&release=0.7.3 What is the reason for this? I _need_ to get associative arrays, how do I revert to the old behavior? -William --

Re: [PHP] Credit card storing, for processing

2005-02-02 Thread Jason Barnett
Brian Dunning wrote: It's FAR less dangerous to implement what you are suggesting than it is to simply pay for your dinner with a credit card. I agree with this. There is way too much paranoia about credit cards online. 99% of stolen credit card numbers are acquired by phishing and It depends on

Re: [PHP] Credit card storing, for processing

2005-02-02 Thread Brian Dunning
It's FAR less dangerous to implement what you are suggesting than it is to simply pay for your dinner with a credit card. I agree with this. There is way too much paranoia about credit cards online. 99% of stolen credit card numbers are acquired by phishing and the other 1% by uncrumpling receipt

Re: [PHP] Credit card storing, for processing

2005-02-02 Thread Brian Dunning
The SIMPLEST way to do this is to charge their credit card with a recurring charge when they sign up, and then just THROW AWAY their credit card number. Your credit card processing vendor then has to remember their credit card number, not you. I agree. This is the way I've worked for years, and i

RE: [PHP] Credit card storing, for processing

2005-02-02 Thread Brandon Thompson
WowI was hoping someone would respond with a little balance to that reactionary doomsday speech. Don't get me wrong...those are some very valid points that need to be considered, but my gosh... The key-pair idea is very good. I've done systems in the past for clients that work in a similar f

[PHP] Using SSL with PHP5's socket_* functions

2005-02-02 Thread dan
Hello, all - I am a bit new to PHP, especially sockets, so what I am asking may very well be comparing apples to oranges. I am writing a function to interact with an SSL server, but I see no way of how I can communicate over SSL. I expected to be able to enter an address such as https://10.10.

RE: [PHP] Re: What's wrong with this rewrite rule?

2005-02-02 Thread phpnews
On Wed, 2 Feb 2005 12:09:43 -0800, "Chris W. Parker" <[EMAIL PROTECTED]> said: > Michael on Wednesday, February 02, > 2005 11:54 AM said: > > > You're insisting that the path to rewrite start with d. It's not > > going to start with d, it's going to start with /. As in

Re: [PHP] Need help with ereg regular expression

2005-02-02 Thread Richard Lynch
KHS wrote: > Richard Lynch wrote: > >>KHS wrote: >> >> >> >>>Here is an example of the input: >>>#include FT_FREETYPE_H >>>#include >>>#include "freetype/freetype.h" Perhaps: "]?', $text, $answer); echo $answer[1]; ?> -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (h

RE: [PHP] Re: What's wrong with this rewrite rule?

2005-02-02 Thread Chris W. Parker
Michael on Wednesday, February 02, 2005 11:54 AM said: > You're insisting that the path to rewrite start with d. It's not going > to start with d, it's going to start with /. As in "/detail.asp"... > > Easy thing to miss, though... Actually that's not why. None of

[PHP] Re: What's wrong with this rewrite rule?

2005-02-02 Thread Michael
Chris W. Parker wrote: Hello, I've been messing with a certain rewrite rule for about 30 minutes now and it's driving me insane. I've got plenty of other rewrite rules working perfectly. Here is the rule in question. RewriteRule ^detail\.asp\?product_id=([\w-]+)$ product.php?id=$1 You're insisting

[PHP] imap_mail_compose function in PHP5

2005-02-02 Thread Bronislav Klucka
Hi, i've got problem with imap_mail_compose function, I have this code: $envelope["from"]= "[EMAIL PROTECTED]"; $envelope["to"] = "[EMAIL PROTECTED]"; $envelope["cc"] = "[EMAIL PROTECTED]"; $body[1]["type"] = TYPETEXT; $body[1]["subtype"] = "plain"; $b

Re: [PHP] Need help with ereg regular expression

2005-02-02 Thread KHS
Richard Lynch wrote: >KHS wrote: > > > >>Here is an example of the input: >>#include FT_FREETYPE_H >>#include >>#include "freetype/freetype.h" >> >>Here is a snip of my code: >>$line = fgets($fp); >>$line = trim($line); >>$regexp = '^#include(:? | "| <)([^< >"]+)[> "]'; >>//$regexp = '^#include

Re: [PHP] stripos kills my script but strpos is fine?

2005-02-02 Thread Michael
Richard Lynch wrote: Michael wrote: I'm trying to use stripos as a faster and less resource-intensive alternative to preg_match with the i flag, but I'm getting some strange behavior. AFAIK, stripos should behave exactly like strpos except case-insensitively. So in the function above, it should ma

Re: [PHP] Is it possible compile a php script to native binary like perlcc ?

2005-02-02 Thread Richard Lynch
Unreal HSHH wrote: > Is it possible compile a php script to native binary like perlcc ? > That can run the binary and no depend on php. Not truly, but Google for "PHP Compiler" and you should find some alternatives that may fit your needs. Fair Warning: Some will be commercial, some won't. -- L

Re: [PHP] Need help with ereg regular expression

2005-02-02 Thread Richard Lynch
KHS wrote: > Here is an example of the input: > #include FT_FREETYPE_H > #include > #include "freetype/freetype.h" > > Here is a snip of my code: > $line = fgets($fp); > $line = trim($line); > $regexp = '^#include(:? | "| <)([^< >"]+)[> "]'; > //$regexp = '^#include( <| "| )[^< >"]+[> "]'; //Same

RE: [PHP] Need help with ereg regular expression

2005-02-02 Thread Mikey
> Argghhhreturn receipts I just mailed the guy and gave him a friendly nod - they are off now :-) Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is it possible compile a php script to native binary like perlcc ?

2005-02-02 Thread John Nichel
Unreal HSHH wrote: Hi, Is it possible compile a php script to native binary like perlcc ? That can run the binary and no depend on php. Yes. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php

Re: [PHP] Prepend policy

2005-02-02 Thread John Nichel
Sdäv wrote: Hey guys, i was wondering if there is any way to make prepend (php.ini option) work as an include once and not an STD include. You could use the prepended file to do your includes prepend includes.inc.php includes.inc.php --> include_once ( "foo.php" ); include_once ( "bar.php" );

Re: [PHP] Credit card storing, for processing

2005-02-02 Thread Richard Lynch
Angelo Zanetti wrote: > thanks for the info. With regard to the setup it will be something more > or less like this: DON'T DO IT!!! > I want to generate my own keypair. The private key I keep secure, > offline, > on the machine that does the admin (charging, refunds etc). The public > > key is

RE: [PHP] Re: What's wrong with this rewrite rule?

2005-02-02 Thread Chris W. Parker
M. Sokolewicz on Wednesday, February 02, 2005 10:22 AM said: > the problem is actually really easy > You're not asking it on an apache list (this is a PHP list... so why > should anyone here know anything about mod_rewrite for apache?) > > sorry if I sounded rud

[PHP] Need help with ereg regular expression

2005-02-02 Thread KHS
Hi, I'm trying to extract a string using 'ereg()' but it doesn't seem to find some strings. I am using php version 4.3.10 in cli mode. Here is an example of the input: #include FT_FREETYPE_H #include #include "freetype/freetype.h" Here is a snip of my code: $line = fgets($fp); $line = trim($line

RE: [PHP] Is it possible compile a php script to native binary like perlcc ?

2005-02-02 Thread Jay Blanchard
[snip] Is it possible compile a php script to native binary like perlcc ? That can run the binary and no depend on php. [/snip] See http://www.priadoblender.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regular expresion

2005-02-02 Thread Richard Lynch
php wrote: > I want to parse a html file > for instance > > > aaa > aaa hhh > aaa eee > aaa > > > and I want to create a regular expresion wich is able to extract entire > text > from enclosed tags WITHOUT a

Re: [PHP] PHP Memory limit exceeded

2005-02-02 Thread Richard Lynch
Ben-Nes Yonatan wrote: > $data = "INSERT INTO test_files (bin_data, filename, filesize, filetype) > VALUES ('$data', '$imagefile[name]', '$imagefile[size]', > '$imagefile[type]')"; // creating the sql for the insert, i called the > received value also $data cause i dont want to keep the previ

Re: [PHP] Need help with ereg regular expression

2005-02-02 Thread John Nichel
Argghhhreturn receipts -- John C. Nichel ÜberGeek KegWorks.com 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 create system users with php

2005-02-02 Thread Richard Lynch
Umar Draz wrote: > i want a script that i can add system user through > php. For example i > have FreeBSD 5.3 for adding a user in freebsd i use > this command > > pw useradd username -g groupname -d /home/username -m > > now i want creating user through php what kind of > script will be > requir

[PHP] Is it possible compile a php script to native binary like perlcc ?

2005-02-02 Thread Unreal HSHH
Hi, Is it possible compile a php script to native binary like perlcc ? That can run the binary and no depend on php. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: What's wrong with this rewrite rule?

2005-02-02 Thread M. Sokolewicz
the problem is actually really easy You're not asking it on an apache list (this is a PHP list... so why should anyone here know anything about mod_rewrite for apache?) sorry if I sounded rude, but that's just the way I feel about it Chris W. Parker wrote: Hello, I've been messing with a cert

Re: [PHP] Multiline data Insert Into table from a generated form?

2005-02-02 Thread Alp
Thank you Mike for your quick reply. I will try to incorporate it into the function I'm using and let you know the result. The function code is also given below. Alp function add_to_database( $tourid, $dayno, $fromto, $bld, $descrip, &$dberror) { //user connection section--begin $username="roo

Re: [PHP] stripos kills my script but strpos is fine?

2005-02-02 Thread Richard Lynch
Michael wrote: > I'm trying to use stripos as a faster and less resource-intensive > alternative to preg_match with the i flag, but I'm getting some strange > behavior. > > Here's a test script that demonstrates the problem: > --- > $days = array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); >

Re: AW: [PHP] regular expresion

2005-02-02 Thread Stian Berger
Hi! strip_tags() would not solve his problem, although that was my first thought as well. To skip tags, including content, where content contains certain words is possible. But to me the problem occurs with nested tags. What do you want to do when you meet tables? Here is an example that so

Re: [PHP] Prepend policy

2005-02-02 Thread Richard Lynch
Sdäv wrote: > Hey guys, i was wondering if there is any way to make prepend (php.ini > option) work as an include once and not an STD include. Well, it's for sure gonna get included once, right? If you're worried about it getting included again... I'm not sure of the semantics of: Does it get

[PHP] Re: Question

2005-02-02 Thread a_pyramidin
I have corrected your document. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Prepend policy

2005-02-02 Thread Sdäv
Hey guys, i was wondering if there is any way to make prepend (php.ini option) work as an include once and not an STD include. Tnx Sdäv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] What's wrong with this rewrite rule?

2005-02-02 Thread Chris W. Parker
Hello, I've been messing with a certain rewrite rule for about 30 minutes now and it's driving me insane. I've got plenty of other rewrite rules working perfectly. Here is the rule in question. RewriteRule ^detail\.asp\?product_id=([\w-]+)$ product.php?id=$1 The URL I'm testing this with is: ht

Re: [PHP] Link to content of Directory

2005-02-02 Thread Steve Buehler
At 10:52 AM 2/2/2005, Marquez Design: Steve Marquez wrote: Greetings all, I am currious if someone could point me to a script to list the content of a directory, then link to each file in that directory. Example: The directory contains 80 .GIF files. I want to create a page that will have links to

Re: [PHP] DomElement oddness

2005-02-02 Thread Chris Boget
> Consider the following: Never mind. I'm retarded. :p Sorry, folks. Nothing to see here but an empty brain cavity. Move along. :) thnx, Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Link to content of Directory

2005-02-02 Thread Marquez Design: Steve Marquez
Greetings all, I am currious if someone could point me to a script to list the content of a directory, then link to each file in that directory. Example: The directory contains 80 .GIF files. I want to create a page that will have links to each file. Is this possible? Thank you very much, --

[PHP] DomElement oddness

2005-02-02 Thread Chris Boget
Consider the following: This function - function setAttribute( $nodeName, $attributeName, $attributeValue ) { $domElement = $this->DOMDocument->get_elements_by_tagname( $nodeName ); if( $domElement ) { echo 'ObjectData: ' . print_r( $domElement,

RE: [PHP] Fighting user's cache with an updated image

2005-02-02 Thread Chris Ramsay
Check out: http://uk2.php.net/manual/en/function.header.php Where you will find: Read the documentation - it may be just what you need for this problem... Chris Ramsay Web Developer - The Danwood Group Ltd. Tel #: +44 (0)1522 882 288 DDI #: +44 (0)1522 834 482 Fax #: +44 (0)1522 884 488 Email

[PHP] Fighting user's cache with an updated image

2005-02-02 Thread Dave
PHP General, The Situation: I have a form on my web page which uses PHP to upload an image into a user's directory. Because I use the uploaded image in a variety of places in my web site, my script renames the file to conform to naming conventions I use on the site. Users can keep one i

Re: [PHP] Escaped characters

2005-02-02 Thread Brian Dunning
Thanks! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] stripos kills my script but strpos is fine?

2005-02-02 Thread Michael
I'm trying to use stripos as a faster and less resource-intensive alternative to preg_match with the i flag, but I'm getting some strange behavior. Here's a test script that demonstrates the problem: --- $days = array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); foreach ($days as $d) {

Re: [PHP] Re: how create system users with php

2005-02-02 Thread Marek Kilimajer
M. Sokolewicz wrote: shell_exec('pw useradd username -g groupname -d /home/username -m'); however, you'd need to be running as root, or atleast need to su to root; which is quite a security hazard I recomend sudo. You can set strict restrictions on the executed commands and its arguments. Umar D

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Tom
Graham Cossey wrote: You don't say how many tables you have, how they are named or anything outside of the query itself. Assuming that not all your tables are named PID_* how about simply doing SHOW TABLES LIKE '%PID_%' and selecting appropriate results within the php script using strstr or regular

Re: [PHP] PHP Memory limit exceeded

2005-02-02 Thread Marek Kilimajer
Ben-Nes Yonatan wrote: Hi all, I got a problem with uploading files which encounter the memory limit when their size is not even close to the memory limit itself, let me explain. My server is as follows: 1. PHP 4.3.9 2. DB - Postgresql 7.4 3. Apache 1.3.26 Here is my code that i made for testing

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Graham Cossey
You don't say how many tables you have, how they are named or anything outside of the query itself. Assuming that not all your tables are named PID_* how about simply doing SHOW TABLES LIKE '%PID_%' and selecting appropriate results within the php script using strstr or regular expressions? SHOW

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Marek Kilimajer
Shaun wrote: Hi guys, Thanks for your replies but neither UNION or REGEXP can be used with SHOW TABLES... Any ideas? It's time to change your table design. Use one pid table and add another column that would hold the number. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

RE: [PHP] Getting two queries into one result set

2005-02-02 Thread Jay Blanchard
[snip] Thanks for your replies but neither UNION or REGEXP can be used with SHOW TABLES... [/snip] SHOW TABLES is such a limited query and allows for such primitive conditionals that you would probably have better results doing two queries and looping them into the same output -- PHP General Mai

Re: [PHP] Getting two queries into one result set

2005-02-02 Thread Shaun
Hi guys, Thanks for your replies but neither UNION or REGEXP can be used with SHOW TABLES... Any ideas? "Jochem Maas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Marek Kilimajer wrote: >> Shaun wrote: >> >>> Hi, >>> >>> I have a query where I select all table names where the

[PHP] Re: how create system users with php

2005-02-02 Thread M. Sokolewicz
shell_exec('pw useradd username -g groupname -d /home/username -m'); however, you'd need to be running as root, or atleast need to su to root; which is quite a security hazard Umar Draz wrote: Hi dear members!! i want a script that i can add system user through php. For example i have FreeBS

Re: [PHP] Credit card storing, for processing

2005-02-02 Thread Robin Vickery
On Wed, 02 Feb 2005 01:24:18 -0500, Angelo Zanetti <[EMAIL PROTECTED]> wrote: > > Does this setup sound secure enough and a solution that can work? > What kind of encryption should I be using? > > Point out any areas where you think I might be missing something or > going wrong. Take Richard's a

Re: [PHP] Multiline data Insert Into table from a generated form?

2005-02-02 Thread Mike Smith
> Code: > print ' align="center">'; > print ''; > $i = 1; > while ($i <= $tour_days) { > print ''; > print ''; > $days = ("Day 0".$i); > print $days; > print ''; > print ''; > print ''; > print ''; > print ''; > print ' wrap="virtual">'; > $i++; > } > print ''; > print

[PHP] Multiline data Insert Into table from a generated form?

2005-02-02 Thread Alp
Hi experts, I'd like your advice on the following as to how to approach/resolve. I'm generating a form based on a user input number, say 3, where 3 lines for input for a few fields are created. What would be the appropriate way to append these 3 seperate lines into the table all at one go? I have

Re: [PHP] cal_days_in_month() missing, how can I tell if it exists

2005-02-02 Thread Ben Edwards
On Tue, 1 Feb 2005 18:57:12 -0600, James Kaufman <[EMAIL PROTECTED]> wrote: > On Tue, Feb 01, 2005 at 08:47:29PM +, Ben Edwards wrote: > > I have been implementing a system on a different ISP than I normally use > > and have got:- > > > > Fatal error: Call to undefined function: cal_days_in_mon

AW: [PHP] regular expresion

2005-02-02 Thread Mirco Blitz
Hi, Use strip_tags() instead of regex. http://www.php-center.de/en-html-manual/function.strip-tags.html Greetings Mirco -Ursprüngliche Nachricht- Von: php [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 2. Februar 2005 09:25 An: php-general@lists.php.net Betreff: [PHP] regular expresion

[PHP] PHP Memory limit exceeded

2005-02-02 Thread Ben-Nes Yonatan
Hi all, I got a problem with uploading files which encounter the memory limit when their size is not even close to the memory limit itself, let me explain. My server is as follows: 1. PHP 4.3.9 2. DB - Postgresql 7.4 3. Apache 1.3.26 Here is my code that i made for testing the problem (along the

[PHP] how create system users with php

2005-02-02 Thread Umar Draz
Hi dear members!! i want a script that i can add system user through php. For example i have FreeBSD 5.3 for adding a user in freebsd i use this command pw useradd username -g groupname -d /home/username -m now i want creating user through php what kind of script will be required thanks

[PHP] regular expresion

2005-02-02 Thread php
I want to parse a html file for instance aaa aaa hhh aaa eee aaa and I want to create a regular expresion wich is able to extract entire text from enclosed tags WITHOUT a particular word for example

Re: [PHP] fsockopen

2005-02-02 Thread Bostjan Skufca @ domenca.com
Last two examples are fine as connection is obviously established, it is the communication with server that is causig an error. Read http protocol documentation. You do not want such a degree of control over communication you can just use file_get_contents($url); where $url is "http(s)://your.