php-general Digest 22 Jan 2001 18:14:42 -0000 Issue 470

Topics (messages 35961 through 36043):

Newsletter Software needed urgently...
        35961 by: Maxim Maletsky

Re: solutions to disadvantages when register_globals is off
        35962 by: mwaples.waples.net

GD => ImagePNG: No transparency
        35963 by: Niklas Saers
        35964 by: Rasmus Lerdorf

serve local file but remote url
        35965 by: Eric Dahnke
        36023 by: Ignacio Vazquez-Abrams

Convert DBF tu MySQL
        35966 by: Roman
        36014 by: Robert

convert ASP to be PHP
        35967 by: Jacky.lilst
        35969 by: Maxim Maletsky
        36005 by: Michael Kimsal

mailTo
        35968 by: Jacky.lilst

How to escape '$' in scripts?
        35970 by: Joseph Stein
        35971 by: Soeren Staun-Pedersen

mysql question?
        35972 by: Fai

Re: Profanity Filter
        35973 by: Tim Ward
        36018 by: Ignacio Vazquez-Abrams

Zip file
        35974 by: Wade Halsey

How to attach files with mail
        35975 by: Usman Ghani
        35976 by: tarique.sanisoft.com
        35978 by: mick
        35984 by: Nicolas Windpassinger - Sun
        35986 by: Ernest E Vogelsinger

Not hitting the htaccess  if already verified
        35977 by: Alan

Re: XML Processing Instruction ( was " <? PHP vs. <?" )
        35979 by: Teodor Cimpoesu

how to escape <? and ?>
        35980 by: Hrishi
        35981 by: jeremy brand

Re: is it possible to communicate javascript and php?
        35982 by: Max A. Derkachev

url hide
        35983 by: AJDIN BRANDIC
        35985 by: bard
        35987 by: Jørg V. Bryne
        35988 by: AJDIN BRANDIC
        35990 by: Matt Williams
        35992 by: Eric Dahnke
        35993 by: Sebastian Stadtlich
        35998 by: AJDIN BRANDIC
        36000 by: Teodor Cimpoesu
        36017 by: Pete Lavetsky
        36033 by: Chris Carbaugh

Authenication with windows NT
        35989 by: Johan Andersson

How to count time in php
        35991 by: Dezider Góra

RTF to HTML converter
        35994 by: Andy Woolley

Does PHP works with Netscape Web Server or IPlanet???
        35995 by: "Aguilar Peña, Javier"
        35996 by: "Aguilar Peña, Javier"
        36030 by: Steve Edberg

DBase functions
        35997 by: Piotr Duszynski
        35999 by: Brian Clark

Search Engines and PHP
        36001 by: Jamie
        36004 by: Sander Pilon

404 handler
        36002 by: Dieter Kneffel

oops, little problem with mysql
        36003 by: Dominick Vansevenant
        36009 by: Kath
        36013 by: Brian Clark

Re: below10host.com as webhost?
        36006 by: John Guynn

PHP conventions or classes
        36007 by: Paulson, Joseph V. \"Jay\"
        36037 by: Rasmus Lerdorf

Re: mysql_fetch_array strangeness
        36008 by: Kristi Russell

null or NULL
        36010 by: Carsten Gehling
        36015 by: Sterling Hughes

Need key() equivalent for string variable
        36011 by: CC Zona

XML dillema
        36012 by: Teodor Cimpoesu

Help!!!  MY ODBC!!!!
        36016 by: Bruno Freire

Local Path of Script
        36019 by: Karl J. Stubsjoen
        36020 by: Brian Clark
        36024 by: Nathan Cook

Newbie: array help....
        36021 by: Brian V Bonini
        36022 by: Ignacio Vazquez-Abrams
        36026 by: Brian V Bonini
        36027 by: Brian Clark
        36031 by: Ignacio Vazquez-Abrams
        36042 by: Brian V Bonini

Re: file storage/downloader...
        36025 by: Ignacio Vazquez-Abrams

selected = true
        36028 by: Jason Jacobs

Re: Another Guru's Help Needed...
        36029 by: Edin Kadribasic

<- functions returning multiple values: ->
        36032 by: Abe Asghar
        36038 by: Ignacio Vazquez-Abrams
        36039 by: Matt McClanahan
        36040 by: Abe Asghar

Announcement: Smarty template engine 1.0b released
        36034 by: Monte Ohrt

Apache and $HTTP_SERVER_VARS[]
        36035 by: Todd Cary

Re: Web hosting for PHP/MySQl development
        36036 by: Edin Kadribasic

HELP! REVOKE COMMAND!!!!
        36041 by: Bruno Freire

Re: Netscape caching problem
        36043 by: Larry Jaques

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


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


Hello guys,
 
I am sure many of you have it on your websites:
 
 Newsletter
 
yup, that is, a newsletter software written in PHP.
 
Does anyone have/know/wrote a good one?
 
Basic features needed are:
 
 PHP/mySQL - written
 multiple lists
 import/export subscribers
 Name/Company support (in other words have custom messages such as "Dear
%name%" etc )
 reliability
 
I've tried several scripts claiming to do that already, by they all or
haven't had enough necessary files in distributions or weren't "free" enough
or just didn't want to work unless you mess with the code ending up
rewriting it all.
 
I need it VERY urgently. my boss is hacking my *ss...
Please help me with this one...
 
Thanks in advance,

Maxim Maletsky - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109

http://www.j-door.com <http://www.j-door.com/> 
http://www.japaninc.net <http://www.japaninc.net/> 
http://www.lincmedia.co.jp <http://www.lincmedia.co.jp/> 


 




Dale Robinson wrote:
> 
> Everyone seems to recommend turning off register_globals, but accessing them
> through $HTTP_POST_VARS["var_name"], gets tedious.
> 
> I haven't found a better solution (not to say there isn't one) than this
> small snippet.
> 
> The idea is to turn off "register_globals", as I believe is heavily
> recommended by the PHP team, and declare what variables you are expecting on
> a per script basis.
> Magic-quotes would also be off. Hopefully this makes all external variables
> safe.
> 
> I was hoping some experienced users would cast their eye over this and
> suggest any improvements, and comment if it is worth doing at all
> 
> define("ALLOWABLE_HTML_TAGS", "<B><H1>");
> 
> function use_ext_var($var_name, $var_location)
> {
>     global $$var_name, $$var_location;
> 
>     $$var_name = ${$var_location}[$var_name];
>     $$var_name = stripslashes($$var_name);
>     $$var_name = strip_tags($$var_name, ALLOWABLE_HTML_TAGS);
> 
> }
> 
> use_ext_var("sample_var", "HTTP_GET_VARS");
> print $sample_var;
> 
> How are other people handling this, or are most of you 'lazy' and just use
> globals :)
> 
> Regards
> 
> D Robinson

I was lazy but I've found turning globals off makes code easier to read
- If you've got HTTP_GET_VARS , HTTP_POST_VARS and session vars all in
one script - knowing where the variables are coming from makes it is
easier after coming back to your code months later, or when reading
someone elses code.




Hi. I'm afraid I have to say that the transparency in PHP with GD doesn't
seem to work. Let me give you an example. The included file, midblob.png, has
a transparent area where the color is #bcbcad. Take a look at the
following code:

if(!isset($text)) $text="Remember to define \$text";
$font = 5;
$size = GetImageSize("midblob.png"); // 0=x, 1=y
$buffer= Array(5,(($size[1]-ImageFontHeight($font))/2)-3);
$width=(ImageFontWidth($font)*strlen($text))+($buffer[0]*2)-1;
$if = ImageCreateFromPNG ("midblob.png"); /* Attempt to open */
$im=ImageCreate($width,$size[1]);
$resize = ImageCopyResized($im,$if,0,0,0,0,$width,$size[1],$size[0],$size[1]);
$colal = ImageColorAllocate($im,0xbc,0xbc,0xad);
$trans = ImageColorTransparent($im,$colal);
$tc  = ImageColorAllocate ($im, 255, 255, 255);
ImageString ($im, $font, $buffer[0], $buffer[1], $text,$tc);
header ("Content-type: image/png");
ImagePng ($im);

Now, the line $colal = ...  and $trans = ... shouldn't be necessary because
it already has a transparent region. However, ImagePng doesn't seem to output
this transparently, but rather as #cccc99. Putting in these two lines doesn't
help either. Now, this is really strange. PNG has transparency, and the loaded
image does. Why doesn't ImagePng output the transparancy right?

Cheers


 Niklas Saers






How many colours in your image?  Don't forget that GD can only handle
8-bit colour.

-Rasmus

On Mon, 22 Jan 2001, Niklas Saers wrote:

> Hi. I'm afraid I have to say that the transparency in PHP with GD doesn't
> seem to work. Let me give you an example. The included file, midblob.png, has
> a transparent area where the color is #bcbcad. Take a look at the
> following code:
>
> if(!isset($text)) $text="Remember to define \$text";
> $font = 5;
> $size = GetImageSize("midblob.png"); // 0=x, 1=y
> $buffer= Array(5,(($size[1]-ImageFontHeight($font))/2)-3);
> $width=(ImageFontWidth($font)*strlen($text))+($buffer[0]*2)-1;
> $if = ImageCreateFromPNG ("midblob.png"); /* Attempt to open */
> $im=ImageCreate($width,$size[1]);
> $resize = ImageCopyResized($im,$if,0,0,0,0,$width,$size[1],$size[0],$size[1]);
> $colal = ImageColorAllocate($im,0xbc,0xbc,0xad);
> $trans = ImageColorTransparent($im,$colal);
> $tc  = ImageColorAllocate ($im, 255, 255, 255);
> ImageString ($im, $font, $buffer[0], $buffer[1], $text,$tc);
> header ("Content-type: image/png");
> ImagePng ($im);
>
> Now, the line $colal = ...  and $trans = ... shouldn't be necessary because
> it already has a transparent region. However, ImagePng doesn't seem to output
> this transparently, but rather as #cccc99. Putting in these two lines doesn't
> help either. Now, this is really strange. PNG has transparency, and the loaded
> image does. Why doesn't ImagePng output the transparancy right?
>
> Cheers
>
>
>  Niklas Saers
>
>
>
>





hi,

this is off toopic, but don't know where to turn. would appreciate some 
help.

during an http request, is it possible serve a local html file yet 
return to the browser a different remote url (say yahoo.com for example)?

i'm looking at mod_rewrite, but it what i describe above doesn't seem 
possible. is it?

thx - eric





On Mon, 22 Jan 2001, Eric Dahnke wrote:

> hi,
>
> this is off toopic, but don't know where to turn. would appreciate some
> help.
>
> during an http request, is it possible serve a local html file yet
> return to the browser a different remote url (say yahoo.com for example)?
>
> i'm looking at mod_rewrite, but it what i describe above doesn't seem
> possible. is it?
>
> thx - eric
>

Have you looked at the [P] flag? It allows Apache to act as a proxy for
external pages.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





Hello !!


        Please, help me someone. How to convert dbf file from FOXPRO(for DOS) to
MySQL database if it's posible, or if not how to connect this dbf file form
php script and apply sql command for
used data from this file...

                        Thanx

                                Roman






I used DBF2MySQL from http://www.nica.ru/~ae/software/
It works, but truncated the field names to 10 characters (
Specific_Part_Number became Specific_P )

----- Original Message -----
From: "Roman" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 1:43 AM
Subject: [PHP] Convert DBF tu MySQL


> Hello !!
>
>
> Please, help me someone. How to convert dbf file from FOXPRO(for DOS) to
> MySQL database if it's posible, or if not how to connect this dbf file
form
> php script and apply sql command for
> used data from this file...
>
> Thanx
>
> Roman
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Hi people,
I have one ASP site that need to be converted to be PHP3 ( on Linux OS). Is there any 
proper way to do this? The database detail is that the ASP site is using SQL7.0.  And 
the database server that is avaliable on my Linux server is MySql.
Any thoughts?  
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




I have the same problem right this days:

I found out (in my case at lest) that it is much less time-consuming to
recreate the functionality rather then rewriting the whole code.

See the archives of the last month, we, here, all talked about it.

Also, for your reference, try asp2php.org there's a tool that can do that.

Cheers!
Maxim Maletsky

-----Original Message-----
From: Jacky@lilst [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 5:55 AM
To: [EMAIL PROTECTED]
Subject: [PHP] convert ASP to be PHP


Hi people,
I have one ASP site that need to be converted to be PHP3 ( on Linux OS). Is
there any proper way to do this? The database detail is that the ASP site is
using SQL7.0.  And the database server that is avaliable on my Linux server
is MySql.
Any thoughts?  
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"




Many thoughts...

If there's anything advanced going on in the SQL7 code, you'll have a rough time 
moving to mysql.  There are just things Mysql doesn't have which sql7 does.

Try using a bridge to continue using the sql7 machine from linux, and plan a more 
gradual port to another db platform later.

Why are you moving to PHP3?  There's so much more available in PHP4.  Though 3 ain't 
going away tomorrow, I can't think of any compelling reason to start a new project in 
2001 in 3.

Am I missing something?



"Jacky@lilst" wrote:

> Hi people,
> I have one ASP site that need to be converted to be PHP3 ( on Linux OS). Is there 
>any proper way to do this? The database detail is that the ASP site is using SQL7.0.  
>And the database server that is avaliable on my Linux server is MySql.
> Any thoughts?
> Jack
> [EMAIL PROTECTED]
> "There is nothing more rewarding than reaching the goal you set for yourself"





I am wrting a php page that will write out an email message to the email address 
retrieved from Db. If i want to have CC function togethere with mailTo, how could I do 
that?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




I have a dilemma.

I have recently started using CVS to maintain my website, and am using
some CVS tags ($Id$, etc) and they show up as follows:


<!--
 Author: : joes $
 Revision date: : 2001/01/10 21:10:10 $
 ID: : index.php,v 1.3 2001/01/10 21:10:10 joes Exp $
 Log Entry:

: index.php,v $
-->

those spare ':' should look like this:

 Author: $Author: joes $
 Revision date: $Date: 2001/01/10 21:10:10 $
 ID: $Id: index.php,v 1.3 2001/01/10 21:10:10 joes Exp $
 Log Entry:

$Log: index.php,v $

Any ideas how to get those tags escaped?

TIA,

joe






\$ 

Soeren Staun-Pedersen - [EMAIL PROTECTED]
------
"The internet is full, beat it"
    - Me.






mysql use myisamchk and myisamchk --recover to check and repair the table.
However, does anybody know how myisamchk indicates that whether the table is
damaged or
whether the the repair is successful  when running myisamchk or
myisamchk --recover command?






I know someone who had her site rejected for registration with a major
search engine because it included info about Tae Kwon Do in Scunthorpe ...
you can only go so far with word checking

        Tim Ward
        Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


> -----Original Message-----
> From: Nik Gare [mailto:[EMAIL PROTECTED]]
> Sent: 20 January 2001 13:07
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Profanity Filter
> 
> 
> In article <94adfp$5le$[EMAIL PROTECTED]>,
>    Stephan Ahonen <[EMAIL PROTECTED]> wrote:
> > I'd make it an array:
> 
> > $filter = array(moron, idiot, pratt);
> 
> > foreach($filter as $badword) {
> >  if (strstr($name, $badword)) {
> >   do this if it contains one of the bad words
> >  }
> >  else {
> >   do this if it doesn't
> >  }
> > }
> 
> But wouldn't this approach have its drawbacks, too?
> For example, I live in Kiel, Germany, about 20km from a town called
> Wankendorf.  Presumably I wouldnÄt be able to say this.
> 
> Nik
> 
> 




On Sat, 20 Jan 2001 [EMAIL PROTECTED] wrote:

> Ok,
>
> I am now using the following code to check if there is any profanity in the
> $FirstName however it just doesn`t work when testing, I am thinking it has
> something to do with the way I`m loading the file, any better ways.
>
> $words=file('words.txt');
> $done=false;
> while ((list($key, $val)=each($words)) and $done==false)
> {
>   $done=strpos(strtolower($FirstName), $val);
> };
> if (!$done==false)
> {
>   echo "Oops! Bad name";
> }
> else
> {
>   echo"Okay, valid name.";
> };
>

It may have to do with the fact that you're using == in the while instead of
=== to also include type checking. If you're using PHP 3 you should say
!strlen($done), otherwise the while clause will be true if the profane word
starts at the beginning of the string (position 0).

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





Hi 

Does anyone know how to create a .zip file using php?
Thanks in advance!

Wade 




Hello

I am a new user of PHP. I hope that you guys would welcome me to this community. I am 
stuck on a problem that how to attach files with mail, when you are using mail( ) of 
PHP.
If attachment is not possible using mail( ) then kindly let me know if there is any 
other function to send mails, in PHP which can serve this purpose.

Waiting for reply.
regards

Usman




On Mon, 22 Jan 2001, Usman Ghani wrote:
Hello Usman, 
Welcome to the list.

To send message with attachment you have to construct a multipart mime
encoded message - there are several classes to do this 

Search the list archieves for a URL - I have forgotten it

Tarique

P.S. A hint search the list archieves before asking 90% times the answer
is there ;-) 


> Hello
> 
> I am a new user of PHP. I hope that you guys would welcome me to this community. I 
>am stuck on a problem that how to attach files with mail, when you are using mail( ) 
>of PHP.
> If attachment is not possible using mail( ) then kindly let me know if there is any 
>other function to send mails, in PHP which can serve this purpose.
> 
> Waiting for reply.
> regards
> 
> Usman
> 

-- 
=========================================
       B2B Application Providers
        http://www.sanisoft.com
 Vortal for Nagpur http://nagpurcity.net
=========================================





G'day Usman:

I just happened to have this handy ... the attachment is a mime mail class
by Schumann/Ratschiller that I know works. Requires only minor changes if
any. Good luck.

Michael Hall

On Mon, 22 Jan 2001, Usman Ghani wrote:

> Hello
> 
> I am a new user of PHP. I hope that you guys would welcome me to this community. I 
>am stuck on a problem that how to attach files with mail, when you are using mail( ) 
>of PHP.
> If attachment is not possible using mail( ) then kindly let me know if there is any 
>other function to send mails, in PHP which can serve this purpose.
> 
> Waiting for reply.
> regards
> 
> Usman
> 
   <?
   /*
    *  Class mime_mail
    *  Original implementation by Sascha Schumann <[EMAIL PROTECTED]>
    *  Modified by Tobias Ratschiller <[EMAIL PROTECTED]>:
    *      - General code clean-up
    *      - separate body- and from-property
    *      - killed some mostly un-necessary stuff
    */
   
   class mime_mail
    {
    var $parts;
    var $to;
    var $from;
    var $headers;
    var $subject;
    var $body;
     /*
     *     void mime_mail()
     *     class constructor
     */
    function mime_mail()
     {
     $this->parts = array();
     $this->to =  "";
     $this->from =  "";
     $this->subject =  "";
     $this->body =  "";
     $this->headers =  "";
     }
     /*
     *     void add_attachment(string message, [string name], [string cty
   pe])
     *     Add an attachment to the mail object
     */
    function add_attachment($message, $name =  "", $ctype =
   "application/octet-stream")
     {
     $this->parts[] = array (
                              "ctype" => $ctype,
                              "message" => $message,
                              "encode" => $encode,
                              "name" => $name
                             );
     }
   /*
    *      void build_message(array part=
    *      Build message parts of an multipart mail
    */
   function build_message($part)
    {
    $message = $part[ "message"];
    $message = chunk_split(base64_encode($message));
    $encoding =  "base64";
    return  "Content-Type: ".$part[ "ctype"].
                           ($part[ "name"]? "; name = \"".$part[ "name"].
   "\"" :  "").
   
   "\nContent-Transfer-Encoding: $encoding\n\n$message\n";
    }
   /*
    *      void build_multipart()
    *      Build a multipart mail
    */
   function build_multipart()
    {
    $boundary =  "b".md5(uniqid(time()));
    $multipart =
   "Content-Type: multipart/mixed; boundary = $boundary\n\nThis is a MIME
    encoded message.\n\n--$boundary";
    for($i = sizeof($this->parts)-1; $i >= 0; $i--)
       {
       $multipart .=  "\n".$this->build_message($this->parts[$i]).
   "--$boundary";
       }
    return $multipart.=  "--\n";
    }
   /*
    *      void send()
    *      Send the mail (last class-function to be called)
    */
   function send()
    {
    $mime =  "";
    if (!empty($this->from))
       $mime .=  "From: ".$this->from. "\n";
    if (!empty($this->headers))
       $mime .= $this->headers. "\n";
   
    if (!empty($this->body))
       $this->add_attachment($this->body,  "",  "text/plain");
    $mime .=  "MIME-Version: 1.0\n".$this->build_multipart();
    mail($this->to, $this->subject,  "", $mime);
    }
   };  // end of class
   /*
    * Example usage
    *
   
    $attachment = fread(fopen("test.jpg", "r"), filesize("test.jpg"));
    $mail = new mime_mail();
    $mail->from = "[EMAIL PROTECTED]";
    $mail->headers = "Errors-To: [EMAIL PROTECTED]";
    $mail->to = "[EMAIL PROTECTED]";
    $mail->subject = "Testing...";
    $mail->body = "This is just a test.";
    $mail->add_attachment("$attachment", "test.jpg", "image/jpeg");
    $mail->send();
   
    */
   ?>






HI all,

1. mime_mail
--------------
it is true that this class is just great, here is what i have done with
it:

                                $mail=new mime_mail;
                                $content_type="application/octet-stream";
                                                
                                        if ($file1){
                                l64     $fd=fopen($file1,"r");
                                l65     $data1=fread($fd,filesize($file1));
                                        fclose($fd);}
                                        
                                        $mail->from ="Me;
                                        $mail->to  ="$email";
                                        $mail->subject="[Me] Request ok";
                                        $mail->body ="$msg";
                                        
                                        if 
($file1){$mail->add_attachment($data1,$file1,$content_type);}
                                        $mail->send();
                                

2.BUT 
------
be carefull I have BIG problems with it
It gave me these errors:

                Warning: fopen("/home/tilly/tmp/falcon.txt","r") - No such file or
directory in                                            
/space/server/apache_1.3.12/htdocs/php/Manpagetool/eng1.php on line 64

                Warning: Supplied argument is not a valid File-Handle 
                resource in
/space/server/apache_1.3.12/htdocs/php/Manpagetool/eng1.php on line 65

               

And the files do exist !!! I checked them !

So my question is: 
------------------
how can we open and read the files locally, and not have this error come
each time...


If anyone can help i would be very thankfull,
Nicolas.


mick wrote:
> 
> G'day Usman:
> 
> I just happened to have this handy ... the attachment is a mime mail class
> by Schumann/Ratschiller that I know works. Requires only minor changes if
> any. Good luck.
> 
> Michael Hall
> 
> On Mon, 22 Jan 2001, Usman Ghani wrote:
> 
> > Hello
> >
> > I am a new user of PHP. I hope that you guys would welcome me to this community. I 
>am stuck on a problem that how to attach files with mail, when you are using mail( ) 
>of PHP.
> > If attachment is not possible using mail( ) then kindly let me know if there is 
>any other function to send mails, in PHP which can serve this purpose.
> >
> > Waiting for reply.
> > regards
> >
> > Usman
> >
> 
>   ------------------------------------------------------------------------
>                       Name: mime.mail.class
>    mime.mail.class    Type: Plain Text (TEXT/PLAIN)
>                   Encoding: BASE64
> 
>   ------------------------------------------------------------------------
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




At 11:32 22.01.2001, Nicolas Windpassinger - Sun said:
--------------------[snip]--------------------
>And the files do exist !!! I checked them !
>
>So my question is: 
>------------------
>how can we open and read the files locally, and not have this error come
>each time...
--------------------[snip]-------------------- 

Have you checked the rights the PHP-User has on the directory and file?

     ...ebird

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





What i have is a htaccess file that calls an outside DB  and i want to know 
is there a way to tell the htaccess file not to hit the DB is 
$PHP_AUTH_USER is set..

Now we have about 50 pages and i don't want to edit them all.. I should 
mention that the reason it keeps making the db call is we have it set as an 
AuthExternal radiuslookup  this is what i need to stop after the 1st page

Thanks for any light on the subject

Alan







Brian White wrote:
> 
> At 10:50 AM 1/19/12 +0200, Teodor Cimpoesu wrote:
> 
> >I was refering to whole story of using `<?' in xml docs.
>
> Part of the problems is that multiple different applications
> can use PI's, so they need to be able to tell which ones are
> their's - therefore the first thing that should go in a PI
> is some kind of indication as to which application requires
> it.
> 
> Therefore: Always "<?php" is a much better idea than "<?"
> 
my follow-up was from an suggest of using <% though :)
it exists in C, ASP and JSP. We have it in PHP, why not use it?

besides moving a site arround into a configuration you cannot control
I see no other reason.

-- teodor




Hello all,

I'm working on a script that processes and returns a php script.
i need to know how to escape the <? and the  ?> in the string constants that
make up the script.

thanks,
Hrishi





$string = '<? ?>';

If you use single quotes, then you don't need to escape them.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Mon, 22 Jan 2001, Hrishi wrote:

> Date: Mon, 22 Jan 2001 16:00:53 +0530
> From: Hrishi <[EMAIL PROTECTED]>
> To: PHP General Discussion <[EMAIL PROTECTED]>
> Subject: [PHP] how to escape <? and ?>
> 
> Hello all,
> 
> I'm working on a script that processes and returns a php script.
> i need to know how to escape the <? and the  ?> in the string constants that
> make up the script.
> 
> thanks,
> Hrishi
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 





Hello Alex,

Sunday, January 21, 2001, 4:20:53 AM, you wrote:

AB> no without submitting information to the server with get or post.

AB> for example, if a bit of javascript you have comes up with some value, the
AB> only way you can get it to the server is to put it in a get and send the
AB> user to that url:

AB> http://www.mysite.com/index.php?your_js_var=your_value

You could also post WDDX packets generated by JS, if you intend to
operate with large and complex data. Sometimes it's much more
convenient. But, of course, using POST, cause PHP haven't learned mind
reading yet :)



-- 
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 






Perhaps not related to php but I was wandering, is it possible to hide 
site's real url and replace it with something else (some other URL).  ie. 
someone clicks on a link on www.blah.co.uk which takes the user to an 
designated area (ie. /house-search/) on www.foo.co.uk.  I want 
the user still to see www.blah.co.uk. This is just for aesthetic reasons 
since ones the user finishes the search for houses (on 
www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. 

I have tried www.javascripts.com but no success??

Thanks

Ajdin




If you're using apache, try mod_rewrite. I'm pretty sure you have to run something on 
the server side to do this. JavaScript runs client-side and will therefore be useless.

Cheers,

Brad

On Mon, 22 Jan 2001, AJDIN BRANDIC wrote:

> Perhaps not related to php but I was wandering, is it possible to hide 
> site's real url and replace it with something else (some other URL).  ie. 
> someone clicks on a link on www.blah.co.uk which takes the user to an 
> designated area (ie. /house-search/) on www.foo.co.uk.  I want 
> the user still to see www.blah.co.uk. This is just for aesthetic reasons 
> since ones the user finishes the search for houses (on 
> www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. 
> 
> I have tried www.javascripts.com but no success??
> 
> Thanks
> 
> Ajdin
> 
> 





I saw this done with a frameset recently. The domain blah.com had a frameset
which opened the real page (at www.hotel.com/blahblah ) in a frame.

-J
----- Original Message -----
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 11:30 AM
Subject: [PHP] url hide


> Perhaps not related to php but I was wandering, is it possible to hide
> site's real url and replace it with something else (some other URL).  ie.
> someone clicks on a link on www.blah.co.uk which takes the user to an
> designated area (ie. /house-search/) on www.foo.co.uk.  I want
> the user still to see www.blah.co.uk. This is just for aesthetic reasons
> since ones the user finishes the search for houses (on
> www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk.
>
> I have tried www.javascripts.com but no success??
>
> Thanks
>
> Ajdin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





OK, I don't have access to the server (except ftp).  All I can use is PHP 
or JavaScript.  I just thought that I could use some thing that will just 
hide it.  Like that NoRightClick javascript script where if you try to 
view the source code of a page it stops you but you can still use 
View/Source Code option on your main menu to view the code.

Thanks

Ajdin


On Mon, 22 Jan 2001, bard wrote:

> If you're using apache, try mod_rewrite. I'm pretty sure you have to run something 
>on the server side to do this. JavaScript runs client-side and will therefore be 
>useless.
> 
> Cheers,
> 
> Brad
> 
> On Mon, 22 Jan 2001, AJDIN BRANDIC wrote:
> 
> > Perhaps not related to php but I was wandering, is it possible to hide 
> > site's real url and replace it with something else (some other URL).  ie. 
> > someone clicks on a link on www.blah.co.uk which takes the user to an 
> > designated area (ie. /house-search/) on www.foo.co.uk.  I want 
> > the user still to see www.blah.co.uk. This is just for aesthetic reasons 
> > since ones the user finishes the search for houses (on 
> > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. 
> > 
> > I have tried www.javascripts.com but no success??
> > 
> > Thanks
> > 
> > Ajdin
> > 
> > 
> 
> 






<html>
<head>
</head>
<frameset rows="100%,*" border="0" framespacing="0" frameborder="0">
<frame src="http://www.foo.co.uk">
</frameset>
<noframes>
<body>
your browser does not support frames - click <a
href="http://www.oozoo.co.uk">here</a> to go to <a
href="http://www.blah.co.uk">http://www.blah.co.uk</a>
</body>
</noframes>
</html>


> -----Original Message-----
> From: Jørg V. Bryne [mailto:[EMAIL PROTECTED]]
> Sent: 22 January 2001 10:40
> To: AJDIN BRANDIC; [EMAIL PROTECTED]
> Subject: Re: [PHP] url hide
>
>
> I saw this done with a frameset recently. The domain blah.com had
> a frameset
> which opened the real page (at www.hotel.com/blahblah ) in a frame.
>
> -J
> ----- Original Message -----
> From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 22, 2001 11:30 AM
> Subject: [PHP] url hide
>
>
> > Perhaps not related to php but I was wandering, is it possible to hide
> > site's real url and replace it with something else (some other
> URL).  ie.
> > someone clicks on a link on www.blah.co.uk which takes the user to an
> > designated area (ie. /house-search/) on www.foo.co.uk.  I want
> > the user still to see www.blah.co.uk. This is just for aesthetic reasons
> > since ones the user finishes the search for houses (on
> > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk.
> >
> > I have tried www.javascripts.com but no success??
> >
> > Thanks
> >
> > Ajdin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






I just asked a similar question two hours ago, and would like to express 
my interest in this same question.

Sorry it for a no answer response.


AJDIN BRANDIC wrote:

> Perhaps not related to php but I was wandering, is it possible to hide 
> site's real url and replace it with something else (some other URL).  ie. 
> someone clicks on a link on www.blah.co.uk which takes the user to an 
> designated area (ie. /house-search/) on www.foo.co.uk.  I want 
> the user still to see www.blah.co.uk. This is just for aesthetic reasons 
> since ones the user finishes the search for houses (on 
> www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. 
> 
> I have tried www.javascripts.com but no success??
> 
> Thanks
> 
> Ajdin





you can do that by using a frames site that just has 1 frame(=the 'hidden'
url).
this is very weak , because the user just has to take a look at page
properties
to see the real URL.
another aproach would be to wrap all access to your server through apache
404 to
a php that opens the desired url with fopen and then parses the html for <a
href, etc
and fixes them to links to your desird address. i doubt that this is a good
idea
for a heavy-traffic site or in case you try to steal some content that the
admin
of the other server will not notice that there are a lot of requests from
your servers ip.

sebastian

> -----Ursprungliche Nachricht-----
> Von: Eric Dahnke [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 22. Januar 2001 12:24
> An: [EMAIL PROTECTED]
> Betreff: Re: [PHP] url hide
> 
> 
> 
> I just asked a similar question two hours ago, and would like 
> to express 
> my interest in this same question.
> 
> Sorry it for a no answer response.
> 
> 
> AJDIN BRANDIC wrote:
> 
> > Perhaps not related to php but I was wandering, is it 
> possible to hide 
> > site's real url and replace it with something else (some 
> other URL).  ie. 
> > someone clicks on a link on www.blah.co.uk which takes the 
> user to an 
> > designated area (ie. /house-search/) on www.foo.co.uk.  I want 
> > the user still to see www.blah.co.uk. This is just for 
> aesthetic reasons 
> > since ones the user finishes the search for houses (on 
> > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. 
> > 
> > I have tried www.javascripts.com but no success??
> > 
> > Thanks
> > 
> > Ajdin
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




On Mon, 22 Jan 2001, Sebastian Stadtlich wrote:

> you can do that by using a frames site that just has 1 frame(=the 'hidden'
> url).
> this is very weak , because the user just has to take a look at page
> properties
> to see the real URL.

This I do not mind since most users are not very knowledgable about internet.
The problem here is that web users will be comming from any site to my 
client's designated page.  Not all sites have frames.

> another aproach would be to wrap all access to your server through apache
> 404 to
> a php that opens the desired url with fopen and then parses the html for <a
> href, etc
> and fixes them to links to your desird address. i doubt that this is a good
> idea
> for a heavy-traffic site or in case you try to steal some content that the
> admin
> of the other server will not notice that there are a lot of requests from
> your servers ip.
> 

Not really, since they will be coming to my client's site with permission.  
I want others who are using features on my client's site to feel they are 
still on their site of origin (what ever that might be).

Thanks


Ajdin

> sebastian
> 
> > -----Ursprungliche Nachricht-----
> > Von: Eric Dahnke [mailto:[EMAIL PROTECTED]]
> > Gesendet: Montag, 22. Januar 2001 12:24
> > An: [EMAIL PROTECTED]
> > Betreff: Re: [PHP] url hide
> > 
> > 
> > 
> > I just asked a similar question two hours ago, and would like 
> > to express 
> > my interest in this same question.
> > 
> > Sorry it for a no answer response.
> > 
> > 
> > AJDIN BRANDIC wrote:
> > 
> > > Perhaps not related to php but I was wandering, is it 
> > possible to hide 
> > > site's real url and replace it with something else (some 
> > other URL).  ie. 
> > > someone clicks on a link on www.blah.co.uk which takes the 
> > user to an 
> > > designated area (ie. /house-search/) on www.foo.co.uk.  I want 
> > > the user still to see www.blah.co.uk. This is just for 
> > aesthetic reasons 
> > > since ones the user finishes the search for houses (on 
> > > www.foo.co.uk/house-search/) he/she will return to www.blah.co.uk. 
> > > 
> > > I have tried www.javascripts.com but no success??
> > > 
> > > Thanks
> > > 
> > > Ajdin
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 




Hi AJDIN!
On Mon, 22 Jan 2001, AJDIN BRANDIC wrote:

> OK, I don't have access to the server (except ftp).  All I can use is PHP 
> or JavaScript.  I just thought that I could use some thing that will just 
> hide it.  Like that NoRightClick javascript script where if you try to 
> view the source code of a page it stops you but you can still use 
> View/Source Code option on your main menu to view the code.
> 
have a look on how it is implemented on http://www.ravantivirus.com. [0 size
frame ]
Done it recently :)

-- teodor




There is a very interesting article on this over at the Register.  You can
hide the URL by converting the dot delimited IP address to hex and then back
to decimal.  The browser will still interpret it.  Therefore, yahoo.com can
be interpreted as:

http://3631443189

Go ahead try it, it's pretty cool.  I wrote a program which takes the URL,
gets the IP, and then converts it.  If anyone is interested in the code,
shoot me an email at [EMAIL PROTECTED]

-----Original Message-----
From: Teodor Cimpoesu [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] url hide


Hi AJDIN!
On Mon, 22 Jan 2001, AJDIN BRANDIC wrote:

> OK, I don't have access to the server (except ftp).  All I can use is PHP
> or JavaScript.  I just thought that I could use some thing that will just
> hide it.  Like that NoRightClick javascript script where if you try to
> view the source code of a page it stops you but you can still use
> View/Source Code option on your main menu to view the code.
>
have a look on how it is implemented on http://www.ravantivirus.com. [0 size
frame ]
Done it recently :)

-- teodor

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Put the url you want hidden in a frame.

Chris

On Mon, 22 Jan 2001, AJDIN BRANDIC wrote:
> Date: Mon, 22 Jan 2001 10:44:06 +0000 (GMT)
> To: [EMAIL PROTECTED]
> From: AJDIN BRANDIC <[EMAIL PROTECTED]>
> Subject: Re: [PHP] url hide
> 
> OK, I don't have access to the server (except ftp).  All I can use is
> PHP 
> or JavaScript.  I just thought that I could use some thing that will
> just 
> hide it.  Like that NoRightClick javascript script where if you try
> to 
> view the source code of a page it stops you but you can still use 
> View/Source Code option on your main menu to view the code.
> 
> Thanks
> 
> Ajdin
> 
> 
> On Mon, 22 Jan 2001, bard wrote:
> 
> > If you're using apache, try mod_rewrite. I'm pretty sure you have
> to run something on the server side to do this. JavaScript runs
> client-side and will therefore be useless.
> > 
> > Cheers,
> > 
> > Brad
> > 
> > On Mon, 22 Jan 2001, AJDIN BRANDIC wrote:
> > 
> > > Perhaps not related to php but I was wandering, is it possible to
> hide 
> > > site's real url and replace it with something else (some other
> URL).  ie. 
> > > someone clicks on a link on www.blah.co.uk which takes the user
> to an 
> > > designated area (ie. /house-search/) on www.foo.co.uk.  I want 
> > > the user still to see www.blah.co.uk. This is just for aesthetic
> reasons 
> > > since ones the user finishes the search for houses (on 
> > > www.foo.co.uk/house-search/) he/she will return to
> www.blah.co.uk. 
> > > 
> > > I have tried www.javascripts.com but no success??
> > > 
> > > Thanks
> > > 
> > > Ajdin
> > > 
> > > 
> > 
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 




Hi,

I wonder if someone have tried to authenticate with the NT user database with PHP and 
Apache?
I know it's very simple with IIS, but is it possible to do the same thing with Apache?



R,
Mr Johan Andersson
Consultant @ Qbranch.se




Hi,

can anybody help me how to count seconds, minutes and hours in php?
I want to sum values like 03:35,  02:31, 04:59, etc. and show the
results in minutes.

tia
    Dezider.





Greetings,

I'm looking for a script written in PHP that can convert an RTF string into
HTML.

Thanks in Advance

Andy Woolley
www.databasewatch.com





Does PHP works with Netscape Web Server or IPlanet???
If it does.....HOW????

[EMAIL PROTECTED]
Thanks




It's me again..... I've tried with IIS and PWS and everithing ok...but not
with Netscaspe which is the one I need.

Thanks again.

> -----Mensaje original-----
> De:   Aguilar Peña, Javier 
> Enviado el:   lunes 22 de enero de 2001 13:31
> Para: '[EMAIL PROTECTED]'
> Asunto:       [PHP] Does PHP works with Netscape Web Server or IPlanet???
> 
> Does PHP works with Netscape Web Server or IPlanet???
> If it does.....HOW????
> 
> [EMAIL PROTECTED]
> Thanks




At 1:36 PM +0100 1/22/01, Aguilar Peña, Javier wrote:
>It's me again..... I've tried with IIS and PWS and everithing ok...but not
>with Netscaspe which is the one I need.


I assume you're talking about Netscape on Windows? If so, yes it runs
fine, but only as a CGI - I used to have that setup until I moved to
an Apache/PHP module configuration. Off the top of my head, I had

        (1) set up Windows file associations to associate .php
extension with PHP.exe
        (2) created Shell CGI directories for all my php scripts

There was a better way that someone had come up with that avoided
step (1) by editing the mimetypes.conf (?) file and associating the
php extension with the php executable within Netscape, but I can't
remember that method offhand - it's been a while.

Also, if you're looking for Netscape on Unix information, there used
to be a website that explained how to compile PHP to run as a NSAPI
module; unfortunately, that URL disappeared. I could dig up that info
for you anyway, if you're interested.

Lastly, I believe that PHP4 comes with experimental NSAPI support;
check www.php.net or www.php4win.de

        - steve


>Thanks again.
>
>>  -----Mensaje original-----
>>  De: Aguilar Peña, Javier
>>  Enviado el: lunes 22 de enero de 2001 13:31
>>  Para:       '[EMAIL PROTECTED]'
>>  Asunto:     [PHP] Does PHP works with Netscape Web Server or IPlanet???
>>
>>  Does PHP works with Netscape Web Server or IPlanet???
>>  If it does.....HOW????
>>
>>  [EMAIL PROTECTED]
>>  Thanks

--
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+




I have a problem connecting to dbase database. I use:
dbase_open("filename.dbf",0) and get from PHP:
Fatal error: Call to unsupported or undefined function dbase_open() in ...

What's the problem?

-- 

                                                Piotr Duszynski
                                                
http://www.softomat.com.pl
http://filmomat.3miasto.pl 
http://www.3miasto.pl





Hello Piotr, 

(PD == "Piotr Duszynski") [EMAIL PROTECTED] writes:

PD> Fatal error: Call to unsupported or undefined function
PD> dbase_open() in ...

PD> What's the problem?

You'll probably need to re./configure PHP with the --enable-dbase
option.

-Brian






I was wondering if anyone can enlighten me about the ability of search
engines to read and list PHP pages.  I have been told that because PHP
produces a dynamic html page (i.e. one that possibly outputs different HTML
for each hit or request) that they are not easily added to search engines
(if this is true though what would be the point of having any html pages if
you can't update or change them at anytime?).  Another point was made to me
was that many PHP pages require additional commands to be passed through the
URL eg www.domain.com.au/writestufft.php?variable=foobar which search
engines find hard to deal with also.
If any of these are true or if there are such problems which could result in
the page not getting listed then what are the options.
My only idea has come from the [PHP]url hide thread in which a index.html
single 'wrapper frame' could be applied to the entire site.
Any Ideas

Jamie
Slightly confused and possibly mislead




>
> I was wondering if anyone can enlighten me about the ability of search
> engines to read and list PHP pages.  I have been told that because PHP
> produces a dynamic html page (i.e. one that possibly outputs
> different HTML
> for each hit or request) that they are not easily added to search engines
> (if this is true though what would be the point of having any
> html pages if
> you can't update or change them at anytime?).  Another point was
> made to me
> was that many PHP pages require additional commands to be passed
> through the
> URL eg www.domain.com.au/writestufft.php?variable=foobar which search
> engines find hard to deal with also.
> If any of these are true or if there are such problems which
> could result in
> the page not getting listed then what are the options.
> My only idea has come from the [PHP]url hide thread in which a index.html
> single 'wrapper frame' could be applied to the entire site.
> Any Ideas
>

Search-engines read HTML, what drives that HTML is entirely irrelevant.

... however, some searchengines do not index pages that have variables on
the url, so those pages will never be indexed by that particular
searchengine.

But other searchengines will spider about everything (I think google spiders
a lot, including dynamic pages) - but realize that the searchengine always
contains a snapshot of your page, most likely one taken weeks ago.

If you want to be totally searchengine-safe, do not use variables on the
url, do not rely on cookies and do not rely on POST variables for the pages
you want to have the searchengine spider.

Also, you could make a robots.txt file and instruct the searchengines to
spider only particular pages on your site.

-Sander





Currently I use customized pages for 404 error handling. 
Problem is, even if my HTML page is sent, the header still 
contains the '404 not found' 

How can I avoid an '404 not found' header to be sent? 
I want a normal page to show up without having sent 
the usuall 404 header. 

Thanks,

dk




Hello,

I deleted all the records from the privileges tables (mysql database) and
restarted the daemon.

Now off course I cannot access the databases, what can I do?

D.






Do you still have r00t access to the database?

- Kath

----- Original Message ----- 
From: "Dominick Vansevenant" <[EMAIL PROTECTED]>
To: "Php-General" <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 9:05 AM
Subject: [PHP] oops, little problem with mysql


> Hello,
> 
> I deleted all the records from the privileges tables (mysql database) and
> restarted the daemon.
> 
> Now off course I cannot access the databases, what can I do?
> 
> D.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






Hello Dominick, 

(DV == "Dominick Vansevenant") [EMAIL PROTECTED] writes:

DV> I deleted all the records from the privileges tables (mysql database) and
DV> restarted the daemon.

http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Resetting_permissions

DV> Now off course I cannot access the databases, what can I do?

-Brian






I have my domain hosted there and my wife has 2 domains there.  I
"webmaster" and develop for all 3 domains and below10host has been great.
The only time I've had less than 1 hour response times from their customer
service department was around the X-mas holidays.  I can only think of a
couple of outages in the year or so I've been with them and those outages
have been very short (an hour or less).

John Guynn

This email brought to you by RFCs 821 and 1225.


-----Original Message-----
From: Jeff Lacy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 18, 2001 1:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] below10host.com as webhost?


Hello everyone,

I was wondering if anyone had thought/opinions on below10host.com as a web
host?  I though phpwebhosting.com would be good, but then I read that some
people really hated it, so I just wanted to check to make sure this would be
okay and nobody had really trouble with it.




Hello everyone--
Does anyone know where I can find information about training classes for php
or conventions that are taking place?  I'd like to know so I can start
attending these functions.
Thanks,
Jay




> Does anyone know where I can find information about training classes for php
> or conventions that are taking place?  I'd like to know so I can start
> attending these functions.

We probably should have a page for this information.  Here are the
upcoming ones I am doing:

Linuxworld (www.linuxworldexpo.com)
New York, Javits Center
Tuesday Jan.30 9am-noon  Introduction to PHP
Tuesday Jan.30 1pm-4pm   Advanced PHP
Wednesday Jan.31 6pm-7:30pm  BOF

Open Source Developers' European Meeting (www.raphinou.com)
Brussels, Belgium
Sunday Feb.4 3:30pm-5:00pm  Technical talk
Sunday Feb.4 5:00pm-6:30pm  BOF

NordU 2001 (www.nordu.org/NordU2001)
Stockholm, Sweden
Tuesday, Feb.13  9am-5pm  PHP Tutorial
Thursday, Feb.15 5pm-7pm  BOF

After that I will be at the following:

March 4-6     Bangalore Bang!inux
April 4-6     ApacheCon Santa Clara
April 8-12    San Jose SD 2001 West
May 28-30     Porto Alegre (Brazil) http://www.softwarelivre.rs.gov.br/
July 23-26    San Diego - O'Reilly PHP Conference
Aug.12-16     Vancouver/Alaska  GeekCruises Script'Scape

There are many other people speaking at many other conferences, so find
the closest conference and check the program.  Chances are there is a PHP
talk.

-Rasmus





each() assigns four elements... (0 = index), (1 = value), (key = index), (value = 
value)

You are concerned with key and value.
So: list ($fieldname, $value) = each($row)

You may not be using $value but you still need to assign the data to a variable. Or 
list will only assign $fieldname the numerical
index and not the char index. At least that's from what I understand.  Anyone, please 
feel free to correct me.

Kristi


Beware of the false gods we sometimes
worship--money, power and fame--for they
are all fleeting, especially in death and often
in mortality.
                                                   -Anonymous

----- Original Message -----
From: "Jaxon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 21, 2001 8:07 PM
Subject: [PHP] mysql_fetch_array strangeness


> Hi,
>
> I'm trying to echo out the field names used as key values in a
> mysql_fetch_array:
>
> $link_id = mysql_connect("localhost", "root", $pass);
>
> mysql_select_db("database", $link_id);
>
> $result = mysql_query("select * from lists where id = 1", $link_id);
>
> $rowData = mysql_fetch_array($result);
>
> while (list($fieldName) = each($rowData))
> { echo "$fieldName,"; }
>
> I'm expecting to get this:
>
> id,listname,joinconfirm,leaveconfirm,homepage,author,canjoin,bannedemails,de
> scription,subject,masteremail,
>
> but instead getting this:
>
> 0,id,1,listname,2,joinconfirm,3,leaveconfirm,4,homepage,5,author,6,canjoin,7
> ,bannedemails,8,description,9,subject,10,masteremail,
>
> Why are the index numbers for the array showing up?  From the docs,
> mysql_fetch_array should create an array of field names to field values...?
> To make things worse, if I also echo the data:
>
> while (list($fieldName,  $fieldValue) = each($rowData))
> { echo "$fieldName,$fieldValue," ;}
>
> Then a value is echoed after both the index number and the field value, eg:
>
> 0,1,id,1,1,testlist,listname,testlist,  etc...
>
> What am I doing wrong?
>
> Regards,
> Jaxon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





I don't get it. Is there any difference between null and NULL in PHP?

Couldn't find any reference to either in the manual, only in the errata?

- Carsten
~~~~~~~~~~~~~~~~






Carsten Gehling wrote:
> 
> I don't get it. Is there any difference between null and NULL in PHP?
> 
> Couldn't find any reference to either in the manual, only in the errata?
> 

There is none.  Its case-insensitive afaik.

-Sterling




I'm trying to pass a string variable to a custom function, echoing its 
*value on one line, and its *name (that is, its key if this were an array 
instead of a string) on another line. I searched the manual's sections on 
variable functions and string functions, to no avail.  I tried key(), but 
it just produces a warning that $var is not an array.  Example:

build_select_menu($display,array("Y","N")); 

function build_select_menu($field,$options_array)
   {
   echo '<p><SELECT NAME="' . key($field) . '">' . "\n";  //need to echo 
name of string passed as first argument

   foreach($options_array as $option)
      {
      echo '<OPTION VALUE="Y"';
         if($field=="$option") {echo ' SELECTED';}
      echo ">$option</OPTION>\n";
      }
   echo  "</SELECT></p>\n";
   }

Thanks!

-- 
CC




Hey,
I've been playing w/ DOM functions (not very documented, but cool :)
and had the following:

[categories.xml]

<?xml version="1.0"?>
<catalog>
        <category id="db" name="Databases">
                <topic>
                  <name>MySQL</name>
                  <description>MySQL Manual</description>
                </topic>

                <topic>
                  <name>PostgreSQL</name>
                  <description>PostgreSQL Manuals</description>
                </topic>

        </category>
 </catalog>

[xmltest.php]
<?php
header ('Content-Type: text/plain');

$doc  = new DomDocument();
$node = new DomNode();

$doc  = xmldocfile ('categories.xml');
$root = $doc->root();
$cats = $root->children();

$node = $cats[0];

print_r ($node->name);


It outputs "text" and I would expect "Databases".

running xmllint gives:

[teo@teo xml]$ xmllint --debug categories.xml 
DOCUMENT
version=1.0
URL=categories.xml
standalone=true
  ELEMENT catalog
    TEXT
      content=
    ELEMENT category
      ATTRIBUTE id
        TEXT
          content=db
      ATTRIBUTE name
        TEXT
          content=Databases
      TEXT
[...]


Any idea what's wrong?

TIA


-- teodor




Hi everyone!!
My name is BRUNO, and I'm in Brazil........

I dont know how to configure my_odbc!!!

What I wanna do:

I wanna make a report using The Crystal reports.
My Mysql database is placed in a pc with LINUX. Then i have instaled Myodbc
in may pc with Win98 but just install the MYODBC doesn't work!!!

Please, If somebody knows that......HEEEEEELLLLPPPPP!!!!!

Thanks.




How do I obtain the path of the local script?  Or do I have to build it from
the $DOCUMENT_ROOT?






Hello Karl, 

(KJS == "Karl J. Stubsjoen") [EMAIL PROTECTED] writes:

KJS> How do I obtain the path of the local script? Or do I have to
KJS> build it from the $DOCUMENT_ROOT?

I think this is specific to Apache, but try $SCRIPT_FILENAME

-Brian
--
Syntactic sugar causes cancer of the semi-colons.






I just do:
$LocalScript = $DOCUMENT_ROOT . $PHP_SELF;


.:: Nathan Cook [ [EMAIL PROTECTED] ] ::.
Systems & Network Administrator :: Programmer
[ phone - 208.343.3110 ][ pager - 208.387.9983 ]
----- Original Message -----
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 9:41 AM
Subject: [PHP] Local Path of Script


> How do I obtain the path of the local script?  Or do I have to build it
from
> the $DOCUMENT_ROOT?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





I have this array;

$bikes = array(
     "Road"  => array(
          "Trek 5200"  => "URL",
          "Schwinn Fastback Pro"  => "URL",
          "Va Moots"  => "url"
     ),
     "Mountain"  => array(
          "Trek Fuel 90"  => "url",
          "Schwinn Homegrown"  => "url"
     ),
     "BMX"  => array(
          "Haro Mira 540"  => "url",
          "Schwinn Powermatic Pro"  => "url"
     ),
     "Kids" => array(
          "Schwinn Tiger" => "put URL here",
          "Schwinn Bumblebee" => "URL"
     )
);

and am trying to list only a portion of it.
E.g., how can I reference only $bikes["Road"]
in the snippet below?

while ( list($type, $subarray) = each($bikes) ) {
            while ( list($key, $val) = each($subarray) ) {
                echo "<TD><IMG SRC=\"images/spacer.gif\" WIDTH=\"25\"
HEIGHT=\"1\" ALT=\"\" BORDER=\"0\"></TD>";
                echo "<TD><A HREF=\"$val\" CLASS=\"menu\">$key</A></TD>";
            }
        }





On Mon, 22 Jan 2001, Brian V Bonini wrote:

> I have this array;
>
> $bikes = array(
>      "Road"  => array(
>           "Trek 5200"  => "URL",
>           "Schwinn Fastback Pro"  => "URL",
>           "Va Moots"  => "url"
>      ),
>      "Mountain"  => array(
>           "Trek Fuel 90"  => "url",
>           "Schwinn Homegrown"  => "url"
>      ),
>      "BMX"  => array(
>           "Haro Mira 540"  => "url",
>           "Schwinn Powermatic Pro"  => "url"
>      ),
>      "Kids" => array(
>           "Schwinn Tiger" => "put URL here",
>           "Schwinn Bumblebee" => "URL"
>      )
> );
>
> and am trying to list only a portion of it.
> E.g., how can I reference only $bikes["Road"]
> in the snippet below?
>
> while ( list($type, $subarray) = each($bikes) ) {
>             while ( list($key, $val) = each($subarray) ) {
>                 echo "<TD><IMG SRC=\"images/spacer.gif\" WIDTH=\"25\"
> HEIGHT=\"1\" ALT=\"\" BORDER=\"0\"></TD>";
>                 echo "<TD><A HREF=\"$val\" CLASS=\"menu\">$key</A></TD>";
>             }
>         }
>

each($bikes["Road"])

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





That's what I thought, which seemed to be the obvious
however, when I tried that it returns an error.

"Warning: Variable passed to each() is not an array or object in pagetop.inc
on line 105"

PHP Version 4.0B2
BSDI BSD/OS 4.0.1
Zend Engine v0.90,

> -----Original Message-----
> From: Ignacio Vazquez-Abrams [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 22, 2001 11:56 AM
> To: Brian V Bonini
> Cc: PHP Lists
> Subject: Re: [PHP] Newbie: array help....
>
>
> each($bikes["Road"])
>
>
>
> On Mon, 22 Jan 2001, Brian V Bonini wrote:
>
> > I have this array;
> >
> > $bikes = array(
> >      "Road"  => array(
> >           "Trek 5200"  => "URL",
> >           "Schwinn Fastback Pro"  => "URL",
> >           "Va Moots"  => "url"
> >      ),
> >      "Mountain"  => array(
> >           "Trek Fuel 90"  => "url",
> >           "Schwinn Homegrown"  => "url"
> >      ),
> >      "BMX"  => array(
> >           "Haro Mira 540"  => "url",
> >           "Schwinn Powermatic Pro"  => "url"
> >      ),
> >      "Kids" => array(
> >           "Schwinn Tiger" => "put URL here",
> >           "Schwinn Bumblebee" => "URL"
> >      )
> > );
> >
> > and am trying to list only a portion of it.
> > E.g., how can I reference only $bikes["Road"]
> > in the snippet below?
> >
> > while ( list($type, $subarray) = each($bikes) ) {
> >             while ( list($key, $val) = each($subarray) ) {
> >                 echo "<TD><IMG SRC=\"images/spacer.gif\" WIDTH=\"25\"
> > HEIGHT=\"1\" ALT=\"\" BORDER=\"0\"></TD>";
> >                 echo "<TD><A HREF=\"$val\"
> CLASS=\"menu\">$key</A></TD>";
> >             }
> >         }
> >






Hello Brian, 

(BVB == "Brian V Bonini") [EMAIL PROTECTED] writes:

BVB> That's what I thought, which seemed to be the obvious
BVB> however, when I tried that it returns an error.

BVB> "Warning: Variable passed to each() is not an array or object in pagetop.inc
BVB> on line 105"

<?php

$bikes = array(
     "Road"  => array(
          "Trek 5200"  => "URL",
          "Schwinn Fastback Pro"  => "URL",
          "Va Moots"  => "url"
     ),
     "Mountain"  => array(
          "Trek Fuel 90"  => "url",
          "Schwinn Homegrown"  => "url"
     ),
     "BMX"  => array(
          "Haro Mira 540"  => "url",
          "Schwinn Powermatic Pro"  => "url"
     ),
     "Kids" => array(
          "Schwinn Tiger" => "put URL here",
          "Schwinn Bumblebee" => "URL"
     )
);

while(list($type,) = each($bikes))
{
    while(list($model,$url) = each($bikes[$type]))
    {
        print "Type: $type<br>";
        print "Model: $model<br>";
        print "URL: $url<br>";
        print "<p>";
    }
}

?>

-Brian
--
Point not found. (A)bort (R)eread (I)gnore.






On Mon, 22 Jan 2001, Brian V Bonini wrote:

> That's what I thought, which seemed to be the obvious
> however, when I tried that it returns an error.
>
> "Warning: Variable passed to each() is not an array or object in pagetop.inc
> on line 105"
>
> PHP Version 4.0B2
> BSDI BSD/OS 4.0.1
> Zend Engine v0.90,
>

I reimplemented your snippet from first principles, and here's what I came up
with (reformatted and XHTMLized):

<table>
<?php

$bikes = array(
  "Road"  => array(
    "Trek 5200"  => "URL",
    "Schwinn Fastback Pro"  => "URL",
    "Va Moots"  => "url"
  ),
  "Mountain"  => array(
    "Trek Fuel 90"  => "url",
    "Schwinn Homegrown"  => "url"
  ),
  "BMX"  => array(
    "Haro Mira 540"  => "url",
    "Schwinn Powermatic Pro"  => "url"
  ),
  "Kids" => array(
    "Schwinn Tiger" => "put URL here",
    "Schwinn Bumblebee" => "URL"
  )
);

while (list($val, $key)=each($bikes["Road"]))
{
?>
<td><img src="images/spacer.gif" width="25" height="1" alt="" border="0" /></td>
<td><a href="<?=$key?>" class="menu"><?=$val?></a></td>
<?php
};

?>
</table>

Works perfectly.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





I apparently misunderstood your implementation,
your right, it does work perfectly.... Thank you!

> -----Original Message-----
> From: Ignacio Vazquez-Abrams [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 22, 2001 12:27 PM
> To: Brian V Bonini
> Cc: PHP Lists
> Subject: RE: [PHP] Newbie: array help....
> 
> 
> On Mon, 22 Jan 2001, Brian V Bonini wrote:
> 
> > That's what I thought, which seemed to be the obvious
> > however, when I tried that it returns an error.
> >
> > "Warning: Variable passed to each() is not an array or object 
> in pagetop.inc
> > on line 105"
> >
> > PHP Version 4.0B2
> > BSDI BSD/OS 4.0.1
> > Zend Engine v0.90,
> >
> 
> I reimplemented your snippet from first principles, and here's 
> what I came up
> with (reformatted and XHTMLized):
> 
> <table>
> <?php
> 
> $bikes = array(
>   "Road"  => array(
>     "Trek 5200"  => "URL",
>     "Schwinn Fastback Pro"  => "URL",
>     "Va Moots"  => "url"
>   ),
>   "Mountain"  => array(
>     "Trek Fuel 90"  => "url",
>     "Schwinn Homegrown"  => "url"
>   ),
>   "BMX"  => array(
>     "Haro Mira 540"  => "url",
>     "Schwinn Powermatic Pro"  => "url"
>   ),
>   "Kids" => array(
>     "Schwinn Tiger" => "put URL here",
>     "Schwinn Bumblebee" => "URL"
>   )
> );
> 
> while (list($val, $key)=each($bikes["Road"]))
> {
> ?>
> <td><img src="images/spacer.gif" width="25" height="1" alt="" 
> border="0" /></td>
> <td><a href="<?=$key?>" class="menu"><?=$val?></a></td>
> <?php
> };
> 
> ?>
> </table>
> 
> Works perfectly.
> 
> -- 
> Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>
> 
> 




On Sun, 21 Jan 2001, johnny p. wrote:

> Ok, here's the prolem:  I'm trying to create a feature on my site similar to
> xdrive.com.  Basically I want the user to be able to upload a file and have
> it stored on my server.  I also want to have the ability for the user to
> download the file at a later time.  Account authentiaction is handled, no
> problem, but I have no idea where to put the files.  I create a directory,
> it may be guessed and even the filename might be guessed and any user may be
> able to download the file, breaking user authentication.  If I store the
> file in a non-apache directory, how does the user download the file?
>
> My goal is to have the second scenario work, create a directory for each
> user for file storage, and somehow get the user to be able to download it
> after being authenticated.  I do not want to use .htaccess files for this,
> either.  I want it to be seemless with the rest of the features of the site.
>
> Thanks in advance for any ideas,
>
> johnny p.
>

Use a database for this. Store the mimetype of the uploaded file so that it
can be dwnloaded properly afterwards. No file/directory permissions problems,
unlimited flexibility for authentication... what more could you want?

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





Hey all.  Does anyone have any ideas how I can carry over a selected value?
:)  It's probably easy but my mind is making it difficult.  A value is
stored for a record in the DB which had been previously assigned through a
select statement.  If that record gets edited, the value that was chosen
through the select does also, and that would necesitate another select
statement, but for the ease of use, I would like the current value to be the
selected one.  The catch is, the values in the select statement come from
the db because they depend on what the user inputs.  Any ideas?

Thanks
Jason





Web analyzer Analog makes nice search engine report. The source could
give you some clues.

http://www.analog.cx/

Edin

-----Original Message-----
From: Dallas Kropka [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 20, 2001 5:12 AM
To: jeremy brand
Cc: Michael Kimsal; PHP LIST
Subject: RE: [PHP] Another Guru's Help Needed...


Ya know, I was afraid you were going to say something like that.... does
anyone know of anything like this that has been done? And does anyone
know
where I can find a list of Search Engine IP adds?

BTW Jeremy, Thanks.


-----Original Message-----
From: jeremy brand [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 8:14 PM
To: Dallas Kropka
Cc: Michael Kimsal; PHP LIST
Subject: RE: [PHP] Another Guru's Help Needed...


You are going to have to research the query string for each search
engine that you intend to support, and then parse it out.

for example: go to google.  search for [jeremy brand], notice the
REQUEST_URI:
/search?q=jeremy+brand

In google's case, since they always use q=, you can parse this out.

You'll need to do this and write a module for each search engine
(since they all will have their own behavior).

Maybe someone has done this work, but you always have to keep curent
because search engines are free to chenge their own code any time they
want.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Fri, 19 Jan 2001, Dallas Kropka wrote:

> Date: Fri, 19 Jan 2001 20:06:27 -0600
> From: Dallas Kropka <[EMAIL PROTECTED]>
> To: Michael Kimsal <[EMAIL PROTECTED]>
> Cc: PHP LIST <[EMAIL PROTECTED]>
> Subject: RE: [PHP] Another Guru's Help Needed...
>
> Most likely but how do I strip it to determine the string of keywords?
>
> Note to list: I cant depend on site logs.
>
> -----Original Message-----
> From: Michael Kimsal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 19, 2001 7:33 PM
> To: Dallas Kropka
> Cc: PHP LIST
> Subject: Re: [PHP] Another Guru's Help Needed...
>
>
> Isn't this info in the HTTP_REFERER field normally?
>
>
> Dallas Kropka wrote:
>
> > I need to grab the referring search engines keywords used in the
search.
I
> > need to be able to determine what the keywords were, and what the
engine
> > was... (Lycos, AltaVista etc...).
> >
> > How can I do this, where can I find info on this, or is there
something
> that
> > will do this already that I can integrate into my code?
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





Hey there,

 is there a way that you can get a function to return multiple values. e.g.:
{and also how to access them}

function VarTest() {

return $var = 10;

return $var2 = 20;
 }

Thanks







On Mon, 22 Jan 2001, Abe Asghar wrote:

> Hey there,
>
>  is there a way that you can get a function to return multiple values. e.g.:
> {and also how to access them}
>
> function VarTest() {
>
> return $var = 10;
>
> return $var2 = 20;
>  }
>
> Thanks
>

function somefunc()
{
  return Array(10, 20);
};

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





On Mon, 22 Jan 2001, Abe Asghar wrote:

> Hey there,
> 
>  is there a way that you can get a function to return multiple values. e.g.:
> {and also how to access them}
> 
> function VarTest() {
> 
> return $var = 10;
> 
> return $var2 = 20;
>  }

Functions can only return one variable.  However, you can return an array,
which contains as many values as you need.

function vartest()
{
   $first = 10;
   $second = 20;

   return Array($first,$second);
}

Matt





Thanks Guys,






minor bug fix and several documentation changes/additions.

http://www.phpinsider.com/php/code/Smarty/




With IIS $path gives the actual path to the directory in which the PHP
scripts reside.  With Apache, $path is empty.  What have I missed?  This
is my first use of Apache, so it's configuration is new for me.

  $path = $HTTP_SERVER_VARS[URL];
  $path = ereg_replace("/[^/]+$","",$path) . '/';
  echo('Path: ' . $path . '<br>');

Track_vars = On

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






I use http://www.hostrocket.com/

Edin
-----Original Message-----
From: Chris Lott [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 2:37 AM
To: PHP General
Subject: [PHP] Web hosting for PHP/MySQl development


Any recommendations for a good, savvy host for doing some PHP/MySQL
development? Not looking for a free service, obviously, but somebody
with:
knowledgeable tech support, good mysql/php 4/zend support, decent mail
handling, and developers tools like: telnet/ssh, emacs, procmail,
crontab
access, etc. Where are you php developers doing your hosting?

I have been scouring this list archives, but everyone is focussed on
free or
extremely cheap. I also know about the PHP hosts listing, but the
problem
with that is you never know if the positive comments are real or not,
and
only people experienced with a host can tell you if they are any good or
not!

via private mail is fine, if you want to share that good thing with one
person instead of the list...

c
--
Chris Lott


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





>From Bruno: Brazil

How is the sintaxe of this command????

Thanks...




At 02:17 PM 1/17/01 -0600, you wrote:
>Oh!
>
>Yeah, Netscape is real goofy and tries to reload the page, but badly...
>
>I *think* you can dink around with the caching headers to convince Netscape
>that it's okay to use the existing copy to print instead of trying to get a
>fresh one.

I used this, the sample from "Core PHP Programming" and it gives me a parse
error
starting on the first line of the change whether the header lines are
before or after 
session_start or the session_ register lines.

<?
session_start();
session_register("name");
session_register("address");
session_register("phone");
session_register("level");
session_register("cardtype");
session_register("cardnum");
session_register("expires");
session_register("email");
session_register("pfnamei");
session_register("plname");
session_register("pssn");
session_register("pocc");
session_register("pdob");
session_register("pblind");
session_register("sfnamei");
header("Last-Modified: " . gmdate("D, d M Y H:i:s) . " GMT");
header("Expires: " . gmdate("D, d M Y H:i:s) . " GMT");
header("Cache-Control: no-cache, must re-validate");
header("Pragma: no-cache");
- 
Larry Jaques, President  1.760.941.8868
DIVERSIFY! Communications  Vista, CA  USA
1991 - Celebrating Our 10th Year in Business - 2001
Comprehensive Website Development  http://diversify.com


Reply via email to