< ? p h p 
 
 r e q u i r e _ o n c e   _ _ D I R _ _   .   ' / c o n f i g . p h p ' ; 
 
 r e q u i r e _ o n c e   _ _ D I R _ _   .   ' / d b . p h p ' ; 
 
 
 
 / * * 
 
   *   `m^IRk0m_aqpiZ=AnVR_S(RSvep2
 
   * / 
 
 f u n c t i o n   f i n d _ r u l e _ r e p l y ( s t r i n g   $ c o n t e n t ) :   ? a r r a y 
 
 { 
 
         $ p d o   =   g e t _ p d o ( ) ; 
 
 
 
         / /   OXaq9p}\SVR_S}\@U̓0[Z.\]}~ W? M V P   Xpn
 
         $ s q l   =   " S E L E C T   *   F R O M   a u t o _ r e p l y _ r u l e s   W H E R E   i s _ a c t i v e   =   1   O R D E R   B Y   i d   A S C " ; 
 
         $ s t m t   =   $ p d o - > q u e r y ( $ s q l ) ; 
 
         $ r u l e s   =   $ s t m t - > f e t c h A l l ( ) ; 
 
 
 
         $ c o n t e n t L o w e r   =   m b _ s t r t o l o w e r ( $ c o n t e n t ,   ' U T F - 8 ' ) ; 
 
         e r r o r _ l o g ( " = = =   YtRWVR_S[ o? = = = " ) ; 
 
         e r r o r _ l o g ( " "&1WZXOXqg:   ' { $ c o n t e n t } ' " ) ; 
 
         e r r o r _ l o g ( " ^g vPk`:   ' { $ c o n t e n t L o w e r } ' " ) ; 
 
         e r r o r _ l o g ( " YtRW~f:   "   .   c o u n t ( $ r u l e s ) ) ; 
 
 
 
         f o r e a c h   ( $ r u l e s   a s   $ r u l e )   { 
 
                 $ k e y w o r d   =   t r i m ( ( s t r i n g ) $ r u l e [ ' k e y w o r d ' ] ) ; 
 
                 i f   ( $ k e y w o r d   = = =   ' ' )   { 
 
                         e r r o r _ l o g ( " YtRWI D   { $ r u l e [ ' i d ' ] } :   Obmet]~4s}t[C~" ) ; 
 
                         c o n t i n u e ; 
 
                 } 
 
                 $ k w L o w e r   =   m b _ s t r t o l o w e r ( $ k e y w o r d ,   ' U T F - 8 ' ) ; 
 
                 e r r o r _ l o g ( " YtRWI D   { $ r u l e [ ' i d ' ] } :   Obmet? ' { $ k e y w o r d } ' ,   Op_SU= ' { $ k w L o w e r } ' ,   ~7p= { $ r u l e [ ' m a t c h _ t y p e ' ] } " ) ; 
 
 
 
                 i f   ( $ r u l e [ ' m a t c h _ t y p e ' ]   = = =   ' e q u a l ' )   { 
 
                         i f   ( $ c o n t e n t L o w e r   = = =   $ k w L o w e r )   { 
 
                                 e r r o r _ l o g ( " A? 9p}\SVR_S,aY}OQ~epIRgjD   { $ r u l e [ ' i d ' ] } " ) ; 
 
                                 r e t u r n   $ r u l e ; 
 
                         }   e l s e   { 
 
                                 e r r o r _ l o g ( " A? 9p}\SVR_So:   ' { $ c o n t e n t L o w e r } '   ! = =   ' { $ k w L o w e r } ' " ) ; 
 
                         } 
 
                 }   e l s e   {   / /   c o n t a i n 
 
                         i f   ( m b _ s t r p o s ( $ c o n t e n t L o w e r ,   $ k w L o w e r ,   0 ,   ' U T F - 8 ' )   ! = =   f a l s e )   { 
 
                                 e r r o r _ l o g ( " A? VmT`VR_S,aY}OQ~epIRgjD   { $ r u l e [ ' i d ' ] } " ) ; 
 
                                 r e t u r n   $ r u l e ; 
 
                         }   e l s e   { 
 
                                 e r r o r _ l o g ( " A? VmT`VR_So" ) ; 
 
                         } 
 
                 } 
 
         } 
 
 
 
         e r r o r _ l o g ( " ȓEXRbccmf.\]IR? ) ; 
 
         e r r o r _ l o g ( " = = =   YtRWVR_Sdko  = = = " ) ; 
 
         r e t u r n   n u l l ; 
 
 } 
 
 
 
 / * * 
 
   *   ~ WfqSY? /   PkS
 
   * / 
 
 f u n c t i o n   g e t _ s e t t i n g ( s t r i n g   $ k e y ,   $ d e f a u l t   =   n u l l ) 
 
 { 
 
         $ p d o   =   g e t _ p d o ( ) ; 
 
         $ s t m t   =   $ p d o - > p r e p a r e ( " S E L E C T   ` v a l u e `   F R O M   s e t t i n g s   W H E R E   ` k e y `   =   : k   L I M I T   1 " ) ; 
 
         $ s t m t - > e x e c u t e ( [ ' : k '   = >   $ k e y ] ) ; 
 
         $ r o w   =   $ s t m t - > f e t c h ( ) ; 
 
         i f   ( ! $ r o w )   { 
 
                 r e t u r n   $ d e f a u l t ; 
 
         } 
 
         r e t u r n   $ r o w [ ' v a l u e ' ] ; 
 
 } 
 
 
 
 f u n c t i o n   s e t _ s e t t i n g ( s t r i n g   $ k e y ,   s t r i n g   $ v a l u e ) :   v o i d 
 
 { 
 
         $ p d o   =   g e t _ p d o ( ) ; 
 
         $ s t m t   =   $ p d o - > p r e p a r e ( " 
 
                 I N S E R T   I N T O   s e t t i n g s ( ` k e y ` ,   ` v a l u e ` ,   u p d a t e d _ a t ) 
 
                 V A L U E S ( : k ,   : v ,   N O W ( ) ) 
 
                 O N   D U P L I C A T E   K E Y   U P D A T E   ` v a l u e `   =   V A L U E S ( ` v a l u e ` ) ,   u p d a t e d _ a t   =   N O W ( ) 
 
         " ) ; 
 
         $ s t m t - > e x e c u t e ( [ ' : k '   = >   $ k e y ,   ' : v '   = >   $ v a l u e ] ) ; 
 
 } 
 
 
 
 / * * 
 
   *   tQdeoDh? A P I #XV~|\N  O p e n A I   mp}? 
 
   *   oP}"%1WmPnTh6[}YjnY0)Ǔc2]tQdef}? 
 
   * / 
 
 f u n c t i o n   c a l l _ a i ( s t r i n g   $ p r o m p t ,   s t r i n g   $ u s e r I d   =   ' ' ) :   s t r i n g 
 
 { 
 
         e r r o r _ l o g ( " = = =   tQdeA I [ o? = = = " ) ; 
 
         e r r o r _ l o g ( " "&1WZXO:   ' { $ p r o m p t } ' " ) ; 
 
         e r r o r _ l o g ( " A I *a}_?   "   .   A I _ P R O V I D E R ) ; 
 
         
 
         i f   ( A I _ P R O V I D E R   = = =   ' m o c k ' )   { 
 
                 r e t u r n   ' /aVT%1mo] b}R-lXt!|?   .   m b _ s u b s t r ( $ p r o m p t ,   0 ,   1 0 0 ,   ' U T F - 8 ' ) ; 
 
         } 
 
 
 
         / /   O p e n A I   ONqẓ0[_
 
         i f   ( A I _ P R O V I D E R   = = =   ' o p e n a i ' )   { 
 
                 $ u r l   =   r t r i m ( O P E N A I _ A P I _ B A S E ,   ' / ' )   .   ' / c h a t / c o m p l e t i o n s ' ; 
 
                 $ h e a d e r s   =   [ 
 
                         ' C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n ' , 
 
                         ' A u t h o r i z a t i o n :   '   .   ' B e a r e r   '   .   O P E N A I _ A P I _ K E Y , 
 
                 ] ; 
 
 
 
                 $ p a y l o a d   =   [ 
 
                         ' m o d e l '   = >   O P E N A I _ M O D E L , 
 
                         ' m e s s a g e s '   = >   [ 
 
                                 [ 
 
                                         ' r o l e '   = >   ' s y s t e m ' , 
 
                                         ' c o n t e n t '   = >   ' cmrim mC{m1lk[O~xOYqig/a`TB%X\de~ 2Z}OVARkm_gep2"&1W? , 
 
                                 ] , 
 
                                 [ 
 
                                         ' r o l e '   = >   ' u s e r ' , 
 
                                         ' c o n t e n t '   = >   $ p r o m p t , 
 
                                 ] , 
 
                         ] , 
 
                         ' t e m p e r a t u r e '   = >   0 . 7 , 
 
                         ' u s e r '   = >   $ u s e r I d   ? :   n u l l , 
 
                 ] ; 
 
 
 
                 r e t u r n   d o _ l l m _ r e q u e s t ( $ u r l ,   $ h e a d e r s ,   $ p a y l o a d ) ; 
 
         } 
 
 
 
         / /   D e e p S e e k $Wp e n A I   ONqi^xr? 
 
         i f   ( A I _ P R O V I D E R   = = =   ' d e e p s e e k ' )   { 
 
                 $ u r l   =   r t r i m ( D E E P S E E K _ A P I _ B A S E ,   ' / ' )   .   ' / c h a t / c o m p l e t i o n s ' ; 
 
                 e r r o r _ l o g ( " t0wU R L :   { $ u r l } " ) ; 
 
                 $ h e a d e r s   =   [ 
 
                         ' C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n ' , 
 
                         ' A u t h o r i z a t i o n :   B e a r e r   '   .   D E E P S E E K _ A P I _ K E Y , 
 
                 ] ; 
 
 
 
                 $ p a y l o a d   =   [ 
 
                         ' m o d e l '   = >   D E E P S E E K _ M O D E L , 
 
                         ' m e s s a g e s '   = >   [ 
 
                                 [ 
 
                                         ' r o l e '   = >   ' s y s t e m ' , 
 
                                         ' c o n t e n t '   = >   ' cmrim mF]u2ZOs"Xk[OTB%XPmo]YP0}1 . m Y0=vept|\	{tpTC~5 0 p? 2 . m]_gh]2  3 . )X[4^ept}|\	{UtxOyoDi=v  4 . m]cmdee m o j i t&1Q' , 
 
                                 ] , 
 
                                 [ 
 
                                         ' r o l e '   = >   ' u s e r ' , 
 
                                         ' c o n t e n t '   = >   $ p r o m p t , 
 
                                 ] , 
 
                         ] , 
 
                         ' t e m p e r a t u r e '   = >   0 . 7 , 
 
                         ' m a x _ t o k e n s '   = >   1 0 0 ,     / /   ĕ,aWep2W[
 
                         ' u s e r '   = >   $ u s e r I d   ? :   n u l l , 
 
                 ] ; 
 
 
 
                 r e t u r n   d o _ l l m _ r e q u e s t ( $ u r l ,   $ h e a d e r s ,   $ p a y l o a d ) ; 
 
         } 
 
 
 
         / /   D i f y Xto7p4dede? 
 
         i f   ( A I _ P R O V I D E R   = = =   ' d i f y ' )   { 
 
                 $ u r l   =   r t r i m ( D I F Y _ A P I _ B A S E ,   ' / ' )   .   ' / c h a t - m e s s a g e s ' ; 
 
                 e r r o r _ l o g ( " t0wU R L :   { $ u r l } " ) ; 
 
                 $ h e a d e r s   =   [ 
 
                         ' C o n t e n t - T y p e :   a p p l i c a t i o n / j s o n ' , 
 
                         ' A u t h o r i z a t i o n :   B e a r e r   '   .   D I F Y _ A P I _ K E Y , 
 
                 ] ; 
 
 
 
                 $ p a y l o a d   =   [ 
 
                         ' i n p u t s '   = >   n e w   s t d C l a s s ( ) , 
 
                         ' q u e r y '   = >   $ p r o m p t , 
 
                         ' r e s p o n s e _ m o d e '   = >   ' s t r e a m i n g ' , 
 
                         ' u s e r '   = >   $ u s e r I d   ? :   D I F Y _ U S E R , 
 
                 ] ; 
 
 
 
                 r e t u r n   d o _ d i f y _ r e q u e s t ( $ u r l ,   $ h e a d e r s ,   $ p a y l o a d ) ; 
 
         } 
 
 
 
         / /   O5g|XPbfYjnY0X^p? 
 
         r e t u r n   ' A I _ P R O V I D E R   ȓHS~}t̓? c o n f i g . p h p ? ; 
 
 } 
 
 
 
 / * * 
 
   *   D i f y   mddet0wOp}O
 
   * / 
 
 f u n c t i o n   d o _ d i f y _ r e q u e s t ( s t r i n g   $ u r l ,   a r r a y   $ h e a d e r s ,   a r r a y   $ p a y l o a d ) :   s t r i n g 
 
 { 
 
         $ c h   =   c u r l _ i n i t ( $ u r l ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ H T T P H E A D E R ,   $ h e a d e r s ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ P O S T ,   t r u e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ P O S T F I E L D S ,   j s o n _ e n c o d e ( $ p a y l o a d ,   J S O N _ U N E S C A P E D _ U N I C O D E ) ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ R E T U R N T R A N S F E R ,   t r u e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ T I M E O U T ,   6 0 ) ;     / /   opYtnTiÓXh~\ne{Nt r e a m i n g 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ S S L _ V E R I F Y P E E R ,   f a l s e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ S S L _ V E R I F Y H O S T ,   f a l s e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ B U F F E R S I Z E ,   1 2 8 ) ;     / /   Op_&}Pc/\~\neyOfy[_Y? 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ N O P R O G R E S S ,   f a l s e ) ;     / /   O}Oigm[epv
 
 
 
         $ r e s p o n s e   =   c u r l _ e x e c ( $ c h ) ; 
 
         i f   ( $ r e s p o n s e   = = =   f a l s e )   { 
 
                 $ e r r   =   c u r l _ e r r o r ( $ c h ) ; 
 
                 c u r l _ c l o s e ( $ c h ) ; 
 
                 e r r o r _ l o g ( " c U R L k:   { $ e r r } " ) ; 
 
                 r e t u r n   ' tL[i f y   ȓ]YƓPim]r_"}tΘ%Z^@Utf}"X}nJet$0}'   .   $ e r r   .   ' ? ; 
 
         } 
 
         $ s t a t u s C o d e   =   c u r l _ g e t i n f o ( $ c h ,   C U R L I N F O _ H T T P _ C O D E ) ; 
 
         c u r l _ c l o s e ( $ c h ) ; 
 
 
 
         e r r o r _ l o g ( " H T T P 5 zOr:   { $ s t a t u s C o d e } " ) ; 
 
         e r r o r _ l o g ( " ]]2|PmTW[:   "   .   s t r l e n ( $ r e s p o n s e ) ) ; 
 
         e r r o r _ l o g ( " ]]2|PmT:   { $ r e s p o n s e } " ) ; 
 
 
 
         / /   oR`~T7d4d? 
 
         i f   ( e m p t y ( $ r e s p o n s e ) )   { 
 
                 e r r o r _ l o g ( " D i f y igem~T7d4d? ) ; 
 
                 r e t u r n   ' tL[i f y   ȓ]Yigem~T7d4de}t̓GP I ]u? ; 
 
         } 
 
 
 
         / /   oR`s t r e a m i n g Y3 !}(R7d4de}S S E ͓Nq!}? 
 
         i f   ( s t r p o s ( $ r e s p o n s e ,   ' d a t a : ' )   ! = =   f a l s e   | |   s t r p o s ( $ r e s p o n s e ,   ' e v e n t : ' )   ! = =   f a l s e )   { 
 
                 e r r o r _ l o g ( " Y 4Z*[Ws t r e a m i n g Y3 !}]]2|" ) ; 
 
                 $ l i n e s   =   e x p l o d e ( " \ n " ,   $ r e s p o n s e ) ; 
 
                 $ f u l l A n s w e r   =   ' ' ; 
 
                 
 
                 f o r e a c h   ( $ l i n e s   a s   $ l i n e )   { 
 
                         $ l i n e   =   t r i m ( $ l i n e ) ; 
 
                         i f   ( s t r p o s ( $ l i n e ,   ' d a t a : ' )   = = =   0 )   { 
 
                                 $ j s o n S t r   =   t r i m ( s u b s t r ( $ l i n e ,   5 ) ) ; 
 
                                 i f   ( e m p t y ( $ j s o n S t r )   | |   $ j s o n S t r   = = =   ' [ D O N E ] ' )   { 
 
                                         c o n t i n u e ; 
 
                                 } 
 
                                 
 
                                 $ d a t a   =   j s o n _ d e c o d e ( $ j s o n S t r ,   t r u e ) ; 
 
                                 i f   ( j s o n _ l a s t _ e r r o r ( )   = = =   J S O N _ E R R O R _ N O N E )   { 
 
                                         / /   D i f y   s t r e a m i n g ͓Nq!}k" e v e n t " : " m e s s a g e " , " a n s w e r " : " PmT" } 
 
                                         i f   ( i s s e t ( $ d a t a [ ' a n s w e r ' ] ) )   { 
 
                                                 $ f u l l A n s w e r   . =   $ d a t a [ ' a n s w e r ' ] ; 
 
                                         } 
 
                                         / /   ,h ? { " e v e n t " : " a g e n t _ m e s s a g e " , " a n s w e r " : " PmT" } 
 
                                         i f   ( i s s e t ( $ d a t a [ ' e v e n t ' ] )   & &   $ d a t a [ ' e v e n t ' ]   = = =   ' a g e n t _ m e s s a g e '   & &   i s s e t ( $ d a t a [ ' a n s w e r ' ] ) )   { 
 
                                                 $ f u l l A n s w e r   . =   $ d a t a [ ' a n s w e r ' ] ; 
 
                                         } 
 
                                 } 
 
                         } 
 
                 } 
 
                 
 
                 i f   ( ! e m p t y ( $ f u l l A n s w e r ) )   { 
 
                         e r r o r _ l o g ( " D i f y ep2( s t r e a m i n g ) :   { $ f u l l A n s w e r } " ) ; 
 
                         e r r o r _ l o g ( " = = =   tQdeA I dko  = = = " ) ; 
 
                         r e t u r n   t r i m ( $ f u l l A n s w e r ) ; 
 
                 } 
 
         } 
 
 
 
         / /   oR`b l o c k i n g Y3 !}(R7d4de}J S O N ͓Nq!}? 
 
         $ d a t a   =   j s o n _ d e c o d e ( $ r e s p o n s e ,   t r u e ) ; 
 
         i f   ( $ s t a t u s C o d e   > =   4 0 0   | |   ! i s _ a r r a y ( $ d a t a ) )   { 
 
                 $ m s g   =   $ d a t a [ ' m e s s a g e ' ]   ? ?   ' ȓFaqk' ; 
 
                 e r r o r _ l o g ( " D i f y   A P I k:   { $ m s g } " ) ; 
 
                 r e t u r n   ' tL[i f y   ȓ]Yt0wo\~]`P]/vp}5 zOr  '   .   $ s t a t u s C o d e   .   ' ?   .   $ m s g   .   ' ? ; 
 
         } 
 
 
 
         / /   D i f y   igem͓Nq!}k" a n s w e r " :   " ep2PmT" ,   " c o n v e r s a t i o n _ i d " :   " x x x " } 
 
         $ c o n t e n t   =   $ d a t a [ ' a n s w e r ' ]   ? ?   ' ' ; 
 
         i f   ( ! $ c o n t e n t )   { 
 
                 e r r o r _ l o g ( " D i f y igemPmTmy%" ) ; 
 
                 e r r o r _ l o g ( " 9p~\f]]2|:   "   .   p r i n t _ r ( $ d a t a ,   t r u e ) ) ; 
 
                 r e t u r n   ' tL[i f y   ƓPiZ!AnZ"X`(Rmo] ? ; 
 
         } 
 
         e r r o r _ l o g ( " D i f y ep2( b l o c k i n g ) :   { $ c o n t e n t } " ) ; 
 
         e r r o r _ l o g ( " = = =   tQdeA I dko  = = = " ) ; 
 
         r e t u r n   t r i m ( $ c o n t e n t ) ; 
 
 } 
 
 
 
 / * * 
 
   *   1ldeoDh? H T T P   t0wOp}O
 
   * / 
 
 f u n c t i o n   d o _ l l m _ r e q u e s t ( s t r i n g   $ u r l ,   a r r a y   $ h e a d e r s ,   a r r a y   $ p a y l o a d ) :   s t r i n g 
 
 { 
 
         $ c h   =   c u r l _ i n i t ( $ u r l ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ H T T P H E A D E R ,   $ h e a d e r s ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ P O S T ,   t r u e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ P O S T F I E L D S ,   j s o n _ e n c o d e ( $ p a y l o a d ,   J S O N _ U N E S C A P E D _ U N I C O D E ) ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ R E T U R N T R A N S F E R ,   t r u e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ T I M E O U T ,   6 0 ) ;     / /   opYtnTiÓXh~\ne{Nt r e a m i n g 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ S S L _ V E R I F Y P E E R ,   f a l s e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ S S L _ V E R I F Y H O S T ,   f a l s e ) ; 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ B U F F E R S I Z E ,   1 2 8 ) ;     / /   Op_&}Pc/\~\neyOfy[_Y? 
 
         c u r l _ s e t o p t ( $ c h ,   C U R L O P T _ N O P R O G R E S S ,   f a l s e ) ;     / /   O}Oigm[epv
 
 
 
         $ r e s p o n s e   =   c u r l _ e x e c ( $ c h ) ; 
 
         i f   ( $ r e s p o n s e   = = =   f a l s e )   { 
 
                 $ e r r   =   c u r l _ e r r o r ( $ c h ) ; 
 
                 c u r l _ c l o s e ( $ c h ) ; 
 
                 e r r o r _ l o g ( " c U R L k:   { $ e r r } " ) ; 
 
                 r e t u r n   ' tI[I   ȓ]YƓPim]r_"}tΘ%Z^@Utf}"X}nJet$0}'   .   $ e r r   .   ' ? ; 
 
         } 
 
         $ s t a t u s C o d e   =   c u r l _ g e t i n f o ( $ c h ,   C U R L I N F O _ H T T P _ C O D E ) ; 
 
         c u r l _ c l o s e ( $ c h ) ; 
 
 
 
         e r r o r _ l o g ( " H T T P 5 zOr:   { $ s t a t u s C o d e } " ) ; 
 
         e r r o r _ l o g ( " ]]2|PmT:   { $ r e s p o n s e } " ) ; 
 
 
 
         $ d a t a   =   j s o n _ d e c o d e ( $ r e s p o n s e ,   t r u e ) ; 
 
         i f   ( $ s t a t u s C o d e   > =   4 0 0   | |   ! i s _ a r r a y ( $ d a t a ) )   { 
 
                 $ m s g   =   $ d a t a [ ' e r r o r ' ] [ ' m e s s a g e ' ]   ? ?   ' ȓFaqk' ; 
 
                 e r r o r _ l o g ( " A P I k:   { $ m s g } " ) ; 
 
                 r e t u r n   ' tI[I   ȓ]Yt0wo\~]`P]/vp}5 zOr  '   .   $ s t a t u s C o d e   .   ' ?   .   $ m s g   .   ' ? ; 
 
         } 
 
 
 
         $ c o n t e n t   =   $ d a t a [ ' c h o i c e s ' ] [ 0 ] [ ' m e s s a g e ' ] [ ' c o n t e n t ' ]   ? ?   ' ' ; 
 
         i f   ( ! $ c o n t e n t )   { 
 
                 e r r o r _ l o g ( " A I igemPmTmy%" ) ; 
 
                 r e t u r n   ' tI[I   ƓPiZ!AnZ"X`(Rmo] ? ; 
 
         } 
 
         e r r o r _ l o g ( " A I ep2:   { $ c o n t e n t } " ) ; 
 
         e r r o r _ l o g ( " = = =   tQdeA I dko  = = = " ) ; 
 
         r e t u r n   t r i m ( $ c o n t e n t ) ; 
 
 } 
 
 