[PHP] Execute a script from command line on a Linux system with Plesk (safe mode) [solved]

2008-01-05 Thread Leonidas Safran
Hello, I found it myself... I just start php in command line with "--php-ini " where I set safe_mode Off. Bye :) -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail -- PHP General Mailing List (http://www.php

[PHP] Execute a script from command line on a Linux system with Plesk (safe mode)

2008-01-05 Thread Leonidas Safran
Hello, I am trying to execute this script (from command line): function getMailboxSize($domain, $mailbox){ // Maildirectories are stored under /var/qmail(mailnames/domain/mailuser $path = "/var/qmail/mailnames/" . $domain . "/" . $mailbox; $size = shell_exec("cd " . $path . ";du -bc * | grep t

[PHP] Re: loadHTML/loadHTMLFile - DOM functions [solved]

2006-09-18 Thread Leonidas Safran
Hello Rob, > Try this line: > $this->ticker .= utf8_decode($child_elements->item($j)->textContent); > Your original HTML document is ISO-8859-1, so when you want the text > I think you want to convert the UTF-8 (Internally DOM document > works with UTF-8) to ISO-8859-1. Just using the utf8_dec

[PHP] Re: loadHTML/loadHTMLFile - DOM functions

2006-09-17 Thread Leonidas Safran
Hello Rob, > Do you have your code somewhere? Yes, I paste it below. There are two files, one for HTML output (which I make invisible with style declaration "display:none;" and the second file is a javascript function which is supposed to output the content... Another thing I realized that I f

[PHP] Re: loadHTML/loadHTMLFile - DOM functions

2006-09-17 Thread Leonidas Safran
Hello Rob, Thank you for your advices... :-) > Is there a meta tag that specifies the encoding? > When loading HTML that is also used to determine the encoding. > I think I need to clarify the encoding issue: > I'll bet when the document is loading, the encoding is being properly > detected. Wh

[PHP] Re: loadHTML/loadHTMLFile - DOM functions

2006-09-15 Thread Leonidas Safran
Hello Rob, Thanks for answering (so fast)... :-) > Remember most of the functionality - other than the saveXML(), > saveHTML() functions - output using UTF-8 > (which you would need to convert to what ever encoding you need). Well I did try before loadHTML call: $doc = new DomDocument('1.0',

[PHP] loadHTML/loadHTMLFile - DOM functions

2006-09-15 Thread Leonidas Safran
Hello all, Again a question on the new DOM functions... The loadHTML function doesn't support any attribute and I'm wondering how to handle non-text content. Image tags from source webpage are loaded as "objects" or whatever; they appear as special chars("show source" from browser shows big em

Re: [PHP] DOM - parse HTML document [solved]

2006-09-13 Thread Leonidas Safran
Hello Tedd, > Interesting -- it doesn't work for me. I keep getting -- > Parse error: parse error, unexpected T_OBJECT_OPERATOR > -- in your if statement. But, I don't see the problem. Maybe it has something to do with your php version. I have php 5.04 installed (Fedora Core 4 rpm package). H

Re: [PHP] DOM - parse HTML document [solved]

2006-09-12 Thread Leonidas Safran
Hello all, I have found a way... $doc = new DomDocument(); $doc->loadHTMLFile($source["url"]); $elements = $doc->getElementsByTagName("tr"); $i = 0; while( $elements->item($i) ){ if( $elements->item($i)->hasAttributes() && preg_match("/td[0|1]/",$elements->item($i)->getAttribute("id")) > 0 ){

Re: [PHP] DOM - parse HTML document

2006-09-12 Thread Leonidas Safran
Hello Satyam, > That is correct but it is not complete. Everything that relies > on a unique id would fail, CSS amongst others(which is what this > article covers), but not the only one. > Basically there are two functions to get elements by id or name: > getElementById and getElementsByName.

Re: [PHP] DOM - parse HTML document

2006-09-11 Thread Leonidas Safran
Hello Satyam, Thanks for your answering... >> I don't really get it to work with that functions from >> http://www.php.net/manual/en/ref.dom.php >> I try to get the content of fields on an external html page, where >> I just know some ids of the rows. >> Example: >> ... >> >> 1234 >> >> >>

[PHP] DOM - parse HTML document

2006-09-11 Thread Leonidas Safran
Hello all, I don't really get it to work with that functions from http://www.php.net/manual/en/ref.dom.php I try to get the content of fields on an external html page, where I just know some ids of the rows. Example: ... 1234 1234 1234 1234 ... PS: Please note, that id is written mor

Re: [PHP] mail() returns false but e-mail is sent ?

2006-06-26 Thread Leonidas Safran
Hello, > Show us the full context of the code. The example you give us will work fine > but that doesn't tell us what's really going on in your code. Here is the function I use to allow french special characters in the subject line (copied from german university tutorial http://www-cgi.uni-reg

[PHP] mail() returns false but e-mail is sent ?

2006-06-25 Thread Leonidas Safran
Hello, I'm wondering about the behavior of the mail() function. $sent = mail($destination, $subject, $content, $headers); I use some optional header parameters: "From:[EMAIL PROTECTED]: 1.0\r\nContent-Type: text/plain; charset=ISO-8859-1\r\nContent-Transfer-Encoding: quoted-printable\r\n". Can

Re: RE: [PHP] PHP_fsockopen_connection refused(111)

2006-02-09 Thread Leonidas Safran
Hello, >I am also creating the same thing... >I use socket_create(), and it works fine. Who is the registrar? Well I try querying denic which is the german registry. I finally got it to work, but it seems it is a name<->ip resolving issue. Instead of using the whois.denic.de as a name, I used th

[PHP] PHP_fsockopen_connection refused(111)

2006-02-09 Thread Leonidas Safran
Hello, I'm writting a domain checker and for that, I want to use fsockopen to send data to the registry's whois database. Unfortunately I have always "Connection refused", Error 111 when try to create a socket... Even the example shown on php.net website doesn't work, so I believe it's not a code