Re: [PHP] http referrer

2004-04-08 Thread Matthew Vos
$HTTP_REFERER Although not all browsers send it properly (if at all). Don't rely on it. Matt On Thu, 2004-04-08 at 12:22, Chris Bruce wrote: > I apologize for my ignorance, but I am trying to find a way to grab the > referring url. I can't seem to find the environment variable to do > this. Do

Re: [PHP] php + lynx + grep

2004-04-08 Thread Matthew Vos
Why not try cURL? Not the cURL functions included in PHP, but the actual binary installed with most linux distributions. Even better would be to actually use the cURL functions in PHP, but whatever you find easier. Matt On Tue, 2004-04-06 at 08:41, Brian L. Ollom wrote: > lynx --source http://wea

Re: [PHP] Multiple Socket Read and Writes?

2004-02-26 Thread Matthew Vos
Wednesday, February 25, 2004, 2:19:26 AM, you wrote: > > D> Hello all, > > D> I am having a problem with getting multiple socket reads working in a > D> simple socket server! > D> The writes appear to be working but the reads seam to only allow one read? > > D> I know i am missing something. Co

Re: [PHP] multi dimension array sort help

2004-02-05 Thread Matthew Vos
Assuming your array is called $array1: $paths = array(); foreach ($array1 as $data_ptr => $data) {     if (!in_array($data['path'],$paths) $paths[] = $data; } sort($paths) foreach($paths as $path_to_check) {     foreach($array1 as $data_ptr => $data)     {     if ($data['path'] == $path_to

Re: [PHP] Unsetting multiple globals?

2004-01-27 Thread Matthew Vos
2 ways to do it: Simple, no control: foreach($GLOBALS as $key => $value) unset($GLOBALS[$key]); Or $vars_to_clear = array("1","2","3","4","a","b","C1","D2"); foreach($vars_to_clear as $keyname) unset($GLOBALS[$keyname]); Matt On Tue, 2004-01-27 at 15:26, BOOT wrote: Hello. I can unset mult

Re: [PHP] Re: Opening large file problem - fopen

2003-12-16 Thread Matthew Vos
Do you have long lines? If not try this: $file = "error_log.txt"; if (($fp = fopen($file,'r+') !== 0) { // Increment the 1024 sufficiently to read enough data, fgets automatically stops at \n while ($line = fgets($fp,1024)) { if ($line != "") echo($line.""); } } Alternatively,

Re: [PHP] Mulitple selects from form drop down box

2003-11-21 Thread Matthew Vos
On Thu, 2003-11-20 at 17:12, CPT John W. Holmes wrote: > > > Now $_POST['D1'] will be an array of all the items that were chosen. > > ---John Holmes... > > ps: wouldn't it be easier to select multiple items if you had a size larger > than "1"?? The 'size=1' in a select doesn't mean there is o

Re: [PHP] Multiple Forms

2003-09-10 Thread Matthew Vos
Process Forms Matt On Tue, 2003-09-09 at 20:11, Dan Anderson wrote: > Is it possible to tell a browser to send form a to URL a and form b to > URL b? > > (i.e. post to two different URLS) > > Thanks, > > -Dan signature.asc Description: This is a digitally signed message part

Re: [PHP] Escaping nasty quotes

2003-07-31 Thread Matthew Vos
On Thu, 2003-07-31 at 14:31, Roy W wrote: > I have this: > > $query = "LOAD DATA LOCAL INFILE '/home/data.txt' INTO TABLE mytable FIELDS > TERMINATED BY ',' ENCLOSED BY '" . '"' . "' "; > $result = MYSQL_QUERY($query); > PRINT "$query2"; > > The query doesn't take ... but if I cut and paste the

Re: [PHP] how to :: multi select

2003-07-04 Thread Matthew Vos
Hi Thomas. You need to name each checkbox a different name. alternatively, you can name them with array naming convention. i.e. 1-1 1-2 2-1 2-2 Checking off 1-1 and 2-2 would create the following variables (assuming register_globals is on) in the target php script for the form: $array1=array