Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!not-for-mail From: "M. Strobel" Newsgroups: comp.lang.php,alt.os.linux.ubuntu Subject: Re: getting a php capability on ubuntu was Re: using scripting languages to automate a browser Date: Mon, 11 Feb 2013 12:39:33 +0100 Lines: 61 Message-ID: References: <51176D1D.7030501@arnowelzel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de +tD1I6zcaZ+gigLLm12luwSrpRNCi9OEDDttjo75ap6g4riQP5hXtRTVIhc47A1v8= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130105 Thunderbird/17.0.2 In-Reply-To: Xref: csiph.com comp.lang.php:8338 Am 11.02.2013 03:58, schrieb Cal Dershowitz: > On 02/10/2013 02:49 AM, Arno Welzel wrote: >> Cal Dershowitz, 2013-02-10 09:04: > > [x-posted to alt.os.linux.ubuntu] > > >>> I've been trying to use perl to automate processes that aren't much more >>> than a few GUI events that a person would do if he had a browser. >>> >>> #!/usr/bin/perl -w >>> use strict; >>> use autodie; >>> use utf8; >>> use WWW::Mechanize; >>> >>> my $url = 'http://translate.google.com/'; >>> my $mech = WWW::Mechanize->new; >>> my $result = $mech->get($url); >>> die "GET failedn" unless $result->is_success; >> [...] >> >>> Is this something that php can do in a way that involves less grief? >> >> I don't think so. >> >> But if you need to use Google Translate as a service, see here: >> >> >> >> Well - the service is not for free. Therefore i doubt that using >> as a "service" through scripts is legal. >> >> > > Thanks for your comments, Arno, I'm just trying to get used to websites from the > point-of-view of machines. I don't want this as a "service" that I would put on my > guinea pig 1and1 website. With all the reading I did, I do want to use php on my > website now. > > I think we're all in agreement that php is the wrong tool for what I wanted to do, > but I've always wanted to have more-sophisticated content on my own site, in > particular the ability to host video. > > The tutorial I looked at wants me to install XAMPP. Is that the best idea for > getting a php development environment squared away given that this > > $ uname -a > Linux fred-desktop 3.2.0-33-generic-pae #52-Ubuntu SMP Thu Oct 18 16:39:21 UTC 2012 > i686 athlon i386 GNU/Linux > > is my platform? As I look through synaptic for packages that match php, there might > be 2 hundred. > > Before I went ahead and fiddled with it, I thought I'd ask to see if someone has been > around the block on this once, which is one more than me right now. Linux/Unix is the native platform for PHP development. Get a decent IDE with syntax checking, set all encodings to utf-8, start your local web server and there you go. /Str.