This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

exec with php script (not running)

Help for those learning Tcl or writing their own scripts.
Post Reply
K
Keen
Voice
Posts: 10
Joined: Wed Jan 28, 2009 7:47 pm

exec with php script (not running)

Post by Keen »

Hello i try to run a php script that writes random string in a file but nothing changes when i use this tcl with eggdrop. I can see that php file can write a string into dosya.conf when i enter command php -f portdegistir.php

Can you help me please i just want to run that php script correcty. I hope you understand sorry for my bad english.

Code: Select all

bind raw * notice portsifre

proc portsifre {from keyword arg} {
  global tj
    if {[string match -nocase "*Client connecting*" $arg]} {
    #Girişte notice sorgusu alalım
set port [lindex $arg 8]
       set nick [lindex $arg 9]

set command "/home/sohbetka/eggdrop/scripts/portdegistir.php"
exec php -f $command
}
}
User avatar
heartbroken
Op
Posts: 110
Joined: Thu Jun 23, 2011 11:15 pm
Location: somewhere out there

Post by heartbroken »

Code: Select all

bind raw * notice portsifre 

 proc portsifre {from keyword arg} { 
   global tj 
  if {[string match -nocase "*Client connecting*" $arg]} {
    set phpfile "scripts/portdegistir.php"  
    set port [lindex $arg 8] 
    set nick [lindex $arg 9] 
    set command "php -f $phpfile DEBUG" 
   catch {eval exec $command}
   }
   return 0
 } 
Life iS Just a dReaM oN tHE wAy to DeaTh
Post Reply