php.de

Zurück   php.de > Webentwicklung > PHP-Fortgeschrittene

PHP-Fortgeschrittene Arbeiten mit PHP ohne Einschränkungen

Antwort
 
LinkBack Themen-Optionen Thema bewerten
Alt 11.12.2004, 11:04  
Gast
 
Beiträge: n/a
Standard [Erledigt] Linux Console: Benutzereingaben

Hallo!
Ich habe auf meinem Server den Icq client micq installiert.
Jetzt wollte ich via php icq nachrichten schicken.
Ich habe nur keine Ahnung wie ich das machen soll.
ich habe mir eine Pseudo Console gebastelt:
PHP-Code:
<?php
if($_POST['hidden']){
$value $_POST['command'];
$output shell_exec($_POST['command']);
$output .= "\n $value";
}
?> 
[..]
So damit kann ich auch schon sehr einfache Linux-Befehle ausführen.
Allerdings kann ich keine Eingaben machen.
Also wenn ich z.B. bei micq eine Nachricht eintippen will klappt das nicht weil er den micq befehl dann ausführt und nicht den Befehl micq übergibt!
Wie kann ich also Benutzereingaben realisieren?

und2: Wie kann ich das machen das die ganze geschichte nicht über den nobody-user verläuft?
  Mit Zitat antworten
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 11.12.2004, 13:01  
Gast
 
Beiträge: n/a
Standard

schau dir mal proc_open() an, könnte dir evt. helfen
  Mit Zitat antworten
Alt 11.12.2004, 13:07  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von Snake
schau dir mal proc_open() an, könnte dir evt. helfen
ich verstehe die Funktion nicht so recht.
Könnte du mir bitte erklären in wie fern mir die Funktion helfen kann?!
  Mit Zitat antworten
Alt 11.12.2004, 13:12  
Gast
 
Beiträge: n/a
Standard

sobald die manual englisch wird versteht mans ned...

du willst doch dem programm etwas sagen, wie ich das verstanden habe.
also consolen eingaben im programm machen?

dann starte ein programm mit proc_open() und kannst dann mit anhand von dem codebeispiel in der manuel in das programm rein schreiben
  Mit Zitat antworten
Alt 11.12.2004, 21:21  
Gast
 
Beiträge: n/a
Standard

Ok.
Ich will es verstehen aber tue es nicht.
Was soll dieses Array?
PHP-Code:
$descriptorspec = array(
   
=> array("pipe""r"),  // stdin is a pipe that the child will read from
   
=> array("pipe""w"),  // stdout is a pipe that the child will write to
   
=> array("file""/tmp/error-output.txt""a"// stderr is a file to write to
); 
  Mit Zitat antworten
Alt 11.12.2004, 22:58  
Gast
 
Beiträge: n/a
Standard

Zitat:
Zitat von Du-weisst-schon-wer
Was soll dieses Array?
PHP-Code:
$descriptorspec = array(
   
=> array("pipe""r"),  // stdin is a pipe that the child will read from
   
=> array("pipe""w"),  // stdout is a pipe that the child will write to
   
=> array("file""/tmp/error-output.txt""a"// stderr is a file to write to
); 
Zitat:
Zitat von Handbuch
descriptorspec is an indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process. pipes will be set to an indexed array of file pointers that correspond to PHP's end of any pipes that are created.
  Mit Zitat antworten
Alt 13.12.2004, 08:52  
Erfahrener Benutzer
 
Registriert seit: 19.10.2004
Beiträge: 498
marsch
Standard

Zitat:
Zitat von meikel
Zitat:
Zitat von Handbuch
descriptorspec is an indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process. pipes will be set to an indexed array of file pointers that correspond to PHP's end of any pipes that are created.
Ich nehme mal, dass er genau das nicht versteht
Zitat:
Zitat von Du-weisst-schon-wer
Was soll dieses Array?
PHP-Code:
$descriptorspec = array(
   
=> array("pipe""r"),  // stdin is a pipe that the child will read from
   
=> array("pipe""w"),  // stdout is a pipe that the child will write to
   
=> array("file""/tmp/error-output.txt""a"// stderr is a file to write to
); 
@Du-weisst-schon-wer Du erzeugst einfach einen neuen Prozess, das ist das Kind. Damit Eltern- und Kindprozess kommunizieren können, öffnen sie Kommunikationskanäle, das sind die Pipes. Diese sind Einbahnstraßen, man kann also entweder "draufschreiben" oder davon lesen. $descriptorspec ist einfach die Beschreibung der Kind-Pipes, von "0" wird gelesen (Papa gibt Anweisung), Widerworte an Papa werden vom Kind an Pipe "1" geschickt, dort liest Papa ...
__________________
Cheers, Marco
marsch ist offline   Mit Zitat antworten
Alt 13.12.2004, 14:28  
Gast
 
Beiträge: n/a
Standard

Zitat:
$descriptorspec ist einfach die Beschreibung der Kind-Pipes, von "0" wird gelesen (Papa gibt Anweisung), Widerworte an Papa werden vom Kind an Pipe "1" geschickt, dort liest Papa ...
<ggg> Gern gelesen und gelacht. :wink:
  Mit Zitat antworten
Alt 13.12.2004, 15:19  
Erfahrener Benutzer
 
Registriert seit: 14.01.2004
Beiträge: 2.543
fantast
fantast eine Nachricht über ICQ schicken
Standard

Zitat:
Zitat von meikel
Zitat:
Zitat von Du-weisst-schon-wer
Was soll dieses Array?
PHP-Code:
$descriptorspec = array(
   
=> array("pipe""r"),  // stdin is a pipe that the child will read from
   
=> array("pipe""w"),  // stdout is a pipe that the child will write to
   
=> array("file""/tmp/error-output.txt""a"// stderr is a file to write to
); 
Zitat:
Zitat von Handbuch
descriptorspec is an indexed array where the key represents the descriptor number and the value represents how PHP will pass that descriptor to the child process. pipes will be set to an indexed array of file pointers that correspond to PHP's end of any pipes that are created.
du sadist *g
__________________
Was ist validität?
fantast ist offline   Mit Zitat antworten
Antwort


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Linux als zweites OS. Was brauche ich alles? Ticos Server, Hosting und Workstations 4 09.02.2007 15:30
linux 9.3 startmenü chiliGREEN Server, Hosting und Workstations 9 30.07.2006 23:17
kostenlose und vollständige PHP-IDE für linux? PHP Tipps 2005-2 3 12.10.2005 17:58
Datenbank in Windows und Linux benützen karl Datenbanken 4 12.10.2005 14:37
Datenbank in Windows und Linux benützen karl PHP Tipps 2005-2 1 12.10.2005 12:06
Zeitlimit auch auf der Console? madhatter Server, Hosting und Workstations 4 20.07.2005 01:40
[Erledigt] erste Gehversuche mit Linux Server, Hosting und Workstations 19 01.06.2005 21:34
AOL bei Linux ClaBo3 Server, Hosting und Workstations 7 18.05.2005 13:24
Linux Console PHP-Fortgeschrittene 1 28.04.2005 10:21
[Erledigt] TTF-Fonts unter Linux anders als unter Win (GD2) Server, Hosting und Workstations 2 15.03.2005 11:25
PHP einrichten unter Linux Server, Hosting und Workstations 3 04.03.2005 20:53
[Erledigt] Linux Server, Hosting und Workstations 14 25.11.2004 17:04
webserver mit linux flyingeagle Server, Hosting und Workstations 10 02.11.2004 19:14
Umstieg auf Linux Quadaptor Server, Hosting und Workstations 17 05.10.2004 11:55
[Erledigt] php script in linux console selbstaufrufen PHP-Fortgeschrittene 2 07.09.2004 15:36

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
linux console user anzeigen, linux benutzereingaben, php linux console, linux konsole benutzer, php eingabe, benutzerdetails anzeigen linux, linux console user auflisten, linux console benutzer, error console linux, linux konsole mit php anzeigen, php console benutzer eingaben, php script linux console, linux console benutzereingaben, konsole benutzereingaben, linux konsole auflisten user, linux php script console, linux benutzereingabe, php linux konsole, benutzereingabe linux, linux users anzeigen console

Alle Zeitangaben in WEZ +2. Es ist jetzt 20:04 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.