RE: [PHP] All URL's calling one script

2001-05-24 Thread Leavell Digital Design

Here is a good article on that topic:

http://www.phpbuilder.com/columns/tim2526.php3

Note: if you have to use the Files local appoach, php must be running as a
module.

Kevin Leavell
Leavell Digital Design Inc.
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: Ron [mailto:[EMAIL PROTECTED]]
--- Sent: Thursday, May 24, 2001 7:40 AM
--- To: [EMAIL PROTECTED]
--- Subject: Re: [PHP] All URL's calling one script
---
---
--- You can try to set the 404 error page to that ... I don't know
--- how safe that
--- is, but it might work..
---
--- -Ron
---
--- Simon Kimber [EMAIL PROTECTED] wrote in message
--- [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
---  Hi All
--- 
---  This is possibly more of an apache/linux question...  does
--- anyone know a
--- way
---  to force ANY url to run ONE PHP script on a virtual
--- server... eg.  the
--- same
---  script is run if a user goes to www.myserver.co.uk or
---  www.myserver.co.uk/dfkgjdfl/ or www.myserver.co.uk/hello.htm or
--- WHATEVER!!!
---  :o)
--- 
---  Cheers
--- 
---  Simon Kimber
---  Funny.co.uk - The Comedy Portal
---  http://www.funny.co.uk/
--- 
---  Now Incorporating: The UK Live Comedy Directory
---  FREE promotion for UK Comedy Acts and Venues
---  http://www.funny.co.uk/uklive/
--- 
---  eml. [EMAIL PROTECTED]
---  icq. 16156911
--- 
--- 
--- 
---  --
---  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]




RE: [PHP] SSL and CURL question --

2001-05-15 Thread Leavell Digital Design

Can't help you with your code but, you may want to check out the snoopy
class at Sourceforge.net.

http://sourceforge.net/projects/snoopy/

It uses ssl and cURL.  Works pretty well.

Kevin Leavell
Leavell Digital Design Inc.
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: phpman [mailto:[EMAIL PROTECTED]]
--- Sent: Tuesday, May 15, 2001 4:43 PM
--- To: [EMAIL PROTECTED]
--- Subject: [PHP] SSL and CURL question --
---
---
--- CURL is realy cool, lets me do easy socket stuff, especially with
--- ssl, which leads me to my question:
---
--- How on God's green earth do I send more then simple requests to a SSL
--- server? Here's my basic request...
---
--- POST /apps.here/xml/Rate HTTP/1.1
--- Content-Type: application/xml
--- Content-Length: 1074
---
--- ?xml version=1.0 encoding=UTF-8?
--- xml stuff hereblah.../xml stuff here
---
---
--- the CURL code (so far)
---
--- $xml_req=this is the xml doc;
--- $l=strlen($xml_req);
---
--- $url=https://www.secureserver.com/apps.here/xml/Rate;;
--- $tmp_out=time() . .tmp.xml.out;
--- $fp = fopen (/public/nirvana/ . $tmp_out, w+);
--- fwrite($fp, $xml_req, $l);
---
--- $ch = curl_init ();
--- curl_setopt ($ch, CURLOPT_URL, $url);
--- curl_setopt ($ch, CURLOPT_SSLVERSION, 3);
--- curl_setopt ($ch, CURLOPT_HEADER, 0);
--- curl_setopt ($ch, CURLOPT_CUSTOMREQUEST, POST /apps.here/xml/Rate
--- HTTP/1.1);
--- curl_setopt ($ch, CURLOPT_HTTPHEADER, Content-Type: application/xml);
--- curl_setopt ($ch, CURLOPT_INFILE, $fp);
--- curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
--- // curl_setopt ($ch, CURLOPT_VERBOSE, 1);
--- // curl_setopt ($ch, CURLOPT_POST, 1);
---
--- $results = curl_exec ($ch);
--- fclose($fp);
--- curl_close ($ch);
---
---
---
--- the tmp xml file displays the correct stuff. I'm totally
--- confused and there
--- is basically NO curl ssl support docs anywhere.
---
--- distraut in buffalo,
---
--- dave
---
---
---
---
--- --
--- 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] RE: software localization with PHP

2001-03-14 Thread Leavell Digital Design

You can still do:
in your language file (presumably called english.php)
define("ENGLISH_GREETING", "Hello, \$first_name");


Then in your script you just need to use
ENGLISH_GREETING

it should work as long as you have defined $first_name prior to using
ENGLISH_GREETING

you may have to declare $first_name as a global variable but I am not sure.

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: Tao [mailto:[EMAIL PROTECTED]]
--- Sent: Wednesday, March 14, 2001 12:14 PM
--- To: [EMAIL PROTECTED]
--- Subject: software localization with PHP
---
---
--- Kevin,
---
--- Thanks for the reply.  This will not solve my problem.  The
--- problem is, for some
--- languages the sentence structure may be different.  For
--- example, the sentence
--- may need to be,
--- $greeting = "$first_name, welcome!"
--- as opposed to,
--- $greeting = "Welcome, $first_name!"
---
--- Or, it can come in a different form, like,
--- $greeting = "Good morning, $first_name."
---
--- These specificity need to be in the language file, not the scripts.
---
--- Tao
---
---
--- Leavell Digital Design wrote:
---
---  You can use constants:
--- 
---  in your language file
---  define("HELLO", OLA);
--- 
---  in your script  which includes the language file you can write
---  $greeting = HELLO . " $first_name";
--- 
---  print $greeting;
--- 
---  Kevin Leavell
---  [EMAIL PROTECTED]
---  P 406.829.8989
---  C 406.240.4595
--- 
---  --- -Original Message-
---  --- From: Tao [mailto:[EMAIL PROTECTED]]
---  --- Sent: Tuesday, March 13, 2001 9:50 PM
---  --- To: [EMAIL PROTECTED]
---  --- Subject: [PHP] software localization with PHP
---  ---
---  ---
---  --- Hi all,
---  ---
---  --- I have a question about localizing PHP scripts.  I understand
---  --- that for basic
---  --- localization one can have a "strings" file for each language,
---  --- which contains
---  --- string variables and values such as:
---  --- ?php
---  --- $title = "Welcome!";
---  --- $error = "An error occurred.";
---  --- ?
---  ---
---  --- Then, in the scripts just "include" the language file at the
---  --- beginning and
---  --- simply call the strings by their variable names.  The issue I
---  --- have is when
---  --- embedding variables within these strings.  Suppose I need to
---  --- call the user
---  --- by his/her first name, in the strings file I would have
--- a variable like
---  --- this:
---  --- $greeting = "Welcome! $first_name";
---  ---
---  --- The problem is, the strings file is loaded at the beginning of
---  --- the script
---  --- before $first_name was set, so the $greeting string
--- will come out as
---  --- "Welcome! ", with $first_name being an empty string.  Even if
---  --- I loaded the
---  --- strings file after the $first_name variable is set, the
--- problem still
---  --- remains - when $first_name variable is changed, the strings
---  --- file has to be
---  --- reloaded.
---  ---
---  --- What is the best way of dealing with this problem?  Is there a
---  --- place to find
---  --- "best practices" on localizing PHP software?
---  ---
---  --- Tao
---  ---
---  ---
---  ---
---  --- --
---  --- 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]




RE: [PHP] prompts

2001-03-14 Thread Leavell Digital Design

?PHP
if( $Submit ){
print "Your name is $name";
}
else{
print "FORM METHOD=\"post\" ACTION=\"$PHP_SELF\"";
print "Please Enter Your Name:";
print "INPUT TYPE=\"text\" name=\"name\"";
print "INPUT TYPE=\"submit\" NAME=\"Submit\" VALUE=\"Submit\"";
print "/FORM";
}
?

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595 

--- -Original Message-
--- From: Gary [mailto:[EMAIL PROTECTED]]
--- Sent: Wednesday, March 14, 2001 1:13 PM
--- To: [EMAIL PROTECTED]
--- Subject: [PHP] prompts
--- 
--- 
--- Is there anyway in PHP to prompt the user for input like JavaScript's
--- prompt("Hello, what is your name?")
--- 
--- Thanks, Gary
--- 
--- 
--- 
--- -- 
--- 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]




RE: [PHP] software localization with PHP

2001-03-13 Thread Leavell Digital Design

You can use constants:

in your language file
define("HELLO", OLA);

in your script  which includes the language file you can write
$greeting = HELLO . " $first_name";

print $greeting;


Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: Tao [mailto:[EMAIL PROTECTED]]
--- Sent: Tuesday, March 13, 2001 9:50 PM
--- To: [EMAIL PROTECTED]
--- Subject: [PHP] software localization with PHP
---
---
--- Hi all,
---
--- I have a question about localizing PHP scripts.  I understand
--- that for basic
--- localization one can have a "strings" file for each language,
--- which contains
--- string variables and values such as:
--- ?php
--- $title = "Welcome!";
--- $error = "An error occurred.";
--- ?
---
--- Then, in the scripts just "include" the language file at the
--- beginning and
--- simply call the strings by their variable names.  The issue I
--- have is when
--- embedding variables within these strings.  Suppose I need to
--- call the user
--- by his/her first name, in the strings file I would have a variable like
--- this:
--- $greeting = "Welcome! $first_name";
---
--- The problem is, the strings file is loaded at the beginning of
--- the script
--- before $first_name was set, so the $greeting string will come out as
--- "Welcome! ", with $first_name being an empty string.  Even if
--- I loaded the
--- strings file after the $first_name variable is set, the problem still
--- remains - when $first_name variable is changed, the strings
--- file has to be
--- reloaded.
---
--- What is the best way of dealing with this problem?  Is there a
--- place to find
--- "best practices" on localizing PHP software?
---
--- Tao
---
---
---
--- --
--- 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]




FW: [PHP] Multi-Step Script

2001-03-13 Thread Leavell Digital Design

use if statements

if( $submit ){
print "I love Montana";
put form #2 in here w/ action = $PHP_SELF make sure you set $submit2 to
some value
)
elseif( $submit2 ){
print "Part two of script";
}
else{
put your form in here w/ action= $PHP_SELF
}

This is a quicky but hopefully you get the idea.  Just assign values to
different variables.  Post the info back to $PHP_SELF and test for the
existence of those variables in your if statements.  Your single php script
could span an unlimited number of pages (as far as the end user is
concerned).

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: Andrew V. Romero [mailto:[EMAIL PROTECTED]]
--- Sent: Tuesday, March 13, 2001 9:59 PM
--- To: [EMAIL PROTECTED]
--- Subject: [PHP] Multi-Step Script
---
---
--- Is it possible to use different parts of one php script for multiple
--- html forms?  I am not seeing how people create multiple pages of html
--- forms with each form importing information from the previous form.
--- Right now, for each html form page I have, I create one php script to
--- handle it but it would be nice to have just one php script in
--- which only
--- certain parts execute depending on have variables have
--- assignments.  One
--- way I was thinking of doing this is to have the html forms just keep
--- posting the information to itself whenever the submit button is hit and
--- then using a series of if else statements to evaluate where the program
--- is in relationship to the forms, would this type of system work?
--- What do you guys do?
--- -Andrew V. Romero
--- To reply personally, remove all numbers from address.
---
---
--- --
--- 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]




RE: [PHP] Multi-Step Script

2001-03-13 Thread Leavell Digital Design

Good point

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595 

--- -Original Message-
--- From: Jason Murray [mailto:[EMAIL PROTECTED]]
--- Sent: Tuesday, March 13, 2001 11:59 PM
--- To: 'Leavell Digital Design'; [EMAIL PROTECTED]
--- Subject: RE: [PHP] Multi-Step Script
--- 
--- 
---  if( $submit ){
---  print "I love Montana";
---  put form #2 in here w/ action = $PHP_SELF make sure you 
---  set $submit2 to
---  some value
---  )
---  elseif( $submit2 ){
---  print "Part two of script";
---  }
---  else{
---  put your form in here w/ action= $PHP_SELF
---  }
--- 
--- Actually - do it in the reverse order, because then you can do error 
--- checking and gracefully "drop back" to a previous step if there's an
--- error.
--- 
--- ie:
--- 
--- if ($step == 3)
--- {
---   // do stuff
--- }
--- if ($step == 2)
--- {
---   // do stuff
--- }
--- if (!$step)
--- {
---   // do stuff
--- }
--- 
--- Jason
--- 
--- -- 
--- 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]




RE: [PHP] Setting up test station on win 95

2001-03-13 Thread Leavell Digital Design

http://sourceforge.net/projects/phptriad/

There is also a tutorial over at phpbuilder.com

You can set up different vhosts on your local win machine for each client if
the need comes up.

Kevin Leavell
[EMAIL PROTECTED]
P 406.829.8989
C 406.240.4595

--- -Original Message-
--- From: Dennis Gearon [mailto:[EMAIL PROTECTED]]
--- Sent: Wednesday, March 14, 2001 12:31 AM
--- To: [EMAIL PROTECTED]
--- Subject: [PHP] Setting up test station on win 95
---
---
--- Are there binaries around where I could put together:
---
--- apache
--- MySQL
--- PHP
---
--- on Win95 to run pages on 'localhost' so I could develop at home?
--- --
--- 
--- Sites by friends of mine: http://www.myhiddentreasures.com/
--- 
--- WARNING personal propaganda signature
--- TAKE WHAT YOU LIKE AND LEAVE THE REST
---
--- SINCE OUR GOVERNMENT WON'T PRESERVE OUR CLIMATE, IT'S UP TO US!
--- Imagine ** yourself ** and your kids now an endangered species
--- 1Inflate automobile tires to near maximum in summer, -2psi in winter
--- 2add insulation to house and hot water heater, and refrigerator,
--- 3combine trips in cars, make less of them 4buy cars, sports
--- vehicles and recreational vehicles with good if not best mileage
--- 4put awnings over windows is summer, remove in winter. 5 add
--- solar hot water heating. 6Push for energy recycling clothes
--- dryers 7 walk more, play outside with your kids! 8 let your
--- grass grow to 3-4 inches, chokes weeds, saves water and energy,
--- keeps house cooler 9 Put WHITE or REFLECTIVE materials on
--- roofs to send energy back into space. 10 Vote for burial of
--- logging slash onsite in logging areas for better watersheds
--- and less burned vegetation. 11 compost your leaves and grass,
--- bury in flower beds, lawns, gardens, or give away. 12 VOTE
--- for energy and CO2 ratings on ALL products and foods. KNOW how
--- much damage your purchases do to the climate. 13 Give your kids
--- less stuff and more of you. 14 recycle everything you can 15
--- limit your children to an average 1 per adult between all your
--- marriages. (Only REPLACE yourself, not expand the population)
---
--- --
--- 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]