OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: php-general-digest-helplists.php.net
Date: Sun Aug 12 2001 - 18:43:03 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    php-general Digest 12 Aug 2001 23:43:03 -0000 Issue 812

    Topics (messages 62301 through 62354):

    Update problem
            62301 by: Martin Kampherbeek

    Re: Page caching
            62302 by: Kristian Duske

    Re: lexical parsing?
            62303 by: Kristian Duske

    Re: replacing variables in file
            62304 by: Rouvas Stathis

    Re: the last word of a string??
            62305 by: zerosumzero.yahoo.com
            62306 by: Jan Wilson
            62307 by: zerosumzero.yahoo.com
            62331 by: Jesse Arnett

    Re: Streaming a jpg
            62308 by: Todd Cary
            62309 by: Matthew Loff
            62310 by: Don Read

    it works at last!
            62311 by: zerosumzero.yahoo.com
            62312 by: ReDucTor

    Linux/PHP/Interbase
            62313 by: Todd Cary

    Re: Winning Confirmation ..
            62314 by: michael2040.hotmail.com
            62315 by: Matthew Loff

    Interaction with text files!
            62316 by: Kyle Smith
            62318 by: Matthew Loff
            62319 by: ReDucTor

    Re: select 3 files that were created last
            62317 by: Don Read

    Send 50,000 Emails Monthly 100% Spam Free!
            62320 by: thesuperpromoter2001.yahoo.com

    href and download
            62321 by: Heidi Belal
            62349 by: Richard Lynch

    Passing LARGE (1500-2500 chars) variable from JScript to PHP?
            62322 by: news.fbcc.com
            62336 by: Inércia Sensorial
            62347 by: Richard Lynch

    Not too simple, i hope
            62323 by: Kyle Smith
            62324 by: Matthew Loff
            62325 by: Kyle Smith
            62327 by: Matthew Loff

    server run page
            62326 by: lolodev
            62337 by: Inércia Sensorial
            62351 by: Richard Lynch
            62353 by: mike cullerton

    submit form problem
            62328 by: Ivo Stoykov
            62335 by: Inércia Sensorial
            62348 by: Richard Lynch

    Re: Auto Responders...
            62329 by: Steve Werby

    WAHOO!!!
            62330 by: Kyle Smith
            62332 by: Andy Woolley
            62333 by: Kyle Smith

    Form help
            62334 by: Mitja Simčič

    Re: development to ISP migration headache
            62338 by: Richard Lynch

    Re: Problems with exec
            62339 by: Richard Lynch

    Re: evaluate data taken from db
            62340 by: Richard Lynch

    Re: Cookie only worked on "/" but not in any sub-directories
            62341 by: Richard Lynch

    Re: upgrading from 4.03 to 4.06
            62342 by: Richard Lynch

    Re: PHP and Public Key System cryptos? (PKS)
            62343 by: Richard Lynch

    Re: Meta Tags and Regular Expressions
            62344 by: Richard Lynch

    Re: again session doubt
            62345 by: Richard Lynch

    Re: Socket problem
            62346 by: Richard Lynch

    Re: Handling files
            62350 by: Richard Lynch

    Peace and quiet
            62352 by: Kyle Smith

    strstr Question
            62354 by: Erich Zigler

    Administrivia:

    To subscribe to the digest, e-mail:
            php-general-digest-subscribelists.php.net

    To unsubscribe from the digest, e-mail:
            php-general-digest-unsubscribelists.php.net

    To post to the list, e-mail:
            php-generallists.php.net

    ----------------------------------------------------------------------

    attached mail follows:


    Hello,

    I have created a predictionscompetition and the code below counts te total score of a match of a person.
    On the screen it workes, but in de database it goes wrong. Each person gets the total of the last person. There must be something wrong with the update statement.
    I hope someone can help me.

    Belows are the tabels and the code. wedstrijden means matches and voorspelling1 means predictions.

    Please help me.

    Cheers,
    Martin.

    Tabel: users
    id
    username
    naam
    adres
    postcode
    woonplaats
    telefoonnummer
    geboortedatum
    emailadres
    password

    Tabel: wedstrijden
    id_wedstr
    wedstrijd
    uit_gr
    uit_te
    ru_gr
    ru_te
    minuut
    toto

    Tabel: voorspelling1
    id_voorspelling
    id_wedstr
    id
    naam
    uit_gr
    uit_te
    ru_gr
    ru_te
    minuut
    toto
    totaal

    Code:

    <?php

    mysql_connect("..............", "..............", "..............");
       
    mysql_select_db (.............);

    $query = "SELECT * FROM wedstrijden WHERE id_wedstr = 1";

    $result = MYSQL_QUERY($query);

      $uit_gr = mysql_result($result,$i,"uit_gr");
      $uit_te = mysql_result($result,$i,"uit_te");
      $ru_gr = mysql_result($result,$i,"ru_gr");
      $ru_te = mysql_result($result,$i,"ru_te");
      $minuut = mysql_result($result,$i,"minuut");
      $toto = mysql_result($result,$i,"toto");

    $uit_gr1 = $uit_gr;
    $uit_te1 = $uit_te;
    $ru_gr1 = $ru_gr;
    $ru_te1 = $ru_te;
    $minuut1 = $minuut;
    $toto1 = $toto;

    PRINT "$minuut1";

    ?>

    <?php

    mysql_connect("..................", "....................", "...................");
       
    mysql_select_db (....................);

    $query = "SELECT * FROM voorspelling1";

    $result = MYSQL_QUERY($query);

    /* How many of these users are there? */
    $number = MYSQL_NUMROWS($result);

    /* Print these results to the screen in a nice format */
    $i = 0;

    IF ($number == 0) :
     PRINT "<CENTER><P>Geen voorspellingen</CENTER>";
    ELSEIF ($number > 0) :
     PRINT "<P>Aantal voorspellingen: $number<BR><BR>";
     PRINT "<b>Voorspellingen</b><BR><BR>";

     WHILE ($i < $number):
      $naam = mysql_result($result,$i,"naam");
      $uit_gr = mysql_result($result,$i,"uit_gr");
      $uit_te = mysql_result($result,$i,"uit_te");
      $ru_gr = mysql_result($result,$i,"ru_gr");
      $ru_te = mysql_result($result,$i,"ru_te");
      $minuut = mysql_result($result,$i,"minuut");
      $toto = mysql_result($result,$i,"toto");

       IF ($uit_gr == $uit_gr1 AND $uit_te == $uit_te1):
       $u1 = 5;
       ELSE:
       $u1 = 0;
       ENDIF;

       IF ($ru_gr == $ru_gr1 AND $ru_te == $ru_te1):
       $r1 = 2;
       ELSE:
       $r1 = 0;
       ENDIF;

       IF ($u1 == 5 AND $r1 == 2):
       $b1 = 2;
       ELSE:
       $b1 = 0;
       ENDIF;

       IF ($minuut == $minuut1):
       $m1 = 4;
       ELSE:
       $m1 = 0;
       ENDIF;

       IF ($toto == $toto1 AND $u1 == 0):
       $t1 = 2;
       ELSE:
       $t1 = 0;
       ENDIF;

      $t01 = $u1+$r1+$b1+$m1+$t1;

      $sqlb = "UPDATE voorspelling1 SET totaal='$t01' WHERE id_voorspelling = $id_voorspelling'";
      $resultb = mysql_query($sqlb);

      PRINT "$naam $uit_gr $uit_te $u1 $r1 $b1 $m1 $t1 $t01<BR>";
      PRINT "$t1<BR>";

      $i++;
     ENDWHILE;

    echo "Thank you! Information updated.\n";

    ENDIF;
    ?>

    attached mail follows:


    > Is there any way that I can tell my PHP not to be cached?

    Try this:

    header("Expires: " . gmdate("D, d F Y H:i:s",time()) . " GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");
    header("Cache-Control: post-check=0, pre-check=0");

    This code should disable all caching of your page.

    Kristian

    attached mail follows:


    > can you do this in php?

    You can of course write your own lexical parser in PHP, if that's what you
    mean.

    Kristian

    attached mail follows:


    Here is my solution :

    function substitute($str,$lv) {
      //
      // recursively substitute all occurences of pattern !!var!! in $str
    with $lv['var']
      // could be done wiht a loop, but since circular references are not
    resolved
      // it is better to leave it that way. in case of a circular reference,
      // eventually will run out of stack and indication of error will be
    given
      // if it is placed in loop, maybe it will never end:-)
      //
      $act = -1;
      preg_match_all("/!!.*!!/U",$str,$tmpar); $act = count($tmpar[0]);
      reset($tmpar[0]);
      while (list($k,$v)=each($tmpar[0]))
        $str = ereg_replace($v,$lv[strtolower(trim(ereg_replace('!','
    ',$v)))],$str);
      
      if ($act > 0)
        return substitute($str,$lv);
      else
        return $str;
    }

    Suppose you have the file foo.txt as in :

    <foo.txt>
    Dear !!name!!,

    I have the !!item!! you requested at !!date!!
    blah, blah, blah,

    !!greets!!
    </foo.txt>

    In your code you do:
    <?php
      $txt = file('foo.txt');
      $lv['name'] = 'Rouvas Stathis';
      $lv['item'] = 'Code Snippet';
      $lb['data'] = 'the other day';
      $lv['greets'] = 'Bye';
      $txt_new = substitute($txt,$lv);
      echo $txt_new;

      // you can have nested calls as in
      $lv['first'] = 'Stathis';
      $lv['last'] = 'Rouvas';
      $lv['name'] = '!!first!! !!last!!';
      $txt2 = substitute($txt,$lv);
      echo $txt2;
    ?>

    Hope it helps.

    -Stathis.

    Paul Roberts wrote:
    >
    > I want to read the include file in, replace the variables with any data
    > present and then send the included file to the browser between some header
    > and footer templates. I want the template to be straight html which can be
    > edited with a wysiwyg editor if required.
    >
    > if I include the file as html I get errors as there are " and no valid
    > syntax I my php block ie no ;
    >
    > i'd like to just do
    >
    > $formdata = (include($filelocation));
    >
    > but this returns 1 and pts it in the variable, I need the html form in the
    > variable.

    attached mail follows:


    on 8/12/01 2:21 AM, Mukul Sabharwal at mukulsabharwalyahoo.com wrote:

    > Hi,
    >
    > here :
    >
    > $arr = explode($lastline, " ");
    >
    > that puts lastline into arr which is an array and you
    > can use the sizeof operator to get the nth (or the
    > last) element.
    >
    > print $arr[sizeof($arr)];

    hmmm I tried this... it seems not to recognise the space. The sizeof($arr)
    is always 1.

    Susan

    ---
    

    So I opened a file like this:

    $filename ="text.txt"; $fh = fopen($filename, "r");

    then I get the last line of the file like this:

    while (!feof ($fh)) { $lastline = fgets($fh, 4096); }

    now I want the last word of $lastline ... how do I do this? I've been trying all kinds of things but nothing seems to be what I need.

    I would also like to be able to get the last X words of $lastline?

    so if

    $lastline = "I am a newbie"

    I get: "am a newbie"

    Help!

    -- susanfuturebird.com http://futurebird.diaryland.com

    attached mail follows:


    * zerosumzeroyahoo.com <zerosumzeroyahoo.com> [010812 08:08]: > on 8/12/01 2:21 AM, Mukul Sabharwal at mukulsabharwalyahoo.com wrote: > > $arr = explode($lastline, " "); > > > > that puts lastline into arr which is an array and you > > can use the sizeof operator to get the nth (or the > > last) element. > > > > print $arr[sizeof($arr)]; > > > hmmm I tried this... it seems not to recognise the space. The sizeof($arr) > is always 1.

    The order of arguments above is wrong. It should be: $arr = explode(" ",$lastline);

    The separator must come before the string. See function.explode.html in the docs.

    -- 
    Jan Wilson, SysAdmin     _/*];          corocombtl.net
    Corozal Junior College   |  |:'  corozal.com corozal.bz
    Corozal Town, Belize     |  /'  chetumal.com & linux.bz
    Reg. Linux user #151611  |_/   Network, SQL, Perl, HTML
    

    attached mail follows:


    on 8/12/01 10:17 AM, Jan Wilson at corocombtl.net wrote:

    > The order of arguments above is wrong. It should be: > $arr = explode(" ",$lastline); > > The separator must come before the string. See function.explode.html > in the docs.

    Strange size of array is still just 1?

    Susan

    -- 
    susanfuturebird.com
    http://futurebird.diaryland.com
    

    attached mail follows:


    Susan,

    this is how I do it.. give it a shot.

    $temp = split(" ",$lastline); echo $temp[count($temp)-1];

    btw, you might look into the stripslashes() function.. this would fix the problem with the slashes in front of the quotes on your "stream" page.. ;) groupie.

    -Jesse

    --
    Jesse Arnett jarnettsiscom.net
    SISCOM Inc. http://www.siscom.net
    Southern Ohio's Superior Internet Service Company
    Ph: 937.222.8150.413
    

    ----- Original Message ----- From: <zerosumzeroyahoo.com> To: "Jan Wilson" <corocombtl.net>; <php-generallists.php.net> Sent: Saturday, August 18, 2001 11:01 AM Subject: Re: [PHP] the last word of a string??

    > on 8/12/01 10:17 AM, Jan Wilson at corocombtl.net wrote: > > > The order of arguments above is wrong. It should be: > > $arr = explode(" ",$lastline); > > > > The separator must come before the string. See function.explode.html > > in the docs. > > Strange size of array is still just 1? > > Susan > > > -- > susanfuturebird.com > http://futurebird.diaryland.com

    attached mail follows:


    Don -

    What I am trying to do is avoid having the location of the JPEG available to the surfer. An idea I have is to pass a parameter to the image. For example:

    showimage.php?imageid=12345

    My PHP script will get the location of the image and "read" it into memory. Then my HTML page will "somehow" use the image in memory rather than the usual <IMG...> tag.

    This currently works:

    <IMG alt="" border=0 src="http://209.204.172.137/CANADA_RIDE_2001/Flag.jpg">

    Is there a way to replace the SRC property with a memory image?

    Todd

    --
    Todd Cary
    Ariste Software
    toddaristesoftware.com
    

    attached mail follows:


    Say your image is called 12345.jpg...

    showimage.php:

    <?php

    if(is_file("/your_www_dir/images/$imageid.jpg")) header("Location: /images/$imageid.jpg"); else header("Location: /images/notfound.jpg");

    ?>

    notfound.jpg can be a "Image Not Found" graphic or something similar.

    In your HTML, just call that script...

    <IMG SRC="showimage.php?imageid=12345">

    -----Original Message----- From: Todd Cary [mailto:toddaristesoftware.com] Sent: Sunday, August 12, 2001 11:04 AM To: Don Read Cc: php-generallists.php.net Subject: Re: [PHP] Streaming a jpg

    Don -

    What I am trying to do is avoid having the location of the JPEG available to the surfer. An idea I have is to pass a parameter to the image. For example:

    showimage.php?imageid=12345

    My PHP script will get the location of the image and "read" it into memory. Then my HTML page will "somehow" use the image in memory rather than the usual <IMG...> tag.

    This currently works:

    <IMG alt="" border=0 src="http://209.204.172.137/CANADA_RIDE_2001/Flag.jpg">

    Is there a way to replace the SRC property with a memory image?

    Todd

    --
    Todd Cary
    Ariste Software
    toddaristesoftware.com
    

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-adminlists.php.net

    attached mail follows:


    On 12-Aug-2001 Todd Cary wrote: > Don - > > What I am trying to do is avoid having the location of the JPEG > available to the surfer. An idea I have is to pass a parameter to the > image. For example: > > showimage.php?imageid=12345 > > My PHP script will get the location of the image and "read" it into > memory. Then my HTML page will "somehow" use the image in memory rather > than the usual <IMG...> tag. > > This currently works: > > <IMG alt="" border=0 > src="http://209.204.172.137/CANADA_RIDE_2001/Flag.jpg"> > > Is there a way to replace the SRC property with a memory image? >

    change the basedir in my script to wherever (outside DOC_ROOT ?)

    src="/show.php?fname=Flag.jpg">

    converting imageid=12345 -> fname=Flag.jpg is umm, an exercize left for the reader ...

    Regards,

    -- 
    Don Read                                       dreadtexas.net
    -- It's always darkest before the dawn. So if you are going to 
       steal the neighbor's newspaper, that's the time to do it.
    

    attached mail follows:


    Okay I got it working!

    http://www.futurebird.com/wordstream/index.php3

    go on give it a try!

    Susan

    -- 
    susanfuturebird.com
    http://futurebird.diaryland.com
    

    attached mail follows:


    coolies, whats the bet it turns out with sex storys... :D ----- Original Message ----- From: <zerosumzeroyahoo.com> To: <zerosumzeroyahoo.com>; <php-generallists.php.net> Sent: Sunday, August 19, 2001 1:40 AM Subject: [PHP] it works at last!

    > Okay I got it working! > > http://www.futurebird.com/wordstream/index.php3 > > go on give it a try! > > Susan > > > -- > susanfuturebird.com > http://futurebird.diaryland.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net >

    attached mail follows:


    Is there a RPM for Apache/PHP/Interbase?

    Todd

    --
    Todd Cary
    Ariste Software
    toddaristesoftware.com
    

    attached mail follows:


    You have been specially selected to qualify for the following:

    Premium Vacation Package and Pentium PC Giveaway To review the details of the please click on the link with the confirmation number below:

    http://vacation.1xin.net

    Confirmation Number#Lh340 Please confirm your entry within 24 hours of receipt of this confirmation.

    Wishing you a fun filled vacation! If you should have any additional questions or cann't connect to the site do not hesitate to contact me direct: mailto:vacationbtamail.net.cn?subject=Help!

    attached mail follows:


    A --pentium-- PC? Jeez-- they really aren't trying very hard to attract interest.

    -----Original Message----- From: michael2040hotmail.com [mailto:michael2040hotmail.com] Sent: Sunday, August 12, 2001 10:48 AM To: php-generallists.php.net Subject: [PHP] Re: Winning Confirmation ..

    You have been specially selected to qualify for the following:

    Premium Vacation Package and Pentium PC Giveaway To review the details of the please click on the link with the confirmation number below:

    http://vacation.1xin.net

    Confirmation Number#Lh340 Please confirm your entry within 24 hours of receipt of this confirmation.

    Wishing you a fun filled vacation! If you should have any additional questions or cann't connect to the site do not hesitate to contact me direct: mailto:vacationbtamail.net.cn?subject=Help!

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net To
    contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    go to http://www.phpbuilder.com/forum/read.php3?num=2&id=149562&loc=0&thread=149562 its all there but.... WAAA!!!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    Kyle,

    The problem is that you're asking this list (as well as the people on PHPBuilder.com) to -teach- you how to use PHP. That is not the intention of either of these resources.

    You obviously don't have prior experience programming, so you need to find a way to learn like the rest of us have.

    Start with simple things... File manipulation is something you should address after you have mastered the basics of the language. And, like the gentleman on PHPbuilder said, we are surely not going to write your code for you.

    --Matt

    -----Original Message----- From: Kyle Smith [mailto:dbzno1fanhotmail.com] Sent: Sunday, August 12, 2001 2:17 AM To: php-generallists.php.net Subject: [PHP] Interaction with text files!

    go to http://www.phpbuilder.com/forum/read.php3?num=2&id=149562&loc=0&thread=1 49562 its all there but.... WAAA!!!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    probley... ----- Original Message ----- From: "Kyle Smith" <dbzno1fanhotmail.com> To: "ReDucTor" <sjdtmvtpg.com.au> Sent: Monday, August 13, 2001 10:23 AM Subject: Re: [PHP] Interaction with text files!

    > isnt there an easier way to do number one? > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: dbzno1fanhotmail.com > AIM: legokiller666 > > > ----- Original Message ----- > From: "ReDucTor" <sjdtmvtpg.com.au> > To: "Kyle Smith" <dbzno1fanhotmail.com> > Sent: Thursday, July 12, 2001 9:18 AM > Subject: Re: [PHP] Interaction with text files! > > > > 1. > > <?php > > $file = "file.txt"; > > if(!empty($data)) > > { > > $fp = fopen($file, "w"); > > fwrite($fp, $data); > > fclose($fp); > > ?><b>Data Writen</b><?php > > } > > else > > { > > ?><form><textarea cols=40 rows=40><?php > > $filedata = file($file); > > for($i=0;$i<sizeof($filedata);$i++) > > { > > echo $filedata[$i]; > > } > > ?></textarea><br><input type="submit" value="Save"></form> > > <?php > > } > > ?> > > > > > > 2. > > <?php > > $file = file("database.txt"); > > $id = rand(0,sizeof($file)); > > echo $file[$id]; > > ?> > > > > > > ----- Original Message ----- > > From: "Kyle Smith" <dbzno1fanhotmail.com> > > To: <php-generallists.php.net> > > Sent: Monday, August 13, 2001 10:08 AM > > Subject: [PHP] Interaction with text files! > > > > > > go to > > > http://www.phpbuilder.com/forum/read.php3?num=2&id=149562&loc=0&thread=14956 > > 2 its all there but.... WAAA!!! > > > > > > -lk6- > > http://www.StupeedStudios.f2s.com > > Home of the burning lego man! > > > > ICQ: 115852509 > > MSN: dbzno1fanhotmail.com > > AIM: legokiller666 > > > > > > > > > > >

    attached mail follows:


    On 12-Aug-2001 sarahana wrote: > Hi, > Please let me know how I can select 3 files from a directory that were last > created.. >

    popen("ls -t $dir | head -3", 'r');

    > Also, the directory (out of all the directories placed in the parent > directory) that was last created. >

    vas created ?

    Regards,

    -- 
    Don Read                                       dreadtexas.net
    -- It's always darkest before the dawn. So if you are going to 
       steal the neighbor's newspaper, that's the time to do it.
    

    attached mail follows:


    Send 50,000 Emails Monthly 100% Spam Free! Blast Your Sites To 2.3 Million Websites Daily! Send ALL Mail Through Our Mail Servers! 3 Email Blasters For Pro Users! Join FREE and send mail to all new users once per week! http://thesuperpromoter.com <a href="http://thesuperpromoter.com"> AOL </a>

    To unsubscribe from this list copy and paste the following URL into your browser. If it appears as a link, just click it. Note: If you remove your address it will be removed and added to our banned address file. lists.php.net">http://64.65.15.89/cgi-bin/MailerPro/unsubscribe.cgi?action=unsub&email=php-generallists.php.net

    attached mail follows:


    Hi All, I'm trying to create a page where users can download files from. What i have discovered was that if you have a certain file type associated to a certain program and there is an href to download that type of file, what will happen is that it will automatically open the file with the associated program. for example: if i have mp3's asssociated to winamp...if there is a link <a href="song.mp3">download song</a> and i click it, it will open my winamp player and start playing the song rather than popping up the save as window so that i can save the file. my questions are: Is this discovery correct? and is there a way to prevent it from opening the associated program but rather popping up the save as window? If anyone has any clue please let me know! thanks!

    ===== Heidi Belal ICQ# 32127109

    A bus stops at a bus station. A train stops at a train station. On my desk I have a work station...

    __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/

    attached mail follows:


    Use header("Content-type: application/octet-stream"); There are also headers to prompt with the right filename. Search archives for "Content-disposition"

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Heidi Belal <hmbelalyahoo.com>
    Newsgroups: php.general
    To: CF-Talk <cf-talkhouseoffusion.com>; Egypt Programmers
    <egypt-programmersyahoogroups.com>; js-jive mailing list
    <js-jiveyahoogroups.com>; Php <php-generallists.php.net>
    Sent: Sunday, August 12, 2001 12:51 PM
    Subject: href and download
    

    > Hi All, > I'm trying to create a page where users can download > files from. > What i have discovered was that if you have a certain > file type associated to a certain program and there is > an href to download that type of file, what will > happen is that it will automatically open the file > with the associated program. > for example: > if i have mp3's asssociated to winamp...if there is a > link <a href="song.mp3">download song</a> and i click > it, it will open my winamp player and start playing > the song rather than popping up the save as window so > that i can save the file. > my questions are: > Is this discovery correct? and is there a way to > prevent it from opening the associated program but > rather popping up the save as window? > If anyone has any clue please let me know! > thanks! > > ===== > Heidi Belal > ICQ# 32127109 > > A bus stops at a bus station. > A train stops at a train station. On my desk > I have a work station... > > __________________________________________________ > Do You Yahoo!? > Send instant messages & get email alerts with Yahoo! Messenger. > http://im.yahoo.com/

    attached mail follows:


    I want to pass a large (easily 1500-2500 characters) variable between a DHTML object using Jscript over to a PHP script to ultimately update a MySQL database. I know that I can pass a variable along with the link, i.e. location.href=etc. etc., but I believe there is a limit on the size of an href. What I am doing is editting text and am using MSIE specific functions to create HTML on the fly which I then want to pass to a PHP script to update my database.

    Any help would be SINCERELY appreciated!! Merci, (or is that mercy?) Andre

    attached mail follows:


    I don't think it is possible to pass so much chars in a href, or URL for the matter. Is it really necessary? Couldn't you first write somewhere (db/file) those chars and retrieve it later, referencing it on the href?

    --
    

    Julio Nobrega.

    2B||!BB - That's the question.

    "News.Fbcc.Com" <AndreBajewKatyTexas.Com> wrote in message news:20010812175808.8234.qmailpb1.pair.com... > I want to pass a large (easily 1500-2500 characters) variable between a > DHTML object using Jscript over to a PHP script to ultimately update a MySQL > database. I know that I can pass a variable along with the link, i.e. > location.href=etc. etc., but I believe there is a limit on the size of an > href. What I am doing is editting text and am using MSIE specific functions > to create HTML on the fly which I then want to pass to a PHP script to > update my database. > > Any help would be SINCERELY appreciated!! > Merci, (or is that mercy?) > Andre > >

    attached mail follows:


    Any server along the way is allowed to chop GET requests to, like, 255 characters.

    Any server along the way is allowed to chop POST requests to, like, 1024? characters.

    *MOST* won't chop either, any more, but you're safe with POST instead of GET.

    You *COULD* however, try this to guarantee delivery:

    Breaking up the HTML into "packets" and POST each packet successively with a numbering scheme whereby PHP holds each packet in a temp table and assembles them when all packets have arrived. Dunno if JavaScript will let you execute multiple POSTs and ignore the returning HTML or not though...

    Your best bet by far is to have JavaScript execute a POST with a FILE UPLOAD. You'll have to figure out if JavaScript can do that, though...

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: News.Fbcc.Com <AndreBajewKatyTexas.Com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Sunday, August 12, 2001 12:55 PM
    Subject: Passing LARGE (1500-2500 chars) variable from JScript to PHP?
    

    > I want to pass a large (easily 1500-2500 characters) variable between a > DHTML object using Jscript over to a PHP script to ultimately update a MySQL > database. I know that I can pass a variable along with the link, i.e. > location.href=etc. etc., but I believe there is a limit on the size of an > href. What I am doing is editting text and am using MSIE specific functions > to create HTML on the fly which I then want to pass to a PHP script to > update my database. > > Any help would be SINCERELY appreciated!! > Merci, (or is that mercy?) > Andre > >

    attached mail follows:


    ok ive managed to get a random line script to work now, (please dont hurt me) im asking for a little help!

    This is the script im using

    <?php randomline("poop.txt"); function randomline($filename) { $file = file($filename); srand((double)microtime()*1000000); while ($randomquote == "") { $randomquote = ereg_replace("\n","",$file[rand(0,count($file))]); } echo $randomquote; } ?>

    And poop.txt looks like

    Random quote "umm, stuff!" Random quote "smelly pants"

    can someone please show me how to make a form which can write to this text file.... please!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    http://www.php.net/manual/en/function.fopen.php http://www.php.net/manual/en/function.fputs.php http://www.php.net/manual/en/function.fclose.php

    -----Original Message----- From: Kyle Smith [mailto:dbzno1fanhotmail.com] Sent: Sunday, August 12, 2001 10:16 PM To: php-generallists.php.net Subject: [PHP] Not too simple, i hope

    ok ive managed to get a random line script to work now, (please dont hurt me) im asking for a little help!

    This is the script im using

    <?php randomline("poop.txt"); function randomline($filename) { $file = file($filename); srand((double)microtime()*1000000); while ($randomquote == "") { $randomquote = ereg_replace("\n","",$file[rand(0,count($file))]); } echo $randomquote; } ?>

    And poop.txt looks like

    Random quote "umm, stuff!" Random quote "smelly pants"

    can someone please show me how to make a form which can write to this text file.... please!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    what are strings though?

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    ----- Original Message ----- From: "Matthew Loff" <mattwilletts.com> To: <php-generallists.php.net> Sent: Sunday, August 12, 2001 11:22 AM Subject: RE: [PHP] Not too simple, i hope

    > > http://www.php.net/manual/en/function.fopen.php > http://www.php.net/manual/en/function.fputs.php > http://www.php.net/manual/en/function.fclose.php > > > -----Original Message----- > From: Kyle Smith [mailto:dbzno1fanhotmail.com] > Sent: Sunday, August 12, 2001 10:16 PM > To: php-generallists.php.net > Subject: [PHP] Not too simple, i hope > > > ok ive managed to get a random line script to work now, (please dont > hurt me) im asking for a little help! > > This is the script im using > > <?php > randomline("poop.txt"); > function randomline($filename) { > $file = file($filename); > srand((double)microtime()*1000000); > while ($randomquote == "") { > $randomquote = ereg_replace("\n","",$file[rand(0,count($file))]); > } > echo $randomquote; > } > ?> > > And poop.txt looks like > > Random quote "umm, stuff!" > Random quote "smelly pants" > > can someone please show me how to make a form which can write to this > text file.... please! > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: dbzno1fanhotmail.com > AIM: legokiller666 > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net > To contact the list administrators, e-mail: php-list-adminlists.php.net > >

    attached mail follows:


    That's why I said you need to learn the basics of programming before asking detailed questions.

    http://www.php.net/manual/en/language.types.string.php

    -----Original Message----- From: Kyle Smith [mailto:dbzno1fanhotmail.com] Sent: Sunday, August 12, 2001 10:56 PM To: Matthew Loff Cc: php-generallists.php.net Subject: Re: [PHP] Not too simple, i hope

    what are strings though?

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    ----- Original Message ----- From: "Matthew Loff" <mattwilletts.com> To: <php-generallists.php.net> Sent: Sunday, August 12, 2001 11:22 AM Subject: RE: [PHP] Not too simple, i hope

    > > http://www.php.net/manual/en/function.fopen.php > http://www.php.net/manual/en/function.fputs.php > http://www.php.net/manual/en/function.fclose.php > > > -----Original Message----- > From: Kyle Smith [mailto:dbzno1fanhotmail.com] > Sent: Sunday, August 12, 2001 10:16 PM > To: php-generallists.php.net > Subject: [PHP] Not too simple, i hope > > > ok ive managed to get a random line script to work now, (please dont > hurt me) im asking for a little help! > > This is the script im using > > <?php > randomline("poop.txt"); > function randomline($filename) { > $file = file($filename); > srand((double)microtime()*1000000); > while ($randomquote == "") { > $randomquote = ereg_replace("\n","",$file[rand(0,count($file))]); > } > echo $randomquote; > } > ?> > > And poop.txt looks like > > Random quote "umm, stuff!" > Random quote "smelly pants" > > can someone please show me how to make a form which can write to this > text file.... please! > > > -lk6- > http://www.StupeedStudios.f2s.com > Home of the burning lego man! > > ICQ: 115852509 > MSN: dbzno1fanhotmail.com > AIM: legokiller666 > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribelists.php.net > For additional commands, e-mail: php-general-helplists.php.net To > contact the list administrators, e-mail: php-list-adminlists.php.net > >

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, e-mail: php-general-unsubscribelists.php.net
    For additional commands, e-mail: php-general-helplists.php.net To
    contact the list administrators, e-mail: php-list-adminlists.php.net
    

    attached mail follows:


    i m beginner with php.

    i developp under asp or cold fusion. with this language, when you request a page, the server runs automatiquely a page: global.asa with asp and application.cfm with cold fusion.

    can i do the same thing under php ?

    attached mail follows:


    I have seen this question before on a brazilian newsgroup I visit, and the only solutions we came (without going away from a default php installation) is to use the function include(); (and similars) or sessions.

    If anyone knows a different way, I would also be interested to know, to inform my friends from the other news.

    --
    

    Julio Nobrega.

    2B||!BB - That's the question.

    "Lolodev" <laurent.hermannworldonline.fr> wrote in message news:20010812190846.38801.qmailpb1.pair.com... > i m beginner with php. > > i developp under asp or cold fusion. > with this language, when you request a page, the server runs automatiquely a > page: global.asa with asp and application.cfm with cold fusion. > > can i do the same thing under php ? > >

    attached mail follows:


    > i developp under asp or cold fusion. > with this language, when you request a page, the server runs automatiquely a > page: global.asa with asp and application.cfm with cold fusion. > > can i do the same thing under php ?

    You can use auto_prepend in your php.ini file to call any file you like before every page hit to PHP. Never found a real need for it myself, as invariably the stuff you put in there ends up not being needed for *EVERY* page, and PHP's http://php.net/include works much better.

    But it's there if you want it.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    on 8/12/01 1:08 PM, lolodev at laurent.hermannworldonline.fr wrote:

    > i m beginner with php. > > i developp under asp or cold fusion. > with this language, when you request a page, the server runs automatiquely a > page: global.asa with asp and application.cfm with cold fusion. > > can i do the same thing under php ? > >

    inside php.ini

    ; automatically add files before or after any PHP document auto_prepend_file = auto_append_file =

    -- mike cullerton

    attached mail follows:


    Well, here's the problem I faced.

    I've a script accepting four different forms depending on the user choice. Some of the forms have two submit buttons forcking actions accordingly to the pressed button.

    The problem is: $HTTP_POST_VARS["submit"] is not set if the user press ENTER instead of clicking the button and the scripts cannot return a response for it is not clear which button has been pressed.

    Hidden field cannot works with two submit buttons for I'll have two values, but again cannot cach the user choice in case of ENTER press.

    Any help? Thank you

    Ivo

    attached mail follows:


    I haven't found a way to disable the Enter key to submit the form, as I believe it does exists, but, found a way so when Enter is pressed works like Tab, moving to the next form field.

    Here:

    http://www.faqts.com/knowledge_base/view.phtml/aid/6793/fid/129

    Google search used:

    http://www.google.com/search?q=javascript+disable+enter+form&sourceid=opera& num=0

    Sadly, it is Javascript, so an user can disable, but for those mistake key presses, should work.

    --
    

    Julio Nobrega.

    2B||!BB - That's the question.

    "Ivo Stoykov" <ivostoykovhotmail.com> wrote in message news:20010812193130.62238.qmailpb1.pair.com... > Well, here's the problem I faced. > > I've a script accepting four different forms depending on the user choice. > Some of the forms have two submit buttons forcking actions accordingly to > the pressed button. > > The problem is: $HTTP_POST_VARS["submit"] is not set if the user press ENTER > instead of clicking the button and the scripts cannot return a response for > it is not clear which button has been pressed. > > Hidden field cannot works with two submit buttons for I'll have two values, > but again cannot cach the user choice in case of ENTER press. > > Any help? Thank you > > Ivo > >

    attached mail follows:


    > I've a script accepting four different forms depending on the user choice. > Some of the forms have two submit buttons forcking actions accordingly to > the pressed button. > > The problem is: $HTTP_POST_VARS["submit"] is not set if the user press ENTER > instead of clicking the button and the scripts cannot return a response for > it is not clear which button has been pressed. > > Hidden field cannot works with two submit buttons for I'll have two values, > but again cannot cach the user choice in case of ENTER press.

    Either explicitly state a "default" action, or analyze the actual data coming in to decide what the user must have meant.

    I *thought* enter was only supposed to work in a text field when there's only one SUBMIT... But it wouldn't shock me if some browser broke that.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    "ReDucTor" <sjdtmvtpg.com.au> wrote: > one that will check for email, then if there is an email in that box, it > will send a message to the person that sent the message....

    I don't know of a PHP autoresponder script that's publicly available. If you're running a flavor of unix you may want to consider using procmail to accomplish that. A quick google search will probably reveal several procmail autoresponder recipes (what procmail scripts are known as). If you want you can write me off-list for one I use. If you insist on using PHP you'll need PHP compiled as a standalone version (CGI) and if you're using Sendmail (other MTAs may work the same) you can create an alias to pipe email received for a given address to a PHP script. The script will need to read from STDIN and use regex to find either the From or Reply-To headers to get the sender's address to use in a mail() function.

    FYI, to read from STDIN in PHP4 use:

    fopen( 'php://stdin', 'r' );

    --
    Steve Werby
    President, Befriend Internet Services LLC
    http://www.befriend.com/
    

    attached mail follows:


    My first WORKING SCRIPT!!!

    http://www.stupeedstudios.f2s.com/index.php

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    Congratulations, Kyle :-)

    All those messages finally paid off then.

    Andy.

    **************************** Need a DHTML Menu? try www.milonic.com/menu It's free & Fully Cross Browser. ****************************

    ----- Original Message ----- From: "Kyle Smith" <dbzno1fanhotmail.com> To: <php-generallists.php.net> Sent: Monday, August 13, 2001 5:02 AM Subject: [PHP] WAHOO!!!

    My first WORKING SCRIPT!!!

    http://www.stupeedstudios.f2s.com/index.php

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    at the moment in the quote bank we have the following

    Random quote by lk6 - "Lifes a bitch, then you die " Random quote by Wizaerd (from True Romance) - "Live fast, die young, and leave a good looking corpse..." Random quote by anon - "No matter where you might be; there you are" Random quote by futurebird - "You will go down in history as a great man." Random quote by bad haxxor - "<b>Bold text</b> <a href=http://futurebird.diaryland.com>and a link to my site</a> what a little haxx0r!" Random quote by evil haxxor - "Click on the little birdie: <a href=http://futurebird.diaryland.com><IMG SRC=http://futurebird.diaryland.com/images/lilbird.jpg></a><br><br><i>hmmm wonder if I can uses php?</i><?php echo "test"; ?>" Random quote by Milo - "REAL PROGRAMMERS don't comment their code. If it was hard to write, it should be hard to understand."

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    ----- Original Message ----- From: "Kyle Smith" <dbzno1fanhotmail.com> To: <php-generallists.php.net> Sent: Sunday, August 12, 2001 9:02 PM Subject: [PHP] WAHOO!!!

    My first WORKING SCRIPT!!!

    http://www.stupeedstudios.f2s.com/index.php

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    Each user has a long list of magazines to choose from. Problem is that for every magazine there is a checkbox and there are a lot of magazines to choose from (more than 100). I put all of them in one form. After submit I have to know which magazines user checked. Is there any more simple way than mine? Well here it is:

    I got a form with checkboxes which names are primary keys of every magazine. I use "sif_" in front because you cannot have variables like $123 => $sif_123.

    <input type="checkbox" name="sif_<? echo $wponud[6]; ?>" value="1">

    After submitting the form I have to know which magazines user ordered. I go through user's magazines again and use eval function twice to get variable submited by form.

    <? while ($wponud = mysql_fetch_array($izpis_raw)) { $temp = "sif_$wponud[6]"; eval ("\$temp = \"$temp\";"); $temp = "$".$temp; eval ("\$temp = \"$temp\";"); if ($temp == 1) { // got it echo $wponud[6]."<br>"; } ?>

    If anybody can think of better way to do it, please let me know.

    tnx.

    mitja.

    attached mail follows:


    > I have a site on my laptop, works fine. > > When I tar it up and move to my ISP for a production environment, certain things stop working. > > The two environments are pretty much the same, except my laptop is php_mod and the ISP is a cgi.

    Turn your laptop into a CGI and see if you can duplicate the behaviour.

    Then hack httpd.conf until it works.

    I *THINK* *MAYBE* *MAYBE* *MAYBE* that you have to use Alias to give the path to PHP and Action using the alias to get the path information working properly for this.

    I'm guessing that they are puking by looking for the full path including the /foo/bar

    At any rate, you simply don't have enough control over the ISP's server to debug this, but you do have it on your laptop.

    attached mail follows:


    > i have some problems with "exec". i am using win2000, apache and latest php > version. always 'unable to fork' . what´s the problem?

    As I understand it:

    Windows is not thread-safe.

    As an implication, exec-ing something would just crash anyway.

    Thus, exec() and friends won't work on Windows in PHP4 and up.

    If that's wrong, somebody email me off-list.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    > $cat="select * FROM categories c WHERE c.type='Earmold'"; > $cats=mysql_query($cat); > while ($row = mysql_fetch_array($cats)) { > extract($row);

    if ($id == $cid){ echo $name; } else{

    > echo "<a class=subnavlink href=\"?cid=$id&page=1\">$name</a> ";

    }

    > } > > What I would like to do is turn off the link if the link is active in the > browser. So if the url loaded in the browser is

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    Try adding "/" after the time argument to SetCookie.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Aaron Chan <notspecified.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 10, 2001 6:05 PM
    Subject: Cookie only worked on "/" but not in any sub-directories
    

    > Hi, > > First of all, I'm very new to PHP. I tried to call setcookie() function to > set a cookie using the following code: > > setcookie ("TestCookie", "Some Value", time()+3600); > echo $TestCookie, "<BR>"; > > It works perfectly for the root directory, but when i try to do the same > thing in another directory called '/phptest/', it didn't work at all. I > tried to switch on netscape's "Warn me before accepting cookie" and saw that > the cookie was indeed sent to the client. However, I could not read back the > cookie's value no matter how many times i refresh netscape. Can anyone tell > me what's going on? > > Any help would be greatly appreciated. > > Thanks, > Aaron > >

    attached mail follows:


    You'd have to show us every line that mentioned $connectionid for us to figure out where it disappeared...

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Yamin Prabudy <yaminpro.net.id>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 10, 2001 10:57 PM
    Subject: upgrading from 4.03 to 4.06
    

    Hi there recently I had upgrade my php from as you see in the subject

    and I have a problem raise after I do some upgrading.... my php script already run OK when I used the previous version after I do the upgrading a lot of error raise here is how I configure /configure --with-mysql=/usr/local --with-apxs=/usr/local/apache/bin/apxs -- enable-memory-limit --enable-ucd-snmp-hack --with-snmp=/usr/local/snmpd --en able-discard-path --enable-force-cgi-redirect --enable-trans-sid

    the problem is like this....

    on the beginning of the script i declare $connectid=mysql_connect(bla,bla,bla);

    and at the end (still the same page) I used this mysql_db_query($db,"query",$connectid); <------ here is the error come up seems like the $connectid variable that I declare in previous didn't parse till the end.... then I put the $connectid=mysql_connect(bla,bla,bla); before the query then everything is OK......

    can any body point me out where did I go wrong...I'm sure my script is OK..it's run in version 4.03 but got error in 4.06

    Thanks in Advance

    Yamin Prabudy

    attached mail follows:


    You can http://php.net/exec gunpg or PGP. Sample code in email archives and code archives http://php.net/links.php abounds.

    I think there's a relatively new gnupg module, but don't quote me on that. http://php.net/gnupg

    CAVEAT: You need to make the public key-halves in the keyring readable by "nobody" or whomever PHP runs as, while *NOT* putting the private half in such a file which anybody on that same computer can read.

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Elias <elias_bachaalanyyahoo.com>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 10, 2001 9:42 AM
    Subject: PHP and Public Key System cryptos? (PKS)
    

    > Hello. > > Does PHP somehow offer a PKS encryption libraries? > >

    attached mail follows:


    You do realize there is a PHP function for that http://php.net/get_meta_tags, I think...

    It will not work properly on oddly-formatted META tags, though... Go fit it, after you figure out the right Regex expressions.

    You'll want the non-greedy Regex (POSIX or Perl, I forget which is which).

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Kyle Mathews <kylethedip.net>
    Newsgroups: php.general
    To: <php-generallists.php.net>
    Sent: Friday, August 10, 2001 12:29 PM
    Subject: Meta Tags and Regular Expressions
    

    > Hello: > > I'm looking for a good way to pull information from a static HTML file for > dumping into a database. > I need to pull the information from a META tag, and from within two comments > in the HTML file. > I know this can be done with regular expressions, but I'm not really sure > where to start or how to do it. > > <META name="CATEGORY" CONTENT="Test Content"> > > I need to pull the CONTENT information from this META tag. > > <!-- STORY START --> > > Story contents > > <!-- STORY END --> > > Then pull the information from between these two comments. > > Any help, and/or example code would help a lot. > > Thanks, > Kyle > kylethedip.net > > >

    attached mail follows:


    #1. You *CANNOT* count on session data to be registered by your main FRAMESET before the requests for the sub-FRAMEs are made. Pass any variables you need on the first page through the URLs: <FRAMESET ...> <FRAME SRC=foo.php?username=<?php echo $username;?> ...> <FRMAE SRC=bar.php?username=<?php echo $username;?> ...> </FRAMESET>

    WARNING: This means that unless you are careful, hackers can surf to sub-pages (foo and bar above) without actually authenticating. Store some info in a database at the top of your FRAMESET page, close the db connection before the FRAME tags, and access it in the foo and bar pages to be sure they're valid.

    #2. If you want to log somebody out, you'll need to unset() variables and do session_delete()

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Balaji Ankem <balaji.ankemwipro.com>
    Newsgroups: php.general
    To: Yamin Prabudy <phplistpro.net.id>
    Cc: <php-generallists.php.net>
    Sent: Friday, August 10, 2001 3:47 AM
    Subject: again session doubt
    

    Hello! boss, It started session. But i didn't close the session. I tried to login again. But it is giving authorization required. It is not allowing for loggin in again because of session. What i have to do.

    Thanks and regards -Balu

    ----- Original Message ----- From: Yamin Prabudy To: Balaji Ankem Sent: Friday, August 10, 2001 12:38 PM Subject: Re: Help required on creating session

    say you have a form that input the username in the top of the file before the <html> just put the <? session_start(); session_register(username); ?> that's goes the first page... in the next page you can do this

    <? session_start(); echo $username; ?>

    you must have you username display there ----- Original Message ----- From: Balaji Ankem To: Yamin Prabudy Cc: php-generallists.php.net Sent: Friday, August 10, 2001 1:16 PM Subject: Help required on creating session

    Hi! friends, i also want this feature.

    Can u tell me how to start a session whenever the user logged in and how to end session after logout.

    where i have to give these function names... session_start(); session_register(username);

    Thanks in advance.

    Regards -Balaji ----- Original Message ----- From: Yamin Prabudy To: php-generallists.php.net Sent: Friday, August 10, 2001 10:02 AM Subject: [PHP] HELP...session

    Hi there I need help about session

    see i have a page (index.php) that used this session_start(); session_register(username); and i got input username

    after the submit button is click i move into a frame pages......

    then in the frame i define again session_start(); for each frame...i got two frame...... i intended to parse the username into my frame...but got nothing i intended to parse the username all over the pages (in frame) until he/she log out

    can anyone help me with it

    Thanks in Advance

    Yamin Prabudy

    attached mail follows:


    Anybody else using 10000 on that machine yet?

    netstat -a

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    ----- Original Message -----
    From: Jon Farmer <jonfarmerenta.net>
    Newsgroups: php.general
    To: PHP General Mailing List <php-generallists.php.net>
    Sent: Friday, August 10, 2001 10:58 AM
    Subject: Socket problem
    

    > Hi, > > I playing with the socket examples off php.net > > When I try the talkback example I get the following error > > bind() failed: reason: Can't assign requested address > > I am setting $address to the ip of the machine and using port 10000 > > Any ideas? > > Regards > > Jon > > > Jon Farmer > Systems Programmer > Entanet International Ltd www.enta.net > Tel 01952 428969 > Mob 07968 524175

    attached mail follows:


    > $data[0] = addslashes(fread(fopen($picture1, "r"), filesize($picture1)));

    Gak. You are missing otu on all sorts of error-checking there...

    > to store files from a client machine but now I want to store files from a > webstie ie > http://servername.com/file.jpg

    Just use $picture1 = "http://servername.com/file.jpg";

    You really should break this down into multiple steps.

    You can get rid of the filesize() call to save load, and just loop through fread(..., 1000000); and append the data to your $data[0]

    --
    WARNING richardzend.com address is an endangered species -- Use
    ceol-i-e.com
    Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
    Volunteer a little time: http://chatmusic.com/volunteer.htm
    

    attached mail follows:


    i know this is out of tpic but i thought it would be a reason for you to celebrate, im going on holiday or "vacation" see ya in 2 weeks... BYE!!

    -lk6- http://www.StupeedStudios.f2s.com Home of the burning lego man!

    ICQ: 115852509 MSN: dbzno1fanhotmail.com AIM: legokiller666

    attached mail follows:


    I am currently writing a piece of code that when a user enters in their email address it will check it for validity.

    In this instance they are supposed to type in userdomain.com But if they just type in user I want it to add domain.com at the end by default. This is the piece of code I have so far, but it does not seem to be working...

    if (strstr($email, '')) { continue; } else { $email = $email . "domain.com"; }

    I've been all over the documentation but I am obviously missing something. If anyone could be of any assistance I would greatly appreciate it.

    Thanks you.

    -- 
    Erich Zigler                          
    

    I prefer rogues to imbeciles, because they sometimes take a rest. -- Alexandre Dumas (fils)