From: Pseudonyme on
Hi all !

I have some questions to you, experts, that relate to the PERL
LANGUAGE

1. Is that possible to recognize the platform of a website ?
From example : If I take this website : http://www.latimes.com
How do I know if it is a PERL, a PHP or ASP ?
Is there a trick ?

2. The Get-Web-Content PERL function.
How to get the content using PERL script ?
In PHP : it is like this :

$homepage = file_get_contents(''http://andersen.times.com/adveruser/
adverpay.php?country=1270331545&time=1236928998');
echo $homepage;

What about in PERL ?

Thank you very much dear Madams and Sirs, for your answer.

Norman Cougloff


From: Tad McClellan on

[ alt.perl trimmed from newsgroups, I don't participate in alt.* groups ]


Pseudonyme <normancougloff(a)gmail.com> wrote:

> Subject: Re: Perl & Get web content Perl-Function [Expert]


Please see the Posting Guidelines that are posted here frequently.


> I have some questions to you, experts, that relate to the PERL
> LANGUAGE


I don't know of any PERL language, though I know a bit about the Perl
language.

perldoc -q difference

What's the difference between "perl" and "Perl"?


> 1. Is that possible to recognize the platform of a website ?


You can *sometimes* glean the OS or web server being used by
examining the HTTP headers.

my $agent = WWW::Mechanize->new();
my $response = $agent->head( 'http://www.latimes.com' );
print $response->as_string();


> From example : If I take this website : http://www.latimes.com
> How do I know if it is a PERL, a PHP or ASP ?
> Is there a trick ?


The programming language used is not a "platform".

In fact, a website may be implemented using ALL of those languages.



Why do you think that you need to know the "platform" of a website?



> 2. The Get-Web-Content PERL function.
> How to get the content using PERL script ?


You should check the Perl FAQ before asking in the Perl newsgroup.

perldoc -q HTML

How do I fetch an HTML file?


--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
From: J�rgen Exner on
Pseudonyme <normancougloff(a)gmail.com> wrote:
>Hi all !

Dear Pseudonyme

>I have some questions to you, experts, that relate to the PERL
>LANGUAGE

I think you meant "Perl language"?

>1. Is that possible to recognize the platform of a website ?

The OS can be found in $^O.

>From example : If I take this website : http://www.latimes.com
>How do I know if it is a PERL, a PHP or ASP ?
>Is there a trick ?

Oh, you didn't mean OS when you said platform. No, there isn't and there
can't be because
- the HyperTextTransferProtocol doesn't provide this information
- the web server can map any URI into whatever the user has configured
and can reply with whatever it feels appropriate to use
- any web site can use none or any combination of those and other

BTW: this question has nothing to do with Perl but is about how HTTP and
web servers work.

>2. The Get-Web-Content PERL function.
>How to get the content using PERL script ?

You use get() from WWW::Mechanize.

jue
From: Pseudonyme on

Thank you Madams and Sirs,


get() from WWW::Mechanize.
That one sounds a nice function. Cool ! I will search the options that
relate to that function ?

1 - PHP versus PERL

The Perl language seems more powerful than the PHP Language. What kind
of music sounds to your ears about this sentence ?


2 - PHP into PERL ?
An automatic tool to convert ?
A translator like translating italian into english ... some tools work
so well in that matter !


3 - PERL is also a community like PHP ?

perldoc -q and http://perldoc.perl.org/

MSFT offers for example a fantastic and exhaustive documentation for C+
+ Development (MSDN). How is the documentation with Perl ?

Again, the answers we have from you are very important, and thank you
for that


Norman Cougloff.




How

From: Randal L. Schwartz on
>>>>> "Pseudonyme" == Pseudonyme <normancougloff(a)gmail.com> writes:

Pseudonyme> 1 - PHP versus PERL

Pseudonyme> The Perl language seems more powerful than the PHP Language. What
Pseudonyme> kind of music sounds to your ears about this sentence ?

cha-ching.

:-)


Pseudonyme> 2 - PHP into PERL ?
Pseudonyme> An automatic tool to convert ?

Nothing I know of.

Pseudonyme> 3 - PERL is also a community like PHP ?

Pseudonyme> perldoc -q and http://perldoc.perl.org/

Pseudonyme> MSFT offers for example a fantastic and exhaustive documentation for C+
Pseudonyme> + Development (MSDN). How is the documentation with Perl ?

Better than many projects, but spotty coverage in places.

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn(a)stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion