How to switch off your usb external drive after umount and stop its spinning heads?
[Leggi]
WebServices in PHP
So, you’ve to consume webservices integrating all this in a simple php app. There’re tonns of docs but you don’t know where to start. So, let’s start!
A WS is an application accessible on the web thru given rules (ex. a simple WS can perform the sum of two number).
To use a WS you need to know how to use it, which parameters take on input, and what returns. The WSDL of the application contains this information.
More info on Creating And Consuming Web Services In Php 5
Now let’s stumble upon some code. To use a webservice (aka consume it) we can use SoapClient php class, described in http://it.php.net/soap
// create a new soapclient object
$wsdl = "http://localhost/myservice/wsdl";
$wsapi = new SoapClient($wsdl, array("admin", "password"));
SoapClient loads the WSDL (it’s an xml file) thus learning
- the list of methods
- the url of each method
- the signature of each method (params in, params out)
It eventually authenticates agains webservices with “login” and “password”.
If the WSDL contains the following information:
- method: add(a,b)
- url: http://localhost/myservice/add
- params: a: integer, b: integer
- return: x: integer
then we can invoke directly from php (withouth further definitions):
// now it's all defined! the wsdl did all the job
$sum = $wsapi->add("1","3");echo "$sum";
Enjoy!
Gfxboot con GRUB (SuSE-like)
Visto che a molti non piace avere il classico grub (bianco su nero), e l'idea di avere un'immagine di sfondo limitata ad una manciata di colori non è proponibile, ho cercato il modo per avere un grub simile a quello di (Open)SuSE: animazioni (o solo anche immagini migliori) per la scelta del S.O.
by Enrico Bassetti - http://www.enricobassetti.altervista.org/guide/gfxgrub.php
| Indice: |
Creare un mirror locale - Debian & derivati
In questo (mini)-howto descriverò "come fare" per creare un mirror locale dopo una breve riflessione sull'effettiva convenienza.
by Enrico Bassetti - http://www.enricobassetti.altervista.org/guide/apt-mirror.php
| Indice: |
SSH Chrooted
In questo howto esploreremo una delle possibilità di chroot di ssh, ovvero come restringere l'utente alla sua home, creando una fake root.
by Enrico Bassetti - http://www.enricobassetti.altervista.org/guide/ssh_chrooted.php
WPA su Linux
Linux Terminal Server Project HowTo
Questa guida è vecchia!! Ubuntu difatti, con la sua distribuzione derivata "Edubuntu", permette di ricreare un ambiente LTSP con 2 apt-get (o direttamente nell'installazione). Usate questa guida quindi come referenza per eventuali problemi.
by Enrico Bassetti - http://www.enricobassetti.altervista.org/guide/ltsp.php
Una introduzione ad Alsa
L'ultilizzo dell'audio sotto linux rimane un po' un settore sconosciuto, il supporto per le schede audio non è dei migliori eppure la struttura che gestisce il tutto c'è ed è funzionale.In questo piccolo articolo spiegheremo alcune cose fondamentali sull'uso di Alsa, per riuscire un po' a cavare il ragno dal buco!