OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general-digest-help_at_lists.php.net
Date: Fri Nov 15 2002 - 11:30:29 CST

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

    php-general Digest 15 Nov 2002 17:30:29 -0000 Issue 1706

    Topics (messages 124564 through 124635):

    Download Counter Script
            124564 by: Twist
            124572 by: Ernest E Vogelsinger

    PHP Database
            124565 by: Steven Priddy
            124588 by: Jason Wong
            124593 by: Marek Kilimajer

    Re: icmp ping, check port, etc.
            124566 by: Tony Earnshaw

    Re: Swear word substitution
            124567 by: Tony Earnshaw

    Thanks !!!
            124568 by: Mike MacDonald

    Re: Relaying variables to distant site
            124569 by: Mike MacDonald
            124570 by: Jason Wong

    It only prints lines that beggin with a number? I'm on a deadline!
            124571 by: Godzilla
            124579 by: Marek Kilimajer
            124598 by: 1LT John W. Holmes

    Re: shell_exec problem
            124573 by: Sebastian Konstanty Zdrojewski
            124596 by: Jason Wong

    something like array_walk?
            124574 by: A. J. McLean
            124576 by: Marek Kilimajer
            124577 by: Jon Haworth
            124580 by: A. J. McLean
            124604 by: Khalid El-Kary

    Finding last entry in MySQL database
            124575 by: Tim Thorburn
            124578 by: Ernest E Vogelsinger
            124582 by: M.A.Bond
            124587 by: Marek Kilimajer

    Re: does PHP4.0 supports https:// post?
            124581 by: Marek Kilimajer

    Report on: LDAP specific?
            124583 by: Tony Earnshaw

    Re: Redirect Problem
            124584 by: Marek Kilimajer

    Re: parse comma delimited file
            124585 by: Marek Kilimajer

    Need difficult help !
            124586 by: Hacook
            124589 by: Ewout de Boer
            124590 by: Jason Wong
            124591 by: Lauri Jakku
            124594 by: Hacook
            124621 by: Ewout de Boer

    Re: how to generate ms-word files
            124592 by: Manuel Lemos

    Re: small php engine
            124595 by: Marek Kilimajer

    Socket help
            124597 by: Michael Hazelden

    Validating postal codes
            124599 by: DonPro
            124601 by: Michael Hazelden
            124603 by: Marco Tabini
            124605 by: Marek Kilimajer

    #color problems
            124600 by: Adam
            124607 by: Marek Kilimajer
            124609 by: Adam
            124610 by: Marco Tabini
            124614 by: Adam
            124618 by: Marek Kilimajer
            124632 by: . Edwin

    Modifying native Word files
            124602 by: Chris Boget

    problemde connection informix
            124606 by: Matthieu Le Corre
            124608 by: Matthieu Le Corre

    How to break a "while" loop ?
            124611 by: Hacook
            124613 by: Ernest E Vogelsinger
            124615 by: Tony Earnshaw

    php Wildcard???
            124612 by: vernon
            124617 by: Michael Hazelden
            124620 by: Ewout de Boer

    longitude/latitude function
            124616 by: Edward Peloke
            124619 by: Aaron Gould
            124622 by: Edward Peloke
            124628 by: Aaron Gould
            124631 by: Edward Peloke
            124633 by: jef.eyeintegrated.com

    I'm in need of a PHP web host recommendation
            124623 by: Phil Schwarzmann
            124626 by: Jon Haworth
            124630 by: Edward Peloke

    Re: GD 1.5
            124624 by: Mako Shark
            124625 by: Rasmus Lerdorf
            124629 by: . Edwin
            124634 by: Jason Wong
            124635 by: . Edwin

    Ereg headache
            124627 by: Mako Shark

    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:


            Okay this is probably a common subject for questions from
    newbies like me but I searched the archive first and I didn't find
    anything about my specific question.

            I have been learning PHP for a few weeks now and I have a
    working download counter script already wrote. It works great the
    way it is, it just doesn't work quite the way I want it to. My
    script can keep track of multiple files, it adds new files on the fly
    if they are not already in the counter file, it keeps track of an
    unlimited (with-in reason of course) number of files all from a
    single text file (could easily be configured to use a database as
    well), it can display the count for any file, it has an option to
    display a list of all the files it is tracking with the count for
    each file, and with a little work I will be able to combine it with a
    page load tracking script I made and they will be able to share the
    same text file to store the counts in.

            This is all great, the problem is that it loads a new page
    the way I am doing it. I am using the header() function to get the
    browser to download. I have seen sites with counters that download
    the file and update the count without loading a new page, without
    reloading the current page even. So I am wondering how are they
    doing this? Or better yet how can I get my script to work like I
    wish it to?

    -- 
    Twist
    twisttwistedtechnology.net
    http://www.twistedtechnology.net
    

    "You rely on what you get high on and you last just as long as it serves you." - The Cardigans

    attached mail follows:


    At 06:39 15.11.2002, Twist said: --------------------[snip]-------------------- > This is all great, the problem is that it loads a new page >the way I am doing it. I am using the header() function to get the >browser to download. I have seen sites with counters that download >the file and update the count without loading a new page, without >reloading the current page even. So I am wondering how are they >doing this? Or better yet how can I get my script to work like I >wish it to? --------------------[snip]--------------------

    With MIME (and HTTP is MIME-compliant) you can transmit more than one entity in a single pass - this is called "multipart" transmission. The recipient (here: the browser) should handle all parts of a multipart message per se.

    What you need to do is to set the content type of the response to multipart/alternative, and transmit the HTML result first, and the file content next. Both parts are delimited by a boundary string, and each part has its own MIME header.

    Something like:

    // construct the "alternative" hader for the site's response $boundary = md5(date('hisjmy')); header("Content-type: multipart/alternative; boundary=\"$boundary\"");

    // The HTML page starts with a boundary and its own MIME header $html_head = "--$boundary\n" . "Content-Type: text/html\n" . "Content-Disposition: inline\n\n";

    // The Attachment starts with another MIME header $attach_head = "\n--boundary\n" . "Content-Type: application/octet-stream\n" . "Content-Transfer-Encoding: base64\n" . "Content-Disposition: attachment;\n" . " filename=\"$filename\"";

    Your response would then look something like this:

    echo $html_head; echo $html_page_contents; echo $attach_head(); transmit_file_content(); echo "\n--$boundary\n";

    This is top off my head, but it should work. For more information on multipart responses you might consult

    ftp://ftp.rfc-editor.org/in-notes/rfc2045.txt (MIME Part I) ftp://ftp.rfc-editor.org/in-notes/rfc2046.txt (MIME Part II) ftp://ftp.rfc-editor.org/in-notes/rfc2047.txt (MIME Part III) ftp://ftp.rfc-editor.org/in-notes/rfc2183.txt (Content-Disposition)

    -- 
       >O     Ernest E. Vogelsinger
       (\)    ICQ #13394035
        ^     http://www.vogelsinger.at/
    

    attached mail follows:


    I am looking into how I can make a database like this one that is MySql controlled. http://www.uhlfans.com/uhlstats/ That is one of my partners sites but the guy that created the database can't or won't tell me how to build one myself for a different subject. Thanks for your help!

    attached mail follows:


    On Friday 15 November 2002 14:00, Steven Priddy wrote: > I am looking into how I can make a database like this one that is MySql > controlled.

    With a lot of hard work I would say.

    > http://www.uhlfans.com/uhlstats/ That is one of my partners > sites but the guy that created the database can't or won't tell me how to > build one myself for a different subject. Thanks for your help!

    Without knowing what your level of knowledge is and exactly what you're expecting as an answer it's very difficult to give you much help.

    - Do you want a step by step guide? (You've come to the wrong place!)

    - Do you want some help on general database design? (Search for some database design and sql tutorials).

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* Volley Theory: It is better to have lobbed and lost than never to have lobbed at all. */

    attached mail follows:


    You need to understand the relations between the entities in order to design the database, there are 3 types: 1 to 1: - one team has one couch, no team has more couches and no couch has more teams. - usually in one table (team_name, couch_name), but might be also in two interconnected with keys (team_id, team_name)(team_id, couch_name) 1 to many: - one team has more players, but every playes has only one team - two tables interconnected with key (team_id, team_name)(player_id, team_id, player_name) many to many: - each team plays with more team (this is many to many, but references to the same table, better example would be mailing lists and subscribers, lists have many subscribers and subscribers might participate in more mailing lists) - this is done using another table holding multiple references, but might hold also additional information (domestic_team_id, host_team_id, dom_team_score, host_team_score, match_date)

    this is about design, but you have to make it yourself, I don't know about it much

    Steven Priddy wrote:

    >I am looking into how I can make a database like this one that is MySql >controlled. http://www.uhlfans.com/uhlstats/ That is one of my partners >sites but the guy that created the database can't or won't tell me how to >build one myself for a different subject. Thanks for your help! > > > > >

    attached mail follows:


    tor, 2002-11-14 kl. 20:32 skrev Ewout de Boer:

    > You could exec the ping command and analyze its output using regular > expressions.

    I just wondered whether Bryan wasn't trying to reinvent the wheel (www.nessus.org, www.insecure.org, etc.)

    Best,

    Tony

    -- 
    

    Tony Earnshaw

    Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.

    e-post: tonnibilly.demon.nl www: http://www.billy.demon.nl

    attached mail follows:


    tor, 2002-11-14 kl. 16:54 skrev CJ:

    > There was not a swear word in my original post but there was a word that > contained a swear word but is itself not a swear word. The word is Scu > > n > > thorpe

    Don't believe it.

    -- 
    

    Tony Earnshaw, Yorkshireman, ah cum fra Scunthorpe mesemn.

    Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.

    e-post: tonnibilly.demon.nl www: http://www.billy.demon.nl

    attached mail follows:


    Well thanks heaps everyone for some very good ideas ! I'm taking bits and pieces and coming together with a very fine understanding !

    Much appreciated !

    attached mail follows:


    ernestvogelsinger.at (Ernest E Vogelsinger) wrote in news:5.1.1.6.2.20021115015548.028ef858mail.vogelsinger.at:

    > ernestvogelsinger.at

    Ernest ! I just tried out your solution and it formats up the get string out of the box! We're really close because although the page still errors, if I print the composite URL out to the page, and paste it into the browser it works fine.

    If I run the script as below then it doesn't.

    This version uses the 'snoopy' php class, but I get the same result when I just use readfile()

    $post = null; foreach($_REQUEST as $var => $val) { if ($post) $post .= '&'; $post .= htmlentities($var).'='.htmlentities($val); } //echo $post; $post=trim($post); $CompositeURL="http://202.20.65.2:3000/sportzHUB/Fletchers/BookingResults ?$post"; echo $CompositeURL;

    // Pull in Snoopy include "ProxyInc.html"; $snoopy = new Snoopy; $snoopy->fetch("$CompositeURL"); print $snoopy->results;

    The error is the ioctl error that one gets if the page is not there. However the page is there -- I can prove it by pasting the printed URL into the browser.

    We're very nearly there !! Thanks very much for your help and all the others who have contributed !!

    Kind regards Mike

    attached mail follows:


    On Friday 15 November 2002 14:32, Mike MacDonald wrote:

    > $CompositeURL="http://202.20.65.2:3000/sportzHUB/Fletchers/BookingResults > ?$post"; > echo $CompositeURL; > > // Pull in Snoopy > include "ProxyInc.html"; > $snoopy = new Snoopy; > $snoopy->fetch("$CompositeURL"); > print $snoopy->results; > > The error is the ioctl error that one gets if the page is not there. > However the page is there -- I can prove it by pasting the printed URL > into the browser.

    The site that you're trying to connect to may be doing some checks to see whether the user-agent is a known browser in an attempt to stop people from programatically (sp?) accessing it.

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* Don't get mad, get even. -- Joseph P. Kennedy

    Don't get even, get jewelry. -- Anonymous */

    attached mail follows:


    Hi everyone,

    I have a pretty strange problem that may be simple, but I have never heard of it.

    ////// I have a database in the following format:

    2 2 2 Cd's Cd's DVD's DVD's DVD's DVD's DVD's

    ////// Someone recently helped me out in writing a short script that would turn it into this:

    2 1 \\ each unique entry gets a unique number separated by Tabs 2 1 2 1 Cd's 2 Cd's 2 DVD's 3 DVD's 3 DVD's 3 DVD's 3 DVD's 3

    Here is the script -------------- $count = 0; $db = mysql_connect("localhost", "user", "pass"); mysql_select_db("database",$db); $result = mysql_query ("SELECT * FROM `data` WHERE categories"); while ($row = mysql_fetch_array($result)) { $currow = $row["0"]; if ($count == 0) { $lastrow = $currow; $count = 1; } echo $row["0"] . "\t" . $count . "<BR>\n"; if ($currow != $lastrow) { $count++; } $lastrow = $currow; } -------------- This worked great on my home server. Now I need to move it over to our real server which has an almost identical setup. The problem I have is that it will only print rows that begin with a number! I have tried changing the dbase format to just about everything, but still no good. The table has about 4000 rows but the script only prints the first 300 or so which are the ones that begin with a number. I have tried removing all of the rows that start with a number, in that case it prints nothing, acting like the other row's don't exist. My home server has since been formatted so I can't verify what the setup was or if there was anything different about it. If anyone can help in any way it would be greatly appreciated, I am on a deadline which ends in a few days and this is putting me behind schedule.

    Thanks Very Much,Tim

    attached mail follows:


    Godzilla wrote:

    >Hi everyone, > >I have a pretty strange problem that may be simple, but I have never heard >of it. > >////// I have a database in the following format: > >2 >2 >2 >Cd's >Cd's >DVD's >DVD's >DVD's >DVD's >DVD's > >////// Someone recently helped me out in writing a short script that >would turn it into this: > >2 1 \\ each unique entry gets a unique number separated by Tabs >2 1 >2 1 >Cd's 2 >Cd's 2 >DVD's 3 >DVD's 3 >DVD's 3 >DVD's 3 >DVD's 3 > >Here is the script >-------------- > $count = 0; >$db = mysql_connect("localhost", "user", "pass"); >mysql_select_db("database",$db); >$result = mysql_query ("SELECT * FROM `data` WHERE categories"); > try changing this query to

    "SELECT * FROM `data` WHERE categories != '' OR categories IS NOT NULL"

    >while ($row = mysql_fetch_array($result)) { > $currow = $row["0"]; > if ($count == 0) { > $lastrow = $currow; > $count = 1; > } > echo $row["0"] . "\t" . $count . "<BR>\n"; > if ($currow != $lastrow) { > $count++; > } $lastrow = $currow; >} >-------------- >This worked great on my home server. Now I need to move it over to our real >server which has an almost identical setup. The problem I have is that it >will only print rows that begin with a number! I have tried changing the >dbase format to just about everything, but still no good. >The table has about 4000 rows but the script only prints the first 300 or so >which are the ones that begin with a number. I have tried removing all of >the rows that start with a number, in that case it prints nothing, acting >like the other row's don't exist. My home server has since been formatted so >I can't verify what the setup was or if there was anything different about >it. >If anyone can help in any way it would be greatly appreciated, I am on a >deadline which ends in a few days and this is putting me behind schedule. > >Thanks Very Much,Tim > > > > > >

    attached mail follows:


    > >$result = mysql_query ("SELECT * FROM `data` WHERE categories");

    Where categories is what?? You don't have any comparison...

    What it's doing is evaluating the column as true or false. Any integer column > 0 will evaluate to true, so that row will be returned. "1A" will be converted to 1, so it'll be returned as true. "CD" will be converted to zero, so that row will not be returned...

    ---John Holmes...

    attached mail follows:


    Why don't you try to use the system() function call? I use it to launch different programs on a server and it works perfectly. Be sure the sendfax application is launchable by the apache daemon.

    Best Regards,

    En3pY

    Coert Metz wrote: > Hi everybody > > I have some few problems with the shell_exec command. > I want to send a fax with hylafax using the sendfax program in linux. > When I try to do shell_exec ("sendfax -n -d faxnumber faxfile") it will > not work I can see in my httpd file that linux only gets the command > 'sendfax' and not the parameters '-n -d .....'. > > Can anybody help me? > > Thanks in advance > > Coert Metz >

    -- 
      Sebastian Konstanty Zdrojewski
    IT Analyst
    

    Neticon S.r.l. Via Valtellina 16 - 20159 Milano - MI - Italy

    Phone (+39) 02.68.80.731 E-Mail s.zdrojewskineticon.it Website http://www.neticon.it

    attached mail follows:


    On Friday 15 November 2002 03:02, Coert Metz wrote: > Hi everybody > > I have some few problems with the shell_exec command. > I want to send a fax with hylafax using the sendfax program in linux. > When I try to do shell_exec ("sendfax -n -d faxnumber faxfile") it will

    I have a little app which allows someone to enter a number and upload a PDF file which gets faxed using sendfax. Works fine here. I'm basically doing the same as you are:

    shell_exec("sendfax $OPTIONS -d $DESTINATION $FILE");

    > not work I can see in my httpd file that linux only gets the command > 'sendfax' and not the parameters '-n -d .....'.

    What httpd file? You mean the log? What exactly do you see? Copy-paste the line(s).

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* MMM-MM!! So THIS is BIO-NEBULATION! */

    attached mail follows:


    I want to take an array and get the soundex() for each element in that array and return the results into another array. Is there an clean way to do this?

    $color = array("blue", "green", "orange", "purple", "red", "yellow");

    function sound(&$word){ $word = soundex($word); }

    array_walk($color, 'sound'); print join(" ", $color);

    This will print out the array $color, which is now changed to soundex, i.e. the original array (up top) has changed--which I don't want. How can I generate a separate array $colorsoundex?

    Thank you.

    attached mail follows:


    What about

    foreach($color as $c) { $color_soundex[]=soundex($c); }

    A. J. McLean wrote:

    >I want to take an array and get the soundex() for each element in that array >and return the results into another array. Is there an clean way to do >this? > >$color = array("blue", "green", "orange", "purple", "red", "yellow"); > >function sound(&$word){ > $word = soundex($word); >} > >array_walk($color, 'sound'); >print join(" ", $color); > >This will print out the array $color, which is now changed to soundex, i.e. >the original array (up top) has changed--which I don't want. How can I >generate a separate array $colorsoundex? > >Thank you. > > > > >

    attached mail follows:


    Hi,

    > I want to take an array and get the soundex() for each element > in that array and return the results into another array.

    How about:

    $color = array("blue", "green", "orange", "purple", "red", "yellow"); $soundex = array();

    foreach ($color as $foo) { $soundex[] = soundex($foo) }

    HTH

    Cheers Jon

    attached mail follows:


    Thanks! Just what I was looking for!

    "Jon Haworth" <jhaworthwitanjardine.co.uk> wrote in message news:67DF9B67CEFAD4119E4200D0B720FA3F0241E788BOOTROS... > Hi, > > > I want to take an array and get the soundex() for each element > > in that array and return the results into another array. > > How about: > > $color = array("blue", "green", "orange", "purple", "red", "yellow"); > $soundex = array(); > > foreach ($color as $foo) { > $soundex[] = soundex($foo) > } > > HTH > > Cheers > Jon

    attached mail follows:


    hi,

    just remove the "&" from the first argument of array_walk, the function then operates on a copy of the array. this is written in the PHP manual, check there

    khalid

    _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

    attached mail follows:


    Hi,

    I'm creating a form which will allow individuals to add themselves to an online database and ask if they'd like to upload a picture. I have the form setup which allows the individuals to add themselves - currently it asks if they have a picture to upload (a yes or no drop menu). On the screen after the individual adds them self, I'd like to check the database for the last entry (the one just made) and then see if the picture column has a yes or a no stored.

    What I don't know is how to select the last entry in a database ... I'm sure its something very simple, but with being up until 5am working on this site - it's slipped by caffeine powered brain.

    Thanks -Tim

    attached mail follows:


    At 11:11 15.11.2002, Tim Thorburn said: --------------------[snip]-------------------- >I'm creating a form which will allow individuals to add themselves to an >online database and ask if they'd like to upload a picture. I have the >form setup which allows the individuals to add themselves - currently it >asks if they have a picture to upload (a yes or no drop menu). On the

    From a UI guide - it would be better to present either a checkbox, or two radiobuttons, for a simple question like this. Basically: is it a yes or no - use a checkbox (checked=yes) is it two options - use radiobuttons

    >screen after the individual adds them self, I'd like to check the database >for the last entry (the one just made) and then see if the picture column >has a yes or a no stored. > >What I don't know is how to select the last entry in a database ... I'm >sure its something very simple, but with being up until 5am working on this >site - it's slipped by caffeine powered brain.

    Could be tricky and depends on your data layout. (a) you have an auto-increment ID value, then select * from mytable where id = (select max(id) from mytable) (b) you have a timestamp field, then select * from mytable where dt_entry = (select max(dt_entry) from mytable)

    Note that the timestamp solution could easily produce duplicates while the auto-increments do not.

    -- 
       >O     Ernest E. Vogelsinger
       (\)    ICQ #13394035
        ^     http://www.vogelsinger.at/
    

    attached mail follows:


    Tim,

    This is a dangerous way of doing things, if you get a couple of people registering at the same time the system has the possibility of getting the wrong entry, you best bet is to have the upload script return the last insertid(I'm assuming your database has an autoincrement/id field) and pass it onto the next screen via a hidden variable in the form or via the url.

    Mark

    -----Original Message----- From: Tim Thorburn [mailto:immortalnwconx.net] Sent: 15 November 2002 10:11 To: php-generallists.php.net Subject: [PHP] Finding last entry in MySQL database

    Hi,

    I'm creating a form which will allow individuals to add themselves to an online database and ask if they'd like to upload a picture. I have the form setup which allows the individuals to add themselves - currently it asks if they have a picture to upload (a yes or no drop menu). On the screen after the individual adds them self, I'd like to check the database for the last entry (the one just made) and then see if the picture column has a yes or a no stored.

    What I don't know is how to select the last entry in a database ... I'm sure its something very simple, but with being up until 5am working on this site - it's slipped by caffeine powered brain.

    Thanks -Tim

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    better would be to keep it in a session variable, so people don't spoof it.

    M.A.Bond wrote:

    >Tim, > >This is a dangerous way of doing things, if you get a couple of people >registering at the same time the system has the possibility of getting the >wrong entry, you best bet is to have the upload script return the last >insertid(I'm assuming your database has an autoincrement/id field) and pass >it onto the next screen via a hidden variable in the form or via the url. > >Mark > > >-----Original Message----- >From: Tim Thorburn [mailto:immortalnwconx.net] >Sent: 15 November 2002 10:11 >To: php-generallists.php.net >Subject: [PHP] Finding last entry in MySQL database > > >Hi, > >I'm creating a form which will allow individuals to add themselves to an >online database and ask if they'd like to upload a picture. I have the >form setup which allows the individuals to add themselves - currently it >asks if they have a picture to upload (a yes or no drop menu). On the >screen after the individual adds them self, I'd like to check the database >for the last entry (the one just made) and then see if the picture column >has a yes or a no stored. > >What I don't know is how to select the last entry in a database ... I'm >sure its something very simple, but with being up until 5am working on this >site - it's slipped by caffeine powered brain. > >Thanks >-Tim > > > > >

    attached mail follows:


    PHP doesn't really care if it is https or http, this is being taken care by the webserver. If it is not working for you, you might have some browser issue.

    Peter wrote:

    >Hi, > What's the latest version of PHP that can handle https:// post? > > >Thanks, >-Peter > > > > >

    attached mail follows:


    tor, 2002-11-14 kl. 11:50 skrev Krzysztof Dziekiewicz:

    > > I can show a jpeg using a href with a target, either in a new page or a > > frame. To do this, PHP needs to be fed 'header("Content-type: > > image/jpeg")'. This can be put more or less anywhere in the very short > > script used for showing the jpeg and works. However, if I try to put any > > more html code into the script, i.e. 'print <html>';, print '<body>'; > > etc, *anywhere*, I get a "headers already sent" error.

    > You can not put any html code with image code. > If you send some html you mean to send > header("Content-Type: text/html") > with > header("Content-type: image/jpeg") > Where do you want go to ? > You can do so: > There is on the page http://xxx/user.html?name=smith some html code where a user can act. > Among the html code you insert <img src="http://xxx/userfoto.html?name=smith"> > On http://xxx/userfoto.html you send header("Content-type: image/jpeg") and the > image content and no html code.

    This fscking well works!!! It works with frames (one frame can be hidden) and it works with pages.

    I would *never* have had the intelligence to have found this out for myself, well maybe it woould have taken me a month.

    Krzysztof and php-general, I love you all like brothers.

    Best,

    Tony

    -- 
    

    Tony Earnshaw

    Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.

    e-post: tonnibilly.demon.nl www: http://www.billy.demon.nl

    attached mail follows:


    the header, to be http compliant, should be Location: http://$HTTP_HOST$PHP_SELF?submit_cat=1&submit_subcat=1&cat_id=$cat_id also try echoing it instead to see if there is no error. Another thing is that exploder has a stupid habit of thinking of anything starting with & to be a html entity even without trailing semicomma (but not sure if this happens to the headers too), and &sub; just happens to be one.

    Nilaab wrote:

    >Ok, I have a problem with the header() redirect function, below is the >part-code/part-pseudocode information. The file that this code is >encapsulated in is a single file named add_item.php. There is no output >before the header() function. Now this is a weird one, but I did some >testing and here is what happens: > >If there are no rows returned, redirect browser to the same page with some >needed get variables. The problem is with the submit_cat=1 get variable >attached to the URL-to-be-redirected. When I take this out of the get >string, the script redirects the user just fine when the value of >$num_rows=0. I still need that variable to be sent so when I place the >submit_cat=1 variable back into the get string it takes you to the default >Apache error page entitled, "Internal Server Error". Why is this submit_cat >variable causing me so much trouble? > ><?php > >if (this) { > . > . > . >} elseif (something) { > . > . > . >} elseif (something_else) { > > if ($num_rows == 0) { > header("Location: >$PHP_SELF?submit_cat=1&submit_subcat=1&cat_id=$cat_id"); > exit; > } elseif ($num_rows != 0) { > $row = $db->fetch_results($query); > . > . > . > } >} > >?> > >- Nilaab > > > >

    attached mail follows:


    yes, there is this fgetcsv function

    Greg wrote:

    >Hi-\ >Is there an easy way in PHP to parse a comma delimited text file that could >be uploaded in a form? Thanks! >-Greg > > > > >

    attached mail follows:


    Hi all, I have a very long charachter chain which is like that :

    Number*link*name*Number*link*name*Number*link*name*Number*link*name*

    I made a php script to cut it thanks to the "*" to make a list with a number, and the name hyperlinked to the link. The thing is that after i get a data (number, link or name), i use str_replace to cut it off the chain to get the next one. But as my numbers are sometime the same, i have troubles because it cuts all the same numbers off. Can i just cut one ? Thanks a lot for reading me and maybe answer me ? :-)

    attached mail follows:


    You could try something like this:

    $verylongstring $data = ... // your cut function $verylongstring = substr($verylongstring, strln($data);

    regards,

    Ewout de Boer

    ----- Original Message ----- From: "Hacook" <hacookfree.fr> To: <php-generallists.php.net> Sent: Friday, November 15, 2002 11:39 AM Subject: [PHP] Need difficult help !

    > Hi all, > I have a very long charachter chain which is like that : > > Number*link*name*Number*link*name*Number*link*name*Number*link*name* > > I made a php script to cut it thanks to the "*" to make a list with a > number, and the name hyperlinked to the link. > The thing is that after i get a data (number, link or name), i use > str_replace to cut it off the chain to get the next one. > But as my numbers are sometime the same, i have troubles because it cuts all > the same numbers off. > Can i just cut one ? > Thanks a lot for reading me and maybe answer me ? :-) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    On Friday 15 November 2002 18:39, Hacook wrote: > Hi all, > I have a very long charachter chain which is like that : > > Number*link*name*Number*link*name*Number*link*name*Number*link*name* > > I made a php script to cut it thanks to the "*" to make a list with a > number, and the name hyperlinked to the link. > The thing is that after i get a data (number, link or name), i use > str_replace to cut it off the chain to get the next one. > But as my numbers are sometime the same, i have troubles because it cuts > all the same numbers off. > Can i just cut one ? > Thanks a lot for reading me and maybe answer me ? :-)

    One way to do this: (Untested, use with extreme caution) ----------------------------------------------------------- $pieces = explode('*', $long_character_chain);

    while (!empty($pieces)) { $number = array_shift($pieces); $link = array_shift($pieces); $name = array_shift($pieces); // do whatever you need to make your link } -----------------------------------------------------------

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* Most people have two reasons for doing anything -- a good reason, and the real reason. */

    attached mail follows:


    Or you could use hash instead of string to store data.

    Hashes work basicly like arrays but you can use string as key/index value and assosiate it with another string.

    And if you like to give that hash ie. as parameter to a another php-script, one could use:

    $param = serialise($myHash);

    ...

    $hash = unserialise($param);

    .. you got the idea ? :)

    On Fri, 15 Nov 2002, Ewout de Boer wrote:

    > You could try something like this: > > > $verylongstring > $data = ... // your cut function > $verylongstring = substr($verylongstring, strln($data); > > > > regards, > > Ewout de Boer > > ----- Original Message ----- > From: "Hacook" <hacookfree.fr> > To: <php-generallists.php.net> > Sent: Friday, November 15, 2002 11:39 AM > Subject: [PHP] Need difficult help ! > > > > Hi all, > > I have a very long charachter chain which is like that : > > > > Number*link*name*Number*link*name*Number*link*name*Number*link*name* > > > > I made a php script to cut it thanks to the "*" to make a list with a > > number, and the name hyperlinked to the link. > > The thing is that after i get a data (number, link or name), i use > > str_replace to cut it off the chain to get the next one. > > But as my numbers are sometime the same, i have troubles because it cuts > all > > the same numbers off. > > Can i just cut one ? > > Thanks a lot for reading me and maybe answer me ? :-) > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > >

    -- 
    Lauri Jakku [ lauridotjakkuatwapicedotcom ]     \-^-/  .- Idiots try to maintain
    Tel : +358 40 823 6353 / +358 6  321 6159      ( o o )    order, We can control
    Addr: Ahventie 22-24 N 150/1, 62500 Vaasa   _o00o___o00o_ chaos. { nospam.org }
    http://www.wapice.com/~lauri/gnupg.key.asc
    

    attached mail follows:


    Thanks for all but i found a way to do it ! Regards

    > > Or you could use hash instead of string to store data. > > Hashes work basicly like arrays but you can use string as key/index value > and assosiate it with another string. > > And if you like to give that hash ie. as parameter to a another > php-script, one could use: > > $param = serialise($myHash); > > ... > > $hash = unserialise($param); > > .. you got the idea ? :) > > > On Fri, 15 Nov 2002, Ewout de Boer wrote: > > > You could try something like this: > > > > > > $verylongstring > > $data = ... // your cut function > > $verylongstring = substr($verylongstring, strln($data); > > > > > > > > regards, > > > > Ewout de Boer > > > > ----- Original Message ----- > > From: "Hacook" <hacookfree.fr> > > To: <php-generallists.php.net> > > Sent: Friday, November 15, 2002 11:39 AM > > Subject: [PHP] Need difficult help ! > > > > > > > Hi all, > > > I have a very long charachter chain which is like that : > > > > > > Number*link*name*Number*link*name*Number*link*name*Number*link*name* > > > > > > I made a php script to cut it thanks to the "*" to make a list with a > > > number, and the name hyperlinked to the link. > > > The thing is that after i get a data (number, link or name), i use > > > str_replace to cut it off the chain to get the next one. > > > But as my numbers are sometime the same, i have troubles because it cuts > > all > > > the same numbers off. > > > Can i just cut one ? > > > Thanks a lot for reading me and maybe answer me ? :-) > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > -- > Lauri Jakku [ lauridotjakkuatwapicedotcom ] \-^-/ .- Idiots try to maintain > Tel : +358 40 823 6353 / +358 6 321 6159 ( o o ) order, We can control > Addr: Ahventie 22-24 N 150/1, 62500 Vaasa _o00o___o00o_ chaos. { nospam.org } > http://www.wapice.com/~lauri/gnupg.key.asc >

    attached mail follows:


    Oops !

    My mistake.. it's strlen()

    substr = substring .. see http://www.php.net/substr

    regards,

    Ewout de Boer

    On Fri, Nov 15, 2002 at 12:03:34PM +0100, Tristan Carron wrote: > The strln() function is unknown... > To understand the script, could you please tell me what the substr() > function does ? > Thanks a lot, > Hacook > > ----- Original Message ----- > From: "Ewout de Boer" <ewoutchemistry-interactive.nl> > To: "Hacook" <hacookfree.fr> > Cc: "PHP General" <php-generallists.php.net> > Sent: Friday, November 15, 2002 11:59 AM > Subject: Re: [PHP] Need difficult help ! > > > > You could try something like this: > > > > > > $verylongstring > > $data = ... // your cut function > > $verylongstring = substr($verylongstring, strln($data); > > > > > > > > regards, > > > > Ewout de Boer > > > > ----- Original Message ----- > > From: "Hacook" <hacookfree.fr> > > To: <php-generallists.php.net> > > Sent: Friday, November 15, 2002 11:39 AM > > Subject: [PHP] Need difficult help ! > > > > > > > Hi all, > > > I have a very long charachter chain which is like that : > > > > > > Number*link*name*Number*link*name*Number*link*name*Number*link*name* > > > > > > I made a php script to cut it thanks to the "*" to make a list with a > > > number, and the name hyperlinked to the link. > > > The thing is that after i get a data (number, link or name), i use > > > str_replace to cut it off the chain to get the next one. > > > But as my numbers are sometime the same, i have troubles because it cuts > > all > > > the same numbers off. > > > Can i just cut one ? > > > Thanks a lot for reading me and maybe answer me ? :-) > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > >

    attached mail follows:


    Hello,

    On 11/14/2002 02:17 PM, Tom Woody wrote: > http://sourceforge.net/projects/php-doc-xls-gen/

    This project doesn't seem to do anything.

    -- 
    

    Regards, Manuel Lemos

    attached mail follows:


    So take php sources and remove php functions you won't use ;-)

    Maximilian Eberl wrote:

    >no, it's the normal LAMP stuff. > >I already have the webserver, just need to get the PHP engine melted down. > >Max > > >

    attached mail follows:


    Hi all,

    I need to set the KEEPALIVE value for a socket ... and just want to be certain of what I'm seeing.

    When I make my initial connection - the default value for the keepalive seems to be 0 ... does this mean that no TCP keepalives will be sent on the socket? Or am I doing something wrong?

    Thanks for your help,

    Michael.

    This message has been checked for all known viruses by the MessageLabs Virus Control Centre.

    *********************************************************************

    Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.

    Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY

    *********************************************************************

    attached mail follows:


    Hi,

    I'm trying to validate a Canadian postal code. I've already written a function; code as follows:

    if(!eregi('(^[a-z][0-9][a-z][0-9][a-z][0-9]$)',$form["authpstcode"])) { $errors[] = 'You must input a valid Canadian postal code (A9A9A9) postal code if he/she resides in Canada'; $continue = false; }

    The above works OK if the user enters --> M2M6N6

    But fails if the user enters ---> M2M 6N6 (note the space between the two triplets)

    I want my function to validate either, i.e., allow a space between the two triplets but not enforce it.

    Any idea on how to modify my test?

    Thanks, Don

    attached mail follows:


    This is a RTFM situation!!!

    instead of just $form["autopstcode"] - use str_replace(" ","",$form["autopstcode"])

    (e.g. strip the spaces before validating the triplets)

    found in 30 seconds by typing "string" on PHP site.

    -----Original Message----- From: DonPro [mailto:donprolclcan.com] Sent: 15 November 2002 14:45 To: php list Subject: [PHP] Validating postal codes

    Hi,

    I'm trying to validate a Canadian postal code. I've already written a function; code as follows:

    if(!eregi('(^[a-z][0-9][a-z][0-9][a-z][0-9]$)',$form["authpstcode"])) { $errors[] = 'You must input a valid Canadian postal code (A9A9A9) postal code if he/she resides in Canada'; $continue = false; }

    The above works OK if the user enters --> M2M6N6

    But fails if the user enters ---> M2M 6N6 (note the space between the two triplets)

    I want my function to validate either, i.e., allow a space between the two triplets but not enforce it.

    Any idea on how to modify my test?

    Thanks, Don

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Control Centre.

    This message has been checked for all known viruses by the MessageLabs Virus Control Centre.

    *********************************************************************

    Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.

    Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY

    *********************************************************************

    attached mail follows:


    This might work:

    if(!eregi('(^[a-z][0-9][a-z] ?[0-9][a-z][0-9]$)',$form["authpstcode"])) { $errors[] = 'You must input a valid Canadian postal code (A9A9A9) postal code if he/she resides in Canada'; $continue = false; }

    Marco

    -- 
    ------------
    php|architect - The magazine for PHP Professionals
    The monthly worldwide magazine dedicated to PHP programmers
    

    Come visit us at http://www.phparch.com!

    On Fri, 2002-11-15 at 09:44, DonPro wrote: > Hi, > > I'm trying to validate a Canadian postal code. I've already written a > function; code as follows: > > if(!eregi('(^[a-z][0-9][a-z][0-9][a-z][0-9]$)',$form["authpstcode"])) { > $errors[] = 'You must input a valid Canadian postal code (A9A9A9) postal > code if he/she resides in Canada'; > $continue = false; > } > > The above works OK if the user enters --> M2M6N6 > > But fails if the user enters ---> M2M 6N6 (note the space between the two > triplets) > > I want my function to validate either, i.e., allow a space between the two > triplets but not enforce it. > > Any idea on how to modify my test? > > Thanks, > Don > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Either you may remove spaces: $form["authpstcode"]=str_replace(' ','',$form["authpstcode"]) and then compare or change your expresion to '(^\s*[a-z]\s*[0-9]\s*[a-z]\s*[0-9]\s*[a-z]\s*[0-9]\s*$)' The first is better as you may put it into database column that is just char(6)

    DonPro wrote:

    >Hi, > >I'm trying to validate a Canadian postal code. I've already written a >function; code as follows: > >if(!eregi('(^[a-z][0-9][a-z][0-9][a-z][0-9]$)',$form["authpstcode"])) { > $errors[] = 'You must input a valid Canadian postal code (A9A9A9) postal >code if he/she resides in Canada'; > $continue = false; >} > >The above works OK if the user enters --> M2M6N6 > >But fails if the user enters ---> M2M 6N6 (note the space between the two >triplets) > >I want my function to validate either, i.e., allow a space between the two >triplets but not enforce it. > >Any idea on how to modify my test? > >Thanks, >Don > > > > >

    attached mail follows:


    Below is a snip of my script. Can't get it to use $test as a color variable!! Can anyone help?? I have tried everything i can think of (bar just using a color value instead of variable).

    The context is :: for formatting an XML doc.

    $test='#FFFFFF';

    echo "<td width=\"33%\" bgcolor=\"".$test."\">";

    Any help much appreciated, Adam.

    attached mail follows:


    Do you mean it doesn't output the right html (which it should if you pasted it right, look at the html source) or the browser doesn't display it (bgcolor in <td> is **deprecated, what doctype are you using?)

    Adam wrote:

    >Below is a snip of my script. Can't get it to use $test as a color >variable!! >Can anyone help?? I have tried everything i can think of (bar just using a >color value instead of variable). > >The context is :: for formatting an XML doc. > >$test='#FFFFFF'; > >echo "<td width=\"33%\" bgcolor=\"".$test."\">"; > >Any help much appreciated, >Adam. > > > >

    attached mail follows:


    Re: below, i put in

    global $test;

    > Thanks for the advice... I am new to PHP, but have done a lot of C in the > past so some things are familiar. > > Anyway, I tried your suggestion but no joy... color does not show, as if i > had written bgcolor="". > > Any ideas??? > > Cheers, > Adam. > > ----- Original Message ----- > From: "Marco Tabini" <marcottabini.ca> > To: "Adam" <adamruntime-records.com> > Sent: Friday, November 15, 2002 2:47 PM > Subject: Re: [PHP] #color problems > > > > Since you're not substituting anything in your string, you can use > > single quotes and make it a bit more readable: > > > > $test='#FFFFFF'; > > > > echo '<td width="33%" bgcolor="' . $test . '">'; > > > > > > is $test defined in the same context as your echo statement (e.g. is the > > echo in a function and $test outside of it)? In that case, you need to > > add $test to your function's context by means of global $test; > > > > Marco > > -- > > ------------ > > php|architect - The magazine for PHP Professionals > > The monthly worldwide magazine dedicated to PHP programmers > > > > Come visit us at http://www.phparch.com! > > > > > > On Fri, 2002-11-15 at 10:13, Adam wrote: > > > Below is a snip of my script. Can't get it to use $test as a color > > > variable!! > > > Can anyone help?? I have tried everything i can think of (bar just using > a > > > color value instead of variable). > > > > > > The context is :: for formatting an XML doc. > > > > > > $test='#FFFFFF'; > > > > > > echo "<td width=\"33%\" bgcolor=\"".$test."\">"; > > > > > > Any help much appreciated, > > > Adam. > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > >

    attached mail follows:


    Does your color code show in the HTML source code? If so, then it's an HTML problem!

    Marco

    On Fri, 2002-11-15 at 10:46, Adam wrote: > > Re: below, i put in > > global $test; > > > > Thanks for the advice... I am new to PHP, but have done a lot of C in the > > past so some things are familiar. > > > > Anyway, I tried your suggestion but no joy... color does not show, as if i > > had written bgcolor="". > > > > Any ideas??? > > > > Cheers, > > Adam. > > > > ----- Original Message ----- > > From: "Marco Tabini" <marcottabini.ca> > > To: "Adam" <adamruntime-records.com> > > Sent: Friday, November 15, 2002 2:47 PM > > Subject: Re: [PHP] #color problems > > > > > > > Since you're not substituting anything in your string, you can use > > > single quotes and make it a bit more readable: > > > > > > $test='#FFFFFF'; > > > > > > echo '<td width="33%" bgcolor="' . $test . '">'; > > > > > > > > > is $test defined in the same context as your echo statement (e.g. is the > > > echo in a function and $test outside of it)? In that case, you need to > > > add $test to your function's context by means of global $test; > > > > > > Marco > > > -- > > > ------------ > > > php|architect - The magazine for PHP Professionals > > > The monthly worldwide magazine dedicated to PHP programmers > > > > > > Come visit us at http://www.phparch.com! > > > > > > > > > On Fri, 2002-11-15 at 10:13, Adam wrote: > > > > Below is a snip of my script. Can't get it to use $test as a color > > > > variable!! > > > > Can anyone help?? I have tried everything i can think of (bar just > using > > a > > > > color value instead of variable). > > > > > > > > The context is :: for formatting an XML doc. > > > > > > > > $test='#FFFFFF'; > > > > > > > > echo "<td width=\"33%\" bgcolor=\"".$test."\">"; > > > > > > > > Any help much appreciated, > > > > Adam. > > > > > > > > > > > > -- > > > > PHP General Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    OK, color code is not present in HTML output. Very strange! "echo $test;" produces hte correct output though.

    Adam.

    ----- Original Message ----- From: "Marco Tabini" <marcottabini.ca> To: "Adam" <adamruntime-records.com> Cc: ""PHP"" <php-generallists.php.net> Sent: Friday, November 15, 2002 3:14 PM Subject: Re: Fw: [PHP] #color problems

    > Does your color code show in the HTML source code? If so, then it's an > HTML problem! > > Marco > > > On Fri, 2002-11-15 at 10:46, Adam wrote: > > > > Re: below, i put in > > > > global $test; > > > > > > > Thanks for the advice... I am new to PHP, but have done a lot of C in the > > > past so some things are familiar. > > > > > > Anyway, I tried your suggestion but no joy... color does not show, as if i > > > had written bgcolor="". > > > > > > Any ideas??? > > > > > > Cheers, > > > Adam. > > > > > > ----- Original Message ----- > > > From: "Marco Tabini" <marcottabini.ca> > > > To: "Adam" <adamruntime-records.com> > > > Sent: Friday, November 15, 2002 2:47 PM > > > Subject: Re: [PHP] #color problems > > > > > > > > > > Since you're not substituting anything in your string, you can use > > > > single quotes and make it a bit more readable: > > > > > > > > $test='#FFFFFF'; > > > > > > > > echo '<td width="33%" bgcolor="' . $test . '">'; > > > > > > > > > > > > is $test defined in the same context as your echo statement (e.g. is the > > > > echo in a function and $test outside of it)? In that case, you need to > > > > add $test to your function's context by means of global $test; > > > > > > > > Marco > > > > -- > > > > ------------ > > > > php|architect - The magazine for PHP Professionals > > > > The monthly worldwide magazine dedicated to PHP programmers > > > > > > > > Come visit us at http://www.phparch.com! > > > > > > > > > > > > On Fri, 2002-11-15 at 10:13, Adam wrote: > > > > > Below is a snip of my script. Can't get it to use $test as a color > > > > > variable!! > > > > > Can anyone help?? I have tried everything i can think of (bar just > > using > > > a > > > > > color value instead of variable). > > > > > > > > > > The context is :: for formatting an XML doc. > > > > > > > > > > $test='#FFFFFF'; > > > > > > > > > > echo "<td width=\"33%\" bgcolor=\"".$test."\">"; > > > > > > > > > > Any help much appreciated, > > > > > Adam. > > > > > > > > > > > > > > > -- > > > > > PHP General Mailing List (http://www.php.net/) > > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

    attached mail follows:


    I you did put echo $test; right before echo '<td width="33%" bgcolor="' . $test . '">'; COPY&PASTE your code (don't write it from memory!) and show us

    Adam wrote:

    >OK, color code is not present in HTML output. Very strange! >"echo $test;" produces hte correct output though. > >Adam. > >----- Original Message ----- >From: "Marco Tabini" <marcottabini.ca> >To: "Adam" <adamruntime-records.com> >Cc: ""PHP"" <php-generallists.php.net> >Sent: Friday, November 15, 2002 3:14 PM >Subject: Re: Fw: [PHP] #color problems > > > > >>Does your color code show in the HTML source code? If so, then it's an >>HTML problem! >> >>Marco >> >> >>On Fri, 2002-11-15 at 10:46, Adam wrote: >> >> >>>Re: below, i put in >>> >>>global $test; >>> >>> >>> >>> >>>>Thanks for the advice... I am new to PHP, but have done a lot of C in >>>> >>>> >the > > >>>>past so some things are familiar. >>>> >>>>Anyway, I tried your suggestion but no joy... color does not show, as >>>> >>>> >if i > > >>>>had written bgcolor="". >>>> >>>>Any ideas??? >>>> >>>>Cheers, >>>>Adam. >>>> >>>>----- Original Message ----- >>>>From: "Marco Tabini" <marcottabini.ca> >>>>To: "Adam" <adamruntime-records.com> >>>>Sent: Friday, November 15, 2002 2:47 PM >>>>Subject: Re: [PHP] #color problems >>>> >>>> >>>> >>>> >>>>>Since you're not substituting anything in your string, you can use >>>>>single quotes and make it a bit more readable: >>>>> >>>>>$test='#FFFFFF'; >>>>> >>>>>echo '<td width="33%" bgcolor="' . $test . '">'; >>>>> >>>>> >>>>>is $test defined in the same context as your echo statement (e.g. is >>>>> >>>>> >the > > >>>>>echo in a function and $test outside of it)? In that case, you need >>>>> >>>>> >to > > >>>>>add $test to your function's context by means of global $test; >>>>> >>>>>Marco >>>>>-- >>>>>------------ >>>>>php|architect - The magazine for PHP Professionals >>>>>The monthly worldwide magazine dedicated to PHP programmers >>>>> >>>>>Come visit us at http://www.phparch.com! >>>>> >>>>> >>>>>On Fri, 2002-11-15 at 10:13, Adam wrote: >>>>> >>>>> >>>>>>Below is a snip of my script. Can't get it to use $test as a color >>>>>>variable!! >>>>>>Can anyone help?? I have tried everything i can think of (bar just >>>>>> >>>>>> >>>using >>> >>> >>>>a >>>> >>>> >>>>>>color value instead of variable). >>>>>> >>>>>>The context is :: for formatting an XML doc. >>>>>> >>>>>>$test='#FFFFFF'; >>>>>> >>>>>>echo "<td width=\"33%\" bgcolor=\"".$test."\">"; >>>>>> >>>>>>Any help much appreciated, >>>>>>Adam. >>>>>> >>>>>> >>>>>>-- >>>>>>PHP General Mailing List (http://www.php.net/) >>>>>>To unsubscribe, visit: http://www.php.net/unsub.php >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>-- >>>PHP General Mailing List (http://www.php.net/) >>>To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >>> >> >> > > > >

    attached mail follows:


    Hello,

    "Adam" <adamruntime-records.com> wrote:

    > OK, color code is not present in HTML output. Very strange!

    What do you exactly mean by "color code is not present in HTML output"?

    ...[snip]...

    Also,

    > > > > Anyway, I tried your suggestion but no joy... color does not show, as > > > > if i had written bgcolor="".

    What did you mean by "color does not show"? A white color will not show on a white background ;)

    - E

    ...[snip]...

    attached mail follows:


    I believe you can do this on a Windows box via COM with the right extensions/software installed. But can you do this on a *nix box? I need to take a native Word document and modify the contents (adding/removing text). If it can be done on a *nix box, could someone point me to where I can learn more?

    Chris

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    Suite au passage en PHP 4.2.3 ... je n'arrive plus a ne connecter a me bases informix .... quelqu'un a-t-il eu le meme probleme ? il me renvoir un code informix -930 - -- __________ / Matthieu Le Corre | Service Informatique | ____________________ | Inspection Academique de la Sarthe | 72000 LE MANS | ____________________________ | Tel : 02 43 61 58 91 | Mail : Matthieu.lecorreac-nantes.fr \____________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQE91RrriQG6YxCcev4RAnn5AKCP8he3s0cCEBjPBMkMqjkLWtGSXACeKCic L0g6xkZtso9/PJ+o8qUhmgU= =AScV -----END PGP SIGNATURE-----

    attached mail follows:


    -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

    arf sorry for that .... i'm also on a fr php list ;)

    in fact .... my problem is the following : i upgrade to PHP 4.2.3 and I can't connect to my informix DB anymore i got a -930 error code (from informix ) is there any one with the same pb ?

    Le Vendredi 15 Novembre 2002 16:03, Matthieu Le Corre a écrit : > Suite au passage en PHP 4.2.3 ... je n'arrive plus a ne connecter a me > bases informix .... > quelqu'un a-t-il eu le meme probleme ? > il me renvoir un code informix -930

    - -- __________ / Matthieu Le Corre | Service Informatique | ____________________ | Inspection Academique de la Sarthe | 72000 LE MANS | ____________________________ | Tel : 02 43 61 58 91 | Mail : Matthieu.lecorreac-nantes.fr \____________________________________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQE91Rv+iQG6YxCcev4RAryzAKCl0DPJ1Twy9kIwqNkapF61cYjqXACgkHhY xM2n/z7eXUzVb9h1MQs4+kw= =5mIM -----END PGP SIGNATURE-----

    attached mail follows:


    Hi all, I made a while loop and i'd like to know the comand to break it from inside. Here is my script :

    while ($michou<=$maxFiles){ /// My script //////// and ate the end : if ($michou>$michoumax) { break; } }

    But it doesnt work.... Can i put 2 conditions in the while() command ? if yes, what is the structure ? Thanks, hacook

    attached mail follows:


    At 16:22 15.11.2002, Hacook spoke out and said: --------------------[snip]-------------------- >Hi all, >I made a while loop and i'd like to know the comand to break it from inside. >Here is my script : > >while ($michou<=$maxFiles){ >/// My script //////// and ate the end : >if ($michou>$michoumax) { >break; >} >} > >But it doesnt work....

    If it doesn't work, $michou doesn't ever become > $michoumax. Check if you're either incrementing $michou, or decrementing $michoumax correctly.

    >Can i put 2 conditions in the while() command ? if yes, what is the >structure ?

    Yes you can:

    while (expr1 && expr2) {} will loop as long BOTH expressions are true

    while (expr1 || expr2) {} will loop as long ONE OF BOTH expressions is true

    You can of course put more than two expression in the while condition. If you're using "or", expression evaluation will stop when the first exression returns true. For "and", the evaluation will stop as soon as a n expression returns false.

    The fact that not all expressions are necessarily evaluated every time needs to be considered if the expressions have side effects.

    -- 
       >O Ernest E. Vogelsinger 
       (\) ICQ #13394035 
        ^ http://www.vogelsinger.at/
    

    attached mail follows:


    fre, 2002-11-15 kl. 16:22 skrev Hacook:

    > I made a while loop and i'd like to know the comand to break it from inside. > Here is my script : > > while ($michou<=$maxFiles){ > /// My script //////// and ate the end : > if ($michou>$michoumax) { > break; > } > } > > But it doesnt work.... > Can i put 2 conditions in the while() command ? if yes, what is the > structure ? > Thanks, > hacook

    'if/continue' instead of 'if/break'? I wondered what it was doing in alien code today, so I looked it up.

    Best,

    Tony

    -- 
    

    Tony Earnshaw

    Cricketers are strange people. They wake up in October, only to find that their wives had left them in May.

    e-post: tonnibilly.demon.nl www: http://www.billy.demon.nl

    attached mail follows:


    Hey all, I'm coming over from programming ASP in VBScript and I know that a wildcard there is '%' can anyone tell me what it is in PHP? Thanks.

    attached mail follows:


    Wildcard for what?

    Please be more specific ... do you mean database queries ... regular expressions ... what?

    Thanks.

    -----Original Message----- From: vernon [mailto:vernoncomp-wiz.com] Sent: 15 November 2002 15:32 To: php-generallists.php.net Subject: [PHP] php Wildcard???

    Hey all, I'm coming over from programming ASP in VBScript and I know that a wildcard there is '%' can anyone tell me what it is in PHP? Thanks.

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    _____________________________________________________________________ This message has been checked for all known viruses by the MessageLabs Virus Control Centre.

    This message has been checked for all known viruses by the MessageLabs Virus Control Centre.

    *********************************************************************

    Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company. If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.

    Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY

    *********************************************************************

    attached mail follows:


    You mean the opening tag ?

    For php use <?php {code here} ?>

    regards,

    Ewout de Boer

    ----- Original Message ----- From: "vernon" <vernoncomp-wiz.com> To: <php-generallists.php.net> Sent: Friday, November 15, 2002 4:32 PM Subject: [PHP] php Wildcard???

    > Hey all, I'm coming over from programming ASP in VBScript and I know that a > wildcard there is '%' can anyone tell me what it is in PHP? Thanks. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > >

    attached mail follows:


    Has anyone ever written a php function to take the longitude and latitude of two destinations and calculate the distance?

    I am working on one but the output is just a little off.

    Thanks, Eddie

    attached mail follows:


    Try this snippet... I can't vouch for its accuracy since I am not a mathematician:

    <? // Function takes latitude and longitude of two places as input // and prints the distance in miles and kms. function calculateDistance($lat1, $lon1, $lat2, $lon2) // Convert all the degrees to radians $lat1 = deg2rad($lat1); $lon1 = deg2rad($lon1); $lat2 = deg2rad($lat2); $lon2 = deg2rad($lon2);

    // Find the deltas $delta_lat = $lat2 - $lat1; $delta_lon = $lon2 - $lon1;

    // Find the Great Circle distance $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) * pow(sin($delta_lon / 2.0), 2);

    $EARTH_RADIUS = 3956;

    $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp)) * 1.6093);

    return $distance; } ?>

    --
    Aaron Gould
    agouldpartscanada.com
    Web Developer
    Parts Canada
    

    ----- Original Message ----- From: "Edward Peloke" <epelokeechoman.com> To: <php-generallists.php.net> Sent: Friday, November 15, 2002 11:20 AM Subject: [PHP] longitude/latitude function

    > Has anyone ever written a php function to take the longitude and latitude of > two destinations and calculate the distance? > > I am working on one but the output is just a little off. > > Thanks, > Eddie > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Thanks Aaron,

    If you don't mind me asking, where did you get it? It seems to give a better answer than my function.

    Thanks! Eddie

    -----Original Message----- From: Aaron Gould [mailto:webdevelpartscanada.com] Sent: Friday, November 15, 2002 11:04 AM To: Edward Peloke; php-generallists.php.net Subject: Re: [PHP] longitude/latitude function

    Try this snippet... I can't vouch for its accuracy since I am not a mathematician:

    <? // Function takes latitude and longitude of two places as input // and prints the distance in miles and kms. function calculateDistance($lat1, $lon1, $lat2, $lon2) // Convert all the degrees to radians $lat1 = deg2rad($lat1); $lon1 = deg2rad($lon1); $lat2 = deg2rad($lat2); $lon2 = deg2rad($lon2);

    // Find the deltas $delta_lat = $lat2 - $lat1; $delta_lon = $lon2 - $lon1;

    // Find the Great Circle distance $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) * pow(sin($delta_lon / 2.0), 2);

    $EARTH_RADIUS = 3956;

    $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp)) * 1.6093);

    return $distance; } ?>

    --
    Aaron Gould
    agouldpartscanada.com
    Web Developer
    Parts Canada
    

    ----- Original Message ----- From: "Edward Peloke" <epelokeechoman.com> To: <php-generallists.php.net> Sent: Friday, November 15, 2002 11:20 AM Subject: [PHP] longitude/latitude function

    > Has anyone ever written a php function to take the longitude and latitude of > two destinations and calculate the distance? > > I am working on one but the output is just a little off. > > Thanks, > Eddie > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    I got that from http://freshmeat.net/projects/zipdy/?topic_id=66. It's a program called Zipdy that does these calculations. There's also a similar function on the US government census site (can't remember where though), but I liked Zipdy's better.

    --
    Aaron Gould
    agouldpartscanada.com
    Web Developer
    Parts Canada
    

    ----- Original Message ----- From: "Edward Peloke" <epelokeechoman.com> To: <php-generallists.php.net> Sent: Friday, November 15, 2002 11:55 AM Subject: RE: [PHP] longitude/latitude function

    > Thanks Aaron, > > If you don't mind me asking, where did you get it? It seems to give a > better answer than my function. > > Thanks! > Eddie > > -----Original Message----- > From: Aaron Gould [mailto:webdevelpartscanada.com] > Sent: Friday, November 15, 2002 11:04 AM > To: Edward Peloke; php-generallists.php.net > Subject: Re: [PHP] longitude/latitude function > > > Try this snippet... I can't vouch for its accuracy since I am not a > mathematician: > > <? > // Function takes latitude and longitude of two places as input > // and prints the distance in miles and kms. > function calculateDistance($lat1, $lon1, $lat2, $lon2) > // Convert all the degrees to radians > $lat1 = deg2rad($lat1); > $lon1 = deg2rad($lon1); > $lat2 = deg2rad($lat2); > $lon2 = deg2rad($lon2); > > // Find the deltas > $delta_lat = $lat2 - $lat1; > $delta_lon = $lon2 - $lon1; > > // Find the Great Circle distance > $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) * > pow(sin($delta_lon / 2.0), 2); > > $EARTH_RADIUS = 3956; > > $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp)) * > 1.6093); > > return $distance; > } > ?> > > > -- > Aaron Gould > agouldpartscanada.com > Web Developer > Parts Canada > > > ----- Original Message ----- > From: "Edward Peloke" <epelokeechoman.com> > To: <php-generallists.php.net> > Sent: Friday, November 15, 2002 11:20 AM > Subject: [PHP] longitude/latitude function > > > > Has anyone ever written a php function to take the longitude and latitude > of > > two destinations and calculate the distance? > > > > I am working on one but the output is just a little off. > > > > Thanks, > > Eddie > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Thanks, Just curious because after looking online it seems there are several ways to do this...many giving a slightly different answer...for example, I went to mapquest and put in two cities and the mileage was 1500, the function returned 1700. Also, the function says it prints in miles and kms but it only seems to print one of them...do you know which one? I guess I should look at the freshmeat site before I bother you with any other questions.

    Thanks again!!! Eddie

    -----Original Message----- From: Aaron Gould [mailto:webdevelpartscanada.com] Sent: Friday, November 15, 2002 11:50 AM To: Edward Peloke; php-generallists.php.net Subject: Re: [PHP] longitude/latitude function

    I got that from http://freshmeat.net/projects/zipdy/?topic_id=66. It's a program called Zipdy that does these calculations. There's also a similar function on the US government census site (can't remember where though), but I liked Zipdy's better.

    --
    Aaron Gould
    agouldpartscanada.com
    Web Developer
    Parts Canada
    

    ----- Original Message ----- From: "Edward Peloke" <epelokeechoman.com> To: <php-generallists.php.net> Sent: Friday, November 15, 2002 11:55 AM Subject: RE: [PHP] longitude/latitude function

    > Thanks Aaron, > > If you don't mind me asking, where did you get it? It seems to give a > better answer than my function. > > Thanks! > Eddie > > -----Original Message----- > From: Aaron Gould [mailto:webdevelpartscanada.com] > Sent: Friday, November 15, 2002 11:04 AM > To: Edward Peloke; php-generallists.php.net > Subject: Re: [PHP] longitude/latitude function > > > Try this snippet... I can't vouch for its accuracy since I am not a > mathematician: > > <? > // Function takes latitude and longitude of two places as input > // and prints the distance in miles and kms. > function calculateDistance($lat1, $lon1, $lat2, $lon2) > // Convert all the degrees to radians > $lat1 = deg2rad($lat1); > $lon1 = deg2rad($lon1); > $lat2 = deg2rad($lat2); > $lon2 = deg2rad($lon2); > > // Find the deltas > $delta_lat = $lat2 - $lat1; > $delta_lon = $lon2 - $lon1; > > // Find the Great Circle distance > $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) * > pow(sin($delta_lon / 2.0), 2); > > $EARTH_RADIUS = 3956; > > $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp)) * > 1.6093); > > return $distance; > } > ?> > > > -- > Aaron Gould > agouldpartscanada.com > Web Developer > Parts Canada > > > ----- Original Message ----- > From: "Edward Peloke" <epelokeechoman.com> > To: <php-generallists.php.net> > Sent: Friday, November 15, 2002 11:20 AM > Subject: [PHP] longitude/latitude function > > > > Has anyone ever written a php function to take the longitude and latitude > of > > two destinations and calculate the distance? > > > > I am working on one but the output is just a little off. > > > > Thanks, > > Eddie > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    attached mail follows:


    Edward:

    We use a dealer locator. I would suggest one thing if you have a lot of data, hits, namely to pre-calculate the lat/long in radians and store radians in the database. This would speed up the script.

    _justin

    Edward Peloke wrote: > > Thanks Aaron, > > If you don't mind me asking, where did you get it? It seems to give a > better answer than my function. > > Thanks! > Eddie > > -----Original Message----- > From: Aaron Gould [mailto:webdevelpartscanada.com] > Sent: Friday, November 15, 2002 11:04 AM > To: Edward Peloke; php-generallists.php.net > Subject: Re: [PHP] longitude/latitude function > > Try this snippet... I can't vouch for its accuracy since I am not a > mathematician: > > <? > // Function takes latitude and longitude of two places as input > // and prints the distance in miles and kms. > function calculateDistance($lat1, $lon1, $lat2, $lon2) > // Convert all the degrees to radians > $lat1 = deg2rad($lat1); > $lon1 = deg2rad($lon1); > $lat2 = deg2rad($lat2); > $lon2 = deg2rad($lon2); > > // Find the deltas > $delta_lat = $lat2 - $lat1; > $delta_lon = $lon2 - $lon1; > > // Find the Great Circle distance > $temp = pow(sin($delta_lat / 2.0), 2) + cos($lat1) * cos($lat2) * > pow(sin($delta_lon / 2.0), 2); > > $EARTH_RADIUS = 3956; > > $distance = ($EARTH_RADIUS * 2 * atan2(sqrt($temp), sqrt(1 - $temp)) * > 1.6093); > > return $distance; > } > ?> > > -- > Aaron Gould > agouldpartscanada.com > Web Developer > Parts Canada > > ----- Original Message ----- > From: "Edward Peloke" <epelokeechoman.com> > To: <php-generallists.php.net> > Sent: Friday, November 15, 2002 11:20 AM > Subject: [PHP] longitude/latitude function > > > Has anyone ever written a php function to take the longitude and latitude > of > > two destinations and calculate the distance? > > > > I am working on one but the output is just a little off. > > > > Thanks, > > Eddie > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

    -- 
    Justin Farnsworth
    Eye Integrated Communications
    321 South Evans - Suite 203
    Greenville, NC 27858 | Tel: (252) 353-0722
    

    attached mail follows:


    I am quite unhappy with my current web host provider (www.infinitehost.com <http://www.infinitehost.com/> ) and would like to hear some recommendations of some good companies that host PHP/MySQL and also JSP. I'm more than happy to shell out a few extra bucks to get some good service. Currently I pay $25/month for 100MB of space. Infinitehost is a just a mom-and-pop hosting company. They'll take up for 4-5 days to respond to one e-mail, my site is down frequently and they haven't lived up to their "guarantees." I'm sick and tired of it. Thanks so much for your recommendations!!

    attached mail follows:


    Hi Phil,

    > would like to hear some recommendations of some > good companies that host PHP/MySQL and also JSP.

    http://34sp.com/ are great if you don't mind .uk-based hosting. I've heard good things about http://oneandone.co.uk/ but haven't used them myself.

    At the other end of the scale, you should stay *well* away from http://zenithtech.com/ - they're without a doubt the worst host I've ever used.

    Cheers Jon

    attached mail follows:


    http://www.ht-tech.net is who I use, VERY GOOD! Just tell them I sent you.

    Eddie

    -----Original Message----- From: Jon Haworth [mailto:jhaworthwitanjardine.co.uk] Sent: Friday, November 15, 2002 11:49 AM To: 'Phil Schwarzmann'; php-generallists.php.net Subject: RE: [PHP] I'm in need of a PHP web host recommendation

    Hi Phil,

    > would like to hear some recommendations of some > good companies that host PHP/MySQL and also JSP.

    http://34sp.com/ are great if you don't mind .uk-based hosting. I've heard good things about http://oneandone.co.uk/ but haven't used them myself.

    At the other end of the scale, you should stay *well* away from http://zenithtech.com/ - they're without a doubt the worst host I've ever used.

    Cheers Jon

    -- 
    PHP General Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php
    

    attached mail follows:


    > Why do you need 1.5?

    Isn't that the one with GIF support on it?

    __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com

    attached mail follows:


    Look around a bit. All versions of GD can be found with gif support.

    On Fri, 15 Nov 2002, Mako Shark wrote:

    > > Why do you need 1.5? > > Isn't that the one with GIF support on it? > > __________________________________________________ > Do you Yahoo!? > Yahoo! Web Hosting - Let the expert host your site > http://webhosting.yahoo.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

    attached mail follows:


    Hello,

    "Rasmus Lerdorf" <rasmusphp.net> wrote: > Look around a bit. All versions of GD can be found with gif support. >

    ...but here

    http://www.boutell.com/gd/

    it says: "GD does not create GIF images"

    Or am I missing something? :)

    - E

    attached mail follows:


    On Saturday 16 November 2002 00:54, copperwallshotmail.com wrote: > Hello, > > "Rasmus Lerdorf" <rasmusphp.net> wrote: > > Look around a bit. All versions of GD can be found with gif support. > > ...but here > > http://www.boutell.com/gd/ > > it says: > "GD does not create GIF images" > > Or am I missing something? :)

    Look around!

    google > "gd library with gif support"

    -- 
    Jason Wong -> Gremlins Associates -> www.gremlins.biz
    Open Source Software Systems Integrators
    * Web Design & Hosting * Internet & Intranet Applications Development *
    

    /* You have a strong appeal for members of the opposite sex. */

    attached mail follows:


    Hello,

    "Jason Wong" <php-generalgremlins.biz> wrote:

    > On Saturday 16 November 2002 00:54, copperwallshotmail.com wrote: > > Hello, > > > > "Rasmus Lerdorf" <rasmusphp.net> wrote: > > > Look around a bit. All versions of GD can be found with gif support. > > > > ...but here > > > > http://www.boutell.com/gd/ > > > > it says: > > "GD does not create GIF images" > > > > Or am I missing something? :) > > Look around! > > google > "gd library with gif support" >

    Well, I just wanted to say that not *all* support it--esp. , I think, by the original authors :)

    Didn't they remove it from version 1.6? That's why the original poster was looking for v1.5? (Maybe he's concerned about copyright, etc.)

    - E

    PS BTW, of course someone can argue about what the word "support" implies. You can just add a "patch" and it'll "support" it but that wasn't my point, at least...

    attached mail follows:


    I have a real problem that I can't seem to figure out. I need an ereg pattern to search for a certain string (below). All this is being shelled to a Unix grep command because I'm looking this up in very many files.

    I've made myself a <INPUT TYPE="HIDDEN" tag> that contains in the value attribute a list of comma-delimited numbers. I need to find if a certain number is in these tags (and each file contains one tag). I need an ereg statement that will let me search these lines to see if a number exists, obviously in the beginning or the end or the middle or if it's the only number in the list. Here's what I mean (searching for number 1):

    <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "1,2,3,4,5"> //beginning

    <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "0,1,2,3,4,5"> //middle

    <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "5,4,3,2,1"> //end

    <INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "1"> //only

    This is frustrating me, because each solution I come up with doesn't work. Here is my grep/ereg statement so far:

    $commanumberbeginning = "[[0-9]+,]*"; //this allows 0 or more numbers before it, and if there are any, they must have 1 or more digits followed by a comma

    $commanumberend = "[,[0-9]+]*"; // this allows 0 or more numbers after it, and if there are any, they must have a comma followed by 1 or more digits

    $ereg-statement=$commanumberbeginning . $numbertosearchfor . $commanumberbeginning; //$numbertosearchfor will be obtained through a select control in a form

    grep '<INPUT TYPE = "HIDDEN" NAME = "numbers" VALUE = "$ereg-statement">' *.html

    This problem is kicking my butt. Any help?

    __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com