Loading ...
Sorry, an error occurred while loading the content.

488Re: [php_greek] sximatiko problima session:diafotistika kapos

Expand Messages
  • Dimitrios Botsis
    Jan 6, 2004
    • 0 Attachment
      Agapite file,

      Parakatw soy para8etw ena mikro paradeigma aytoy poy
      ennoousa. Den yparxei syndesi me kapoia basi, apla soy
      deixnw me poio tropo mporeis na pareis ola ta arxeia
      enos katalogou, na diabaseis ena-ena ta periexomena toys
      kai gia ka8ena ap'ayta na elegxeis an kapoio string (to
      periexomeno toy session soy gia ton ka8e user) briksetai
      mesa sto arxeio, poy idi exei metafer8ei s'ena string me
      to onoma $fcontents gia eykoli diaxeirisi.

      To script ayto poy 8a ftiakseis, 8a to baleis na ekteleitai
      mesw enos crontab entry, diladi mias programmatismenis
      ergasias, oso syxna 8eleis esy, gia na sou "ka8arizei"
      tin basi, opws to ennoeis.

      SHMEIWSH : merika kommatia toy parakatw kwdika
      proerxontai apo to PHP documentation. Ayto pros
      apofygi pareksigisewn kai epeidi poly eykola mporei
      na bre8oyn typoi poy 8a poyn oti parousiazw etoimo
      kwdika gia diko moy kwdika...

      Kali epityxia,

      Dimitris Botsis
      http://www.neologic.gr

      <?
      $phpsessiondir = '(EDW BALE TO PHPSESSION DIR)';
      chdir($phpsessiondir);
      $handle=opendir($phpsessiondir);

      // EYRESH OLWN TWN ARXEIWN TOY ORIZOMENOY DIRECTORY
      while (false !== ($thefile = readdir($handle)))
      {
      if ($thefile != "." && $thefile != "..")
      {

      // PAIRNOYME TA PERIEXOMENA OLOKLHROY TOY ARXEIOY
      $fcontents = join('',file($thefile));

      // ELEXGOS AN TO STRING "aaa" YPARXEI STO STRING $fcontents
      // STH DIKH SOY PERIPTWSH, ANTI GIA aaa 8A EXEIS TO PERIEXOMENO
      // TOY SESSION GIA TON KA8E USER POY 8ELEIS NA ELEGXEIS.
      if (strpos($fcontents, "aaa") === false)
      {
      // TOTE DEN BRE8HKE TO PROS ANAZHTHSH STRING
      // AN PERASEIS OLA TA ARXEIA TOY DIRECTORY KAI DEIS OTI
      // SE KANENA APO TA ARXEIA DEN BRE8HKE TO STRING (SESSION)
      // TOTE SBHSE TON USER APO THN BASH.
      }
      else
      {
      // TOTE BRE8HKE TO STRING (SESSION), OPOTE DEN KANEIS
      // KAMMIA ALLAGH
      }
      }
      }
      closedir($handle);
      ?>

      ----- Original Message -----
      From: "Alaios" <alaios@...>
      To: <php_greek@yahoogroups.com>
      Sent: Tuesday, January 06, 2004 6:02 PM
      Subject: Re: [php_greek] sximatiko problima session:diafotistika kapos


      > Eyxaristo...exo diafotistei kapos. Alla to php pou tha balo sto init tha
      trexei meso tou apache? Kai pos akribos mporo na elegxo ta sessions?Na diabazo
      ta prosorina arxeia pou dimiourgountai sto skliro tou server?
      >
      > Dimitrios Botsis <dimbotsis@...> wrote:> " 8a ftiakseis ena aneksartito
      service elegxoy,
      > > to opoio 8a blepei gia paradeigma ka8e 2 lepta,"
      > >
      > > -->Pos tha to ftiakso?
      > >>> Ws gnwston, me PHP mporeis na grapseis kai
      > >>> allou eidous efarmoges, oxi mono web. Grapse
      > >>> loipon ena PHP script poy 8a trexei monima panw
      > >>> ston server sou (8a to ksekinas p.x. sto init) kai
      > >>> ana takta delays 8a kanei ton elegxo an gia ka8e
      > >>> kataxwrisi user sti basi, yparxei kai to antistoixo
      > >>> session.
      > >>>
      > >
      > > " an ta trexonta sessions symfwnoun me tous
      > > katagegramenous users sti basi soy."
      > >
      > > -->Pos na to elegxo ayto?
      > >>> Sto session poy anoigeis otan kapoios kanei login,
      > >>> bale mia metabliti poy na krataei ws timi, to ID
      > >>> tou user. Otan to session eksantli8ei (ora apantisi
      > >>> Stamboulidi sxetika me session.gc_probability klp klp)
      > >>> tote me to programma poy sou anefera, sbise kai tin
      > >>> timi apo tin basi.
      > >
      > > Akoma kai etsi ean dokimaseis sto yahoo na kaneis
      > > taytoxrona login, tote taytoxrona petai ekso ton
      > > proto.... Etsi opos to les esy tha elegxo kathe 2
      > > lepta, ara tha mporei epi 2 lepta na einai 2 fores
      > > mesa kai na tou allaksei ta fota.
      > >>> OK, an 8es na ginei etsi, tote na elegxeis meta
      > >>> to login kapoiou, an yparxei sti basi H' sta sessions
      > >>> kataxwrimenos user me to idio ID. An nai, kleise
      > >>> to session tou proigoumenou, sto epomeno click
      > >>> pou 8a kanei. Den einai kai toso dyskolo...
      > >
      > > Eyxaristo para poly gia tin apantisi sou..... :)
      > >
      > >
      > >
      > > --- Dimitrios Botsis wrote:
      > > > 8a ftiakseis ena aneksartito service elegxoy,
      > > > to opoio 8a blepei gia paradeigma ka8e 2 lepta,
      > > > an ta trexonta sessions symfwnoun me tous
      > > > katagegramenous users sti basi soy.
      > > > Ayto mporei na ginei bebaia me PHP.
      > > > Opoy yparxei asymfwnia, diladi an enas user
      > > > einai kataxwrimenos sti basi alla den yparxei
      > > > to antistoixo session, tote diegrapse ton apo
      > > > tin basi, gia na isixaseis !
      > > > YG : sygxaritiria gia tin ypomoni kai tin
      > > > oreksi soy na ftiakseis tin synimmeni selida.
      > > >
      > > > Dimitrios Botsis
      > > > http://www.neologic.gr
      > > >
      > > > ----- Original Message -----
      > > > From: "Alaios"
      > > > To:
      >
      > > > Sent: Monday, January 05, 2004 8:44 PM
      > > > Subject: [php_greek] sximatiko problima session
      > > >
      > > >
      > > > > KALI XRONIA k XRONIA POLLA.
      > > > > Tha thymastai oti sas eixa steilei ena e-mail me
      > > > apories gia sessions. Gia na
      > > > min sas prizo kai na min sas polykourazo ta elysa
      > > > ola sxedon ekeina ektos omos
      > > > apo 2 apories, oi opoies einai pio poly "logikes"
      > > > para kodikas se php. Stin
      > > > prospatheia na dieykolyno oso mporo tin katastasi
      > > > ekana ena sxima sto visio sto
      > > > opoio kai sas sto stelno, opou perigrafo sxetika to
      > > > problima.
      > > > > Eyxaristo
      > > > >
      > > > >
      > > > >
      > > > > ---------------------------------
      > > > > Do you Yahoo!?
      > > > > Find out what made the Top Yahoo! Searches of 2003
      > > >
      > > >
      > > >
      >
      > ------------------------------------------------------------------------------
      > --
      > > >
      > > >
      > > >
      > > >
      > > >
      > > > -
      > > > Για να διαγραφείτε από τη λίστα, στείλτε ένα email
      > > > στο:
      > > >
      > > > ------------------------ Yahoo! Groups Sponsor
      > > >
      > > > Yahoo! Groups Links
      > > >
      > > > To visit your group on the web, go to:
      > > > http://groups.yahoo.com/group/php_greek/
      > > >
      > > > To unsubscribe from this group, send an email to:
      > > > php_greek-unsubscribe@yahoogroups.com
      > > >
      > > > Your use of Yahoo! Groups is subject to:
      > > > http://docs.yahoo.com/info/terms/
      > > >
      > > >
      > >
      > > __________________________________
      > > Do you Yahoo!?
      > > Find out what made the Top Yahoo! Searches of 2003
      > > http://search.yahoo.com/top2003
      > >
      > > -
      > > Για να διαγραφείτε από τη λίστα, στείλτε ένα email στο:
      > >
      > > Yahoo! Groups Links
      > >
      > > To visit your group on the web, go to:
      > > http://groups.yahoo.com/group/php_greek/
      > >
      > > To unsubscribe from this group, send an email to:
      > > php_greek-unsubscribe@yahoogroups.com
      > >
      > > Your use of Yahoo! Groups is subject to:
      > > http://docs.yahoo.com/info/terms/
      > >
      >
      >
      > -
      > Για να διαγραφείτε από τη λίστα, στείλτε ένα email στο:
      >
      > Yahoo! Groups Links
      >
      > To visit your group on the web, go to:
      > http://groups.yahoo.com/group/php_greek/
      >
      > To unsubscribe from this group, send an email to:
      > php_greek-unsubscribe@yahoogroups.com
      >
      > Your use of Yahoo! Groups is subject to:
      > http://docs.yahoo.com/info/terms/
      >
      >
      >
      >
      > ---------------------------------
      > Do you Yahoo!?
      > Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
    • Show all 10 messages in this topic