php-general Digest 2 Sep 2007 07:42:33 -0000 Issue 4995

Topics (messages 261596 through 261610):

what is my dns ip address
        261596 by: Olav Mørkrid
        261597 by: Richard Heyes
        261600 by: Per Jessen
        261601 by: Richard Heyes
        261610 by: Per Jessen

php-tidy
        261598 by: OOzy Pal
        261599 by: Jens Kleikamp
        261604 by: OOzy Pal

[EMAIL PROTECTED]: Re: [PHP] what is my dns ip address]
        261602 by: Robert Degen
        261603 by: Richard Heyes

question about making modules
        261605 by: Mark
        261606 by: Robert Degen

Opensource CPanel
        261607 by: John Taylor-Johnston

Re: Pragmatically changing a "Record Number"
        261608 by: Bill Guion

Re: mail() silly question
        261609 by: Brian Seymour

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
is there a function in php that will return the ip address of the dns
server on the system?

eg.

$dns_ip = get_dns_ip_address();

--- End Message ---
--- Begin Message ---
Olav Mørkrid wrote:
is there a function in php that will return the ip address of the dns
server on the system?

eg.

$dns_ip = get_dns_ip_address();


Don't know of a specific command that returns them, but you could parse the output of nslookup and cache the results.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:

> Olav Mørkrid wrote:
>> is there a function in php that will return the ip address of the dns
>> server on the system?
>> 
>> eg.
>> 
>> $dns_ip = get_dns_ip_address();
> 
> 
> Don't know of a specific command that returns them, but you could
> parse the output of nslookup and cache the results.

Or read the contents of /etc/resolv.conf



/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
Or read the contents of /etc/resolv.conf

Faster for static DNS servers, but if you're using DHCP assigned servers, they aren't likely to be in there.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:

>> Or read the contents of /etc/resolv.conf
> 
> Faster for static DNS servers, but if you're using DHCP assigned
> servers, they aren't likely to be in there.
> 

Yes they are.  The DNS resolver has just one place to look, and
that's /etc/resolv.conf.  


/Per Jessen, Zürich

--- End Message ---
--- Begin Message ---
I have php4 running on Ubuntu Feisty. I can see php5-tidy in the
Synaptic (Package Manager) but can not see php4-tidy or php-tidy. How
can I install php4-tidy for php4?

-- 
OOzy
Ubuntu-Feisty

--- End Message ---
--- Begin Message ---
OOzy Pal schrieb:
> I have php4 running on Ubuntu Feisty. I can see php5-tidy in the
> Synaptic (Package Manager) but can not see php4-tidy or php-tidy. How
> can I install php4-tidy for php4?
> 
On linux:

- download the source
- untar and go to directory
- /path/to/phpize
- ./configure   ( maybe --help )
- make
- make install
- enable the new extension in the php.ini
- done

hth
Jens

--- End Message ---
--- Begin Message ---
On 9/1/07, Jens Kleikamp <[EMAIL PROTECTED]> wrote:
> OOzy Pal schrieb:
> > On 9/1/07, Jens Kleikamp <[EMAIL PROTECTED]> wrote:
> >
> >> OOzy Pal schrieb:
> >>
> >>> I have php4 running on Ubuntu Feisty. I can see php5-tidy in the
> >>> Synaptic (Package Manager) but can not see php4-tidy or php-tidy. How
> >>> can I install php4-tidy for php4?
> >>>
> >>>
> >> On linux:
> >>
> >> - download the source
> >> - untar and go to directory
> >> - /path/to/phpize
> >> - ./configure   ( maybe --help )
> >> - make
> >> - make install
> >> - enable the new extension in the php.ini
> >> - done
> >>
> >> hth
> >> Jens
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >>
> > Great but I got stuck finding the source code. I found the source code
> > for tidy2 which works only for php5. Can you help?
> >
> >
> try this link: http://pecl.php.net/get/tidy
>
> or use cvs to checkout the current source version.
> http://www.php.net/anoncvs.php
>
> hth
> jens
>
> --
> codes & concepts
> Gesellschaft für Kommunikation und Informationstechnologie
> Meffert, Schüller & Kleikamp GbR
> Wormser Str. 55
> 50677 Köln
>
> Fon:      +49 (0) 221 719 218 8
> Fax:      +49 (0) 221 719 218 7
> Email:    [EMAIL PROTECTED]
> Internet: http://www.codes-concepts.com
>
>

Thank you, worked perfect.

-- 
OOzy
Ubuntu-Feisty

--- End Message ---
--- Begin Message ---
>> Or read the contents of /etc/resolv.conf

I'm not familiar with, but does any MS product have any 
comparable file? I remember a "host(s)" ... file somewhere below 
system32\etc\... but is there any resolv.conf ?

I got no win machine here with me, so I can't look it up :-)

> Faster for static DNS servers, but if you're using DHCP 
> assigned servers, 
> they aren't likely to be in there.

[...]

--- End Message ---
--- Begin Message ---
Robert Degen wrote:
Or read the contents of /etc/resolv.conf

I'm not familiar with, but does any MS product have any comparable file?

There is a hosts file, but no resolv.conf or equivalent AFAIK.

--
Richard Heyes
+44 (0)800 0213 172
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

--- End Message ---
--- Begin Message ---
Hey,

i've been trying alot to make php modules (php based.. not real
modules for php in c) but i can't get it working.

Here is a sample file:

<?php
    class moduletest
    {
        function text()
        {
            return "moduletest<br />";
        }
    }

    class test_moduletest extends moduletest
    {
        function text()
        {
            return "test_moduletest<br />";
        }
    }

    $test = new moduletest;
    $test2 = new test_moduletest;

    echo $test->text();
    echo $test2->text();
?>

Now what you get when running this file:
moduletest
test_moduletest

That's logical and not the problem
The issue is that i want the test_moduletest class to overwrite
functions in moduletest but without the need for me to call the class
again.

So the result i want with $test->text(); == "test_moduletest"
and $test must initialize the moduletest class!! not the test_moduletest class.

I want to use this as a (obvious) module system so that others can
extend the base class with more advanced features or improve existing
features by overwriting them.

i did found a place where this is being done: "ADOdb Lite" but i can't
find out how that script is doing it..

Any help with this would be greatly appreciated

Thanx,
Mark.

--- End Message ---
--- Begin Message ---
Maybe you should deal with some things like....

* Plugin-Architecture
* Extension Points
* States !?

A look at wikipedia might give most information you need.

Regards
rob


On Sa, Sep 01, 2007 at 11:23:31 +0200, Mark wrote:
> Hey,
> 
> i've been trying alot to make php modules (php based.. not real
> modules for php in c) but i can't get it working.
> 
> Here is a sample file:
> 
> <?php
>     class moduletest
>     {
>         function text()
>         {
>             return "moduletest<br />";
>         }
>     }
> 
>     class test_moduletest extends moduletest
>     {
>         function text()
>         {
>             return "test_moduletest<br />";
>         }
>     }
> 
>     $test = new moduletest;
>     $test2 = new test_moduletest;
> 
>     echo $test->text();
>     echo $test2->text();
> ?>
> 
> Now what you get when running this file:
> moduletest
> test_moduletest
> 
> That's logical and not the problem
> The issue is that i want the test_moduletest class to overwrite
> functions in moduletest but without the need for me to call the class
> again.
> 
> So the result i want with $test->text(); == "test_moduletest"
> and $test must initialize the moduletest class!! not the test_moduletest 
> class.
> 
> I want to use this as a (obvious) module system so that others can
> extend the base class with more advanced features or improve existing
> features by overwriting them.
> 
> i did found a place where this is being done: "ADOdb Lite" but i can't
> find out how that script is doing it..
> 
> Any help with this would be greatly appreciated
> 
> Thanx,
> Mark.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Und komm, Du brauchst nur einen Baum
um 1000 Streichhölzer herzustellen.
Aber Du brauchst nur einen Streichholz
um 1000 Bäume abzubrennen.
Meine Güte wer soll das denn jetzt verstehen?
Ganz egal, komm wir bleiben noch etwas länger.
Die Bedeutung zahlt ja immer der Empfänger

--- End Message ---
--- Begin Message ---
Does anyone recommend a decent server panel, one like cpanel?
Something made from PHP preferably?

--- End Message ---
--- Begin Message --- I don't think you really want to do that, either. You don't need a field in the database to accomplish what you are trying to do. Execute your query to select the records you want, sorting them into what ever order you want. When you display the records on your web page, add a PHP variable, say $row_number, which starts at 1, and increments by one for each row you display.

     -----===== Bill =====-----

At 3:09 PM -0400 8/29/07, Jason Pruim wrote:

And what I'm looking for is away to take rows 4 and 5 and move them to rows 2 and 3 so the next record inserted would be row 4 :)


it does not go back and fill in the holes/gaps

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]


--

Reality is the leading cause of stress, for those in touch with it.

--- End Message ---
--- Begin Message ---
As a general rule, use ' ' for literal strings and " " for strings you want
escaped characters and such to take effect. Example:

echo 'foo\nbar' will echo foo\nbar
where as
echo "foo\nbar" will echo
foo
bar

Hope this helped.

Brian Seymour
Zend Certified Engineer
AeroCoreProductions
http://www.aerocore.net/
Cell: (413) 335-2656

-----Original Message-----
From: Rodrigo Poblanno Balp [mailto:[EMAIL PROTECTED] 
Sent: Saturday, September 01, 2007 9:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP] mail() silly question

I have a question that might be too silly for those of you who are PHP
gurus.

Here it comes:

I had a mail (specifically in the headers) function call like this:

$header = "";
$header .= 'From: [EMAIL PROTECTED]"; $header .= 'MIME-Version:
1.0\r\n"; $header .= 'Content-type: text/html; charset=iso-8859-1\r\n";
$header .= "Reply-To: ".utf8_decode($nombreVar)." 
".utf8_decode($apellidosVar)."<$mailVar>\r\n";
$header .= "X-Mailer: PHP/".phpversion()."\r\n"; $header .= "X-Priority: 1";

and the mail(...) function always returned TRUE, but the mail was NOT sent.

After hours of... trial/error debugging, I noticed from an example that it
should be:

$header = "";
$header .= 'From: [EMAIL PROTECTED]' . "\r\n"; $header .=
'MIME-Version: 1.0' . "\r\n"; $header .= 'Content-type: text/html;
charset=iso-8859-1' . "\r\n"; $header .= "Reply-To:
".utf8_decode($nombreVar)." 
".utf8_decode($apellidosVar)."<$mailVar>\r\n";
$header .= "X-Mailer: PHP/".phpversion()."\r\n"; $header .= "X-Priority: 1";

Question:

Why? What's the real difference between
    $header .= 'From: [EMAIL PROTECTED]' . "\r\n"; and
    $header .= 'From: [EMAIL PROTECTED]";

?
If somebody knows, please let me know!

Thank you in advance.

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

--- End Message ---

Reply via email to