Re: [PHP] Re: Re: Freshmeat question

2003-01-21 Thread David T-G
Deco --

...and then De deco said...
% 
% I am not new to programming, just to scripting languages. I have seen that Perl has 
some high advanced sintaxes for string processing, for example, but I don't know if 
the same level can also be achieved in PHP...?

PHP is quite perl-ish, and supports some extended functions borrowed
straight from Perl.


% 
% As for the script below, could I run it inside a (my) browser? This could be in any 
browser?

A browser won't run a php script; in a web surfing context it's the
server that runs it, just like a mod_perl script.

Just like Perl, though, you can

  php /path/to/myscript.php

from the command line (if you built php to not only install a web server
module but also generate a standalone executable) and away you go.  You
might want to use -q to turn off the http header output.

So the short answer is "no", but don't let it throw you.


HTH & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!




msg93725/pgp0.pgp
Description: PGP signature


[PHP] Re: Re: Freshmeat question

2003-01-20 Thread De deco
Thanks Martin.

This is great. :)

I am not new to programming, just to scripting languages. I have seen that Perl has 
some high advanced sintaxes for string processing, for example, but I don't know if 
the same level can also be achieved in PHP...?

As for the script below, could I run it inside a (my) browser? This could be in any 
browser?


---Original Message---

Date: Mon, 20 Jan 2003 15:51:05 +0100
From: Martin Thoma <[EMAIL PROTECTED]>
Subject: Re: Freshmeat question
To: [EMAIL PROTECTED]

Well, it's quite easy: Just write a php-script and start it with php
myscript.php. Thats all.

You could fetch a web-page with fopen:
$fp = fopen("http://www.mydomain.com/";,
"r");
$line = "";
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

If you are new in programming, I think PHP is easyier to learn than
Perl.

Martin
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Meet Singles
http://corp.mail.com/lavalife


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