Re: [PHP] How can I change the timezone?

2003-05-29 Thread Erick
How to do this? -- Jay Blanchard [EMAIL PROTECTED] ???:[EMAIL PROTECTED] [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time?

RE: [PHP] How can I change the timezone?

2003-05-29 Thread Jay Blanchard
[snip] How to do this? [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time? http://us2.php.net/manual/en/function.time.php [/snip] Use mktime

[PHP] Re: secure code

2003-05-29 Thread Anil Kumar K.
Here is exactly what you are looking for: The Open Web Application Security Project http://www.owasp.org/ best. Anil On Wed, 28 May 2003, Tim Burgan wrote: Hello, I'm wondering if you can recommend any resources that discuss writing secure code and how to put the best methods in

Re: [PHP] How can I change the timezone?

2003-05-29 Thread Erick
Thank you. I added 43200 then slove this problem. -- Jay Blanchard [EMAIL PROTECTED] ???:[EMAIL PROTECTED] [snip] How to do this? [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting

RE: [PHP] sessions and domains

2003-05-29 Thread Steven Kallstrom
Bk, You would have to somehow pass all session variables onto the new host since session variables are stored server-side. You would have to have a function that took all session variables and passed them to the new domain including session id... then you would need a function that

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread Wendell Brown
On Wed, 28 May 2003 12:46:50 +0100, David Grant wrote: I would've thought that $HTTP_*_VARS will be deprecated sometime in the future. It might be an idea to write your own accessor methods, e.g. function RetrieveGetParameter($parameterValue) Egads! Wouldn't the following be a little

Re: [PHP] About Guest Book\'s messages....

2003-05-29 Thread Lew Mark-Andrews
I used wordwrap($word,40,\n,1) to prevent it, but my system is BIG5 ,two bytes, Sometimes this method would destroy the structure of the two-bytes word. Hi, Have you looked into the multi-byte string functions in the manual? Search on php.net for mb_str . Also, have you tried just forcing the

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread daniel
I did this: if (!empty($_POST)) { extract($_POST); } else { extract($HTTP_POST_VARS); } And have it in an include file, extract_post.php. This way I can just include it and all variables are available, just like if register_globals had been on. Daniel. - Original Message - From:

RE: [PHP] secure code

2003-05-29 Thread Dan Joseph
Tim, Make sure you handle all exceptions, exit() after each redirect, make sure you are validating all form fields before it goes into the database, things like that. Might want to grab webproxy from www.atstake.com and use it to test your app. Its kind of complex to use at first, but

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread Wendell Brown
On Wed, 28 May 2003 16:13:22 +0200, [EMAIL PROTECTED] wrote: if (!empty($_POST)) { extract($_POST); } else { extract($HTTP_POST_VARS); } And have it in an include file, extract_post.php. This way I can just include it and all variables are available, just like if register_globals had been on.

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread daniel
However, both of these solutions create the same security issue that turning RegisterGlobals on took care of in the first place. :) Howcome? I don't think I understand that... Is the security issue not with the fact that you're POSTing og GETing variables rather than the way you do it? Would

[PHP] Re: About Guest Book\'s messages....

2003-05-29 Thread hui
do it in your html code, you use a table for the message text? add this: table width=460 style=TABLE-LAYOUT:fixed style=TABLE-LAYOUT:fixed it works. :) Fongming [EMAIL PROTECTED] дÈëÓʼþ news:[EMAIL PROTECTED] Hi, Sir: There may be someone leave a message like following:

RE: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread Jay Blanchard
[snip] Yup! You could even add that php to the auto_prepend_file variable in your php.ini or add this to your .htaccess file (assuming you are running Apache and have overwrite turned on) and the prepend will happen automagically on every php program: php_value auto_prepend_file

Re: [PHP] Re: About Guest Book\'s messages....

2003-05-29 Thread Awlad Hussain
using style=TABLE-LAYOUT:fixed does not wrap the text - Original Message - From: hui [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 3:13 PM Subject: [PHP] Re: About Guest Book\'s messages do it in your html code, you use a table for the message text? add

[PHP] strtr question

2003-05-29 Thread ed
I want to remove unwanted characters from filenames of files uploaded to our server. I am currently using strtr to do this. I have a few characters that are being removed but I would also like a single quote to be removed if it is in the filename. I think it has to be escaped in the command

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread Wendell Brown
On Wed, 28 May 2003 16:30:17 +0200, [EMAIL PROTECTED] wrote: Howcome? I don't think I understand that... Check this out. http://us4.php.net/registerglobals -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] strtr question

2003-05-29 Thread Joe Stump
You could do this a number of ways: eregi(), ereg() or str_replace() ... ? $string = What's up?; $string = str_replace(','',$string); echo $string.\n; ? That will output Whats up? --Joe -- Joe Stump [EMAIL PROTECTED] http://www.joestump.net Label makers are proof God wants Sys Admins

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread David Grant
Wendell Brown wrote: Egads! Wouldn't the following be a little simpler? At the top of the file put. if( is_array($_POST) ) $pArray = $_POST; else $pArray = $HTTP_POST_VARS; Absolutely! I've been getting a little carried away with moving a lot of PHP functions to OO classes

Re: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread daniel
Okay, that makes sense, but I would never write a script like that in the first place ;) Not unless I'm really tired or something, in which case it's good to have this thing turned off by default =) Cheers - Original Message - From: Wendell Brown To: [EMAIL PROTECTED] ; [EMAIL

RE: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread Joe Stump
While I wholey support the concept of using appropriate globals ($_POST, $_GET, $_COOKIE, etc.) I'd like to make one point abundantly clear: While it doesn't guarantee that data has not been forged, it does require an attacker to guess the right kind of forging. --

RE: [PHP] strtr question

2003-05-29 Thread Joe Stump
Have you read up on regular expressions? They'll do just what you're looking for: ?php ereg_replace('[ab\.\,\ ]','',$string); // remove 'a', 'b', '.', ',' ? http://www.php.net/ereg_replace --Joe -- Joe Stump [EMAIL PROTECTED] http://www.joestump.net Label makers are proof God wants Sys

[PHP] Form Generators

2003-05-29 Thread Clint
Does anyone know of a form generator that will look at a MySQL table and generate an add/edit form off of that table? Thanks, Clint -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Form Generators

2003-05-29 Thread Cal Evans
check www.freshmeat.net. There are several. =C= * Cal Evans * http://www.christianperformer.com * Stay plugged into your audience * The measure of a programmer is not the number of lines of code he writes but the number of lines he does not have to write. * - Original Message - From:

[PHP] thumbnails

2003-05-29 Thread Edward Peloke
Ok, I know thumbnails have been discussed and I have looked at the archives, I am just looking for opinions. I am doing a small website for a used vehicle dealer. I need to make it as easy as possible for him to add new vehicles. I plan to just give him a form for the information, and a place

RE: [PHP] thumbnails

2003-05-29 Thread Joe Stump
I'd definitely generate them on the fly for him. I personally use the *NIX program convert which comes with imagemagick. It works great and is easy to use. General Steps: 1.) Copy big image to location 2.) Use convert to make a thumbnail and name it 't_'.$image_name 3.) Put image name in a db

Re: [PHP] thumbnails

2003-05-29 Thread CPT John W. Holmes
I know thumbnails have been discussed and I have looked at the archives, I am just looking for opinions. I am doing a small website for a used vehicle dealer. I need to make it as easy as possible for him to add new vehicles. I plan to just give him a form for the information, and a place to

Re: [PHP] strtr question

2003-05-29 Thread Mike Morton
Ed: Better yet, because not all browsers pass through the original file name that was was uploaded, have the user input the name - and validate that instead. You can then restrict them to numbers letters: $filename=ereg_replace([^0-9a-zA-Z.],,$filename) Or something like that. On 5/28/03

Re: [PHP] thumbnails

2003-05-29 Thread bbonkosk
Hello, I did a family photo gallery, and from my experiences it would be best if you handle the thumbnail generation during the upload process. Just make sure you have a naming convention or link the thumnail into your repository/DB so you don't loose that space when you delete the record.

Re: [PHP] sessions and domains

2003-05-29 Thread CPT John W. Holmes
You'd really only have to pass the session ID to the other domains, since all of the session files are located in the same directory. So, when linking to one of the other domains, just include SID in the URL or form. Should be painless. echo 'a href=http://www.otherdomain.php/page.php?'.SID.'Link

[PHP] Re: [otro] [PHP] Re: Error with directories

2003-05-29 Thread j0rd1 adame
On Wednesday 28 May 2003 03:07, Catalin Trifu wrote: Hi, It seems to me that a script from /var/www/wahtever/ includes a script called algo.php which can not be found by PHP, because, probably it is in the /var/www/ dir. Either you add /var/www/ to the php.ini

[PHP] Search Engines and Last-Modified Header (was: Variables don't pass...)

2003-05-29 Thread Wendell Brown
On Wed, 28 May 2003 09:31:11 -0500, Jay Blanchard wrote: I wouldn't go as far as using the auto_prepend_file. Neither would I in this case Jay.It was simply an example of what could be done, not necessarily what SHOULD be done. I did however, use auto_prepend_file in a .htaccess file for a

Re: [PHP] strtr question

2003-05-29 Thread CPT John W. Holmes
I want to remove unwanted characters from filenames of files uploaded to our server. I am currently using strtr to do this. I have a few characters that are being removed but I would also like a single quote to be removed if it is in the filename. I think it has to be escaped in the command

RE: [PHP] thumbnails

2003-05-29 Thread Edward Peloke
thanks for all the info, I am doing this project this week (hopefully) so I am sure I will have more questions! Eddie -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 28, 2003 7:14 AM To: Edward Peloke; [EMAIL PROTECTED] Php. Net Subject: Re:

[PHP] session_registered issue

2003-05-29 Thread César Aracena
Hi all, I have no problem with registering a session. As a matter of fact, I making a site where I register 3 different levels of sessions with no problem. The thing is when, in my header.inc (which includes session_start(); for all the site) I tell through PHP only to show the login form ONLY

Re: [PHP] thumbnails

2003-05-29 Thread Dallas Goldswain
Hi , I have mailed you some code i use to make thumbnails etc. It only manipulates the image once, then stores a thumb and streams it to the page when requested Regards Dallas Goldswain Technical Director Web|Genetics / www.development.co.za Regards [EMAIL PROTECTED] wrote in message

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Jason Wong
On Wednesday 28 May 2003 20:11, Adnan wrote: i have been having trouble working out how to upload an image, the most progress ive made is putting a blank file on the server, but thats it, any suggestions anyone?? If you're wanting to do HTTP uploads then manual Handling file uploads tells

Re: [PHP] Session Question

2003-05-29 Thread Pushpinder Singh Garcha
Hello Ernest, SInce register_globals() is ON on my server, I need to be able to figure out a way to ensure session security. Another question I had was that, with register_globals() ON can I still use the $_SESSION to set my variables ? I want to avoid recoding the entire application, so I

[PHP] Resending POST Variables

2003-05-29 Thread Shaun
Hi, I have a page which uses POST variables sent from a form. If a user clicks on a link on this page is it possible to send those POST variables to the next page aswell? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Resending POST Variables

2003-05-29 Thread David Grant
Shaun wrote: Hi, I have a page which uses POST variables sent from a form. If a user clicks on a link on this page is it possible to send those POST variables to the next page aswell? You can send them by tagging them to the end of the link, or saving them into a session, but you can't (for

Re: [PHP] Resending POST Variables

2003-05-29 Thread Adam Voigt
form name=form1 method=post action=nextpage.php ?php foreach($_POST AS $key = $value) echo input type=\hidden\ name=\$key\ value=\$value\; ? /form a href=javascript:document.form1.submit();Submit Again/a Like that? On Wed, 2003-05-28 at 12:22, Shaun wrote: Hi, I have a page

RE: [PHP] Resending POST Variables

2003-05-29 Thread Wim Paulussen
You can do this either by sending 'hidden' input and store the POST value in the 'hidden' input or by storing the variables in a session. At least , that is what I do and it works for me. -Oorspronkelijk bericht- Van: Shaun [mailto:[EMAIL PROTECTED] Verzonden: Wednesday, May 28, 2003 6:23

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adnan
Jason Wong wrote: On Wednesday 28 May 2003 20:11, Adnan wrote: i have been having trouble working out how to upload an image, the most progress ive made is putting a blank file on the server, but thats it, any suggestions anyone?? If you're wanting to do HTTP uploads then manual

RE: [PHP] Session Question

2003-05-29 Thread Wim Paulussen
You should be able to use $_SESSION with register_globals on. citation from manual If you want your script to work regardless of register_globals, you need to use the $_SESSION array. All $_SESSION entries are automatically registered. If your script uses session_register(), it will not work in

Re: [PHP] Resending POST Variables

2003-05-29 Thread Shaun
ok, basically this is so I can implement page numbering on my search results, the user submits the form and I want to be able to send the form results back to the same page when the user clicks 'next' or 'previous'. I have tried putting this at the top of the page: $_SESSION['post'] = $_POST;

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adam Voigt
If your running under linux/unix, do: chown webuser:webuser /tmp/php Supplement /tmp/php with whatever upload path you have set in your php.ini, and webuser with whatever user your webserver runs as. On Wed, 2003-05-28 at 12:33, Adnan wrote: Jason Wong wrote: On Wednesday 28 May 2003

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adnan
Adam Voigt wrote: If your running under linux/unix, do: chown webuser:webuser /tmp/php Supplement /tmp/php with whatever upload path you have set in your php.ini, and webuser with whatever user your webserver runs as. On Wed, 2003-05-28 at 12:33, Adnan wrote: Jason Wong wrote:

Re: [PHP] Resending POST Variables

2003-05-29 Thread Tom Woody
On Wed, 2003-05-28 at 11:38, Shaun wrote: ok, basically this is so I can implement page numbering on my search results, the user submits the form and I want to be able to send the form results back to the same page when the user clicks 'next' or 'previous'. I do the very same thing as you,

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adam Voigt
Hmm, what's the exact error message you get? On Wed, 2003-05-28 at 12:43, Adnan wrote: Adam Voigt wrote: If your running under linux/unix, do: chown webuser:webuser /tmp/php Supplement /tmp/php with whatever upload path you have set in your php.ini, and webuser with whatever

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adnan
Adam Voigt wrote: Hmm, what's the exact error message you get? On Wed, 2003-05-28 at 12:43, Adnan wrote: Adam Voigt wrote: If your running under linux/unix, do: chown webuser:webuser /tmp/php Supplement /tmp/php with whatever upload path you have set in your php.ini, and

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adam Voigt
Call me an optimist but if you don't get any error's, that usually means it worked. You do know that the uploaded file is erased when the page ends right? You have to use a call to move_uploaded_file to actually put it somewhere on the file system. On Wed, 2003-05-28 at 12:53, Adnan wrote:

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adnan
Adam Voigt wrote: Hmm, what's the exact error message you get? On Wed, 2003-05-28 at 12:43, Adnan wrote: Adam Voigt wrote: If your running under linux/unix, do: chown webuser:webuser /tmp/php Supplement /tmp/php with whatever upload path you have set in your php.ini, and

[PHP] skipping occurance in regex

2003-05-29 Thread Brian V Bonini
how can you skip the first occurance and stop at the second in a regex? table id=xxx tr td table tr tdcontent1/td /tr /table /td /tr tr tdcontent2/td /tr /table If I wanted to grab all that from within a document I know I can start at table id= because

[PHP] Checking Client's Cipher Strength with IIS

2003-05-29 Thread Ed Gorski
Hello, I have a question who's answer has been bugging me for a while. What I need to do is write a script that detects if a browser is using 128-bit encryption when connecting to our website. While this is easy for most (I have the script working for them), a real problem for me has come up

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adam Voigt
I think what you want is: move_uploaded_file($_FILES['imagefile']['tmp_name'],$ftpdir . $_FILES['imagefile']['name']); (Apologies if it wraps, that should be all one line.) On Wed, 2003-05-28 at 12:58, Adnan wrote: Adam Voigt wrote: Hmm, what's the exact error message you get? On

[PHP] Create Links on the fly?

2003-05-29 Thread Chase
Salutations! I am trying to do something fairly simple, but I can't seem to make it work... I want to have a form field on a page that the user will put in a 3 to 5 digit number and when they click on Submit that number will become part of an URL that they are forwarded to. For example, if the

Re: [PHP] Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adnan
Adam Voigt wrote: I think what you want is: move_uploaded_file($_FILES['imagefile']['tmp_name'],$ftpdir . $_FILES['imagefile']['name']); (Apologies if it wraps, that should be all one line.) On Wed, 2003-05-28 at 12:58, Adnan wrote: Adam Voigt wrote: Hmm, what's the exact

[PHP] Re:[PHP] Re: About Guest Book's messages....

2003-05-29 Thread fongming
Thanks ,hui: style=TABLE-LAYOUT:fixed ^ it won't work It just disappeared and hide the text, it didn't cut the line to suitable for the table ,and it didn't force the texts down to the next line. It didn't. but thanks again do it in your html code, you

[PHP] Re: ANY POSTNUKER? Security problem!

2003-05-29 Thread Shawn McKenzie
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It is also a simple drop-down box setting in the admin / settings. - -Shawn Nabil [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] i have problem with session in postnuke. the problem is that while i m logged in as a user, if i closed

Re: [PHP] My Sincere Request!![Scanned]

2003-05-29 Thread bob parker
I have three points in response to this thread. 1. This is the an example of the Nigeria 419 scam. I have no idea how it got the 419 in the name. What they want from your is you bank account details so that they can remit the money out of the country and you supposedly get to keep your share.

[PHP] Re: Create Links on the fly?

2003-05-29 Thread Bobby Patel
###HTML snippet form action = redirect.php Enter Number : input type=text name=number /form ###PHP ?php $number = $HTTP_POST_VARS['number']; # or $_POST['number']; depnding on PHP version header (Location: http://www.mypage.com/.$number); exit(); ? ### NOTE: I just wrote this on the fly so

RE: [PHP] Session Question

2003-05-29 Thread Johnson, Kirk
SInce register_globals() is ON on my server, I need to be able to figure out a way to ensure session security. The single most important thing to do is initialize all your variables. The way to ensure that you have done that is to set the error reporting level to E_ALL (which is max). The

[PHP] Re: Trouble With FTP_PUT Please Help!

2003-05-29 Thread Adnan
Hi, just to let you know i've sussed it out, i didnt realise that the destination directory had to be on the system, rather than on the site thank you very much for ur help and time adnan Adnan wrote: Hi, i have been having trouble working out how to upload an image, the most progress ive

[PHP] Jpgraph troubles

2003-05-29 Thread Jordan Elver
Hi, I've been creating some graphs using jpgraph and they work really well when I view them directly i.e. directly through the script. My problem comes as soon as I try to display them using the img tag within another page. When I do: img src=graph.php / I can't get it to display. It just

[PHP] PHP Rocks! ..OT..

2003-05-29 Thread Wendell Brown
I had completely forgotten how much more hassel CGI / Perl is when compared to PHP. I just got done doing a MINOR mod to a Perl script (it took me about 4 hours compared to what would have taken me about 10 minutes in PHP) and I just want to say THANK YOU to all the PHP developers! :) -- PHP

Re: [PHP] Jpgraph troubles

2003-05-29 Thread Wendell Brown
On Wed, 28 May 2003 19:00:20 +0100, Jordan Elver wrote: I can't get it to display. It just shows the broken image icon. I assume you are sending something similar to the following before the actual pic? header(content-type: image/png); I have a script set up on my page that demonstrates using

[PHP] Dealing with spam on the list - please read

2003-05-29 Thread Rasmus Lerdorf
Folks, occasionally the odd spam message is going to slip through our various safeguards and spam will go out on the PHP lists. We are working on improving things on our end to reduce the amount that slip through, but we also need your help with the following: 1. Do not respond to the list

[PHP] rand() function not working right

2003-05-29 Thread ldg
I'm using the latest php and the rand() function isn't working properly when giving it any min and max arguments. It does work without anything between the () but if I put a min and max, then only the min value always gets chosen. Is that a bug? Is that new? I'm not using an old php version, and

[PHP] detect proxy

2003-05-29 Thread Miguel Angelo
Hi Sonjaya, Here is how i detect a proxy / user external ip and internal ip I use the global variable catched by PHP from the web server, the web server that i use is Apache i don't know about your's but it might work. There are tonns of available information here is some that i

[PHP] CleanUp!!

2003-05-29 Thread Erich Kolb
How can I clean this up? $in_file = http://somedomain.com/somefile.php; $out_file = ereg_replace(http://;, , $in_file); $out_file = ereg_replace(/,-, $out_file); $out_file = /www/dev/.$out_file; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Jpgraph troubles

2003-05-29 Thread Jordan Elver
I assume you are sending something similar to the following before the actual pic? header(content-type: image/png); Jpgraph does that for you I think. As I said before, the script works when you access it directly, but not when it's through an img tag. -- Jordan Elver There may be no 'I' in

Re: [PHP] CleanUp!!

2003-05-29 Thread Matt Grimm
First, make sure to use str_replace whenever possible instead of ereg_replace. It's faster: $out_file = str_replace(http://;, , $in_file); etc... -- Matt Grimm Web Developer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Parkway Anchorage, AK 99508 907.770.6200 ext.

[PHP] Help with fread

2003-05-29 Thread Erich Kolb
How can I get statistics from a remote file? I am trying to get info on: FileSize Date Created Date Modified when: fopen (http://somedomain.com/somefile.ext;, r) Also, I am unable to use filesize function where $fp = fopen(http://somedomain.com/somefile.ext;, r). Is it possible to do this, or

[PHP] Re: Help with fread

2003-05-29 Thread Catalin Trifu
Hi, As the PHP manual states you CAN NOT use filesystem functions, such as filesize, filectime, etc... on remote files, such as those opened opened through HTTP. You can however rely on the FTP functions, if you can use FTP to open the files. Cheers, Catalin Erich Kolb [EMAIL

[PHP] Appending to the REQUEST_URI

2003-05-29 Thread Matt Grimm
Let's say I have a table with links in the headers for sorting each column. I want to carry the sort variable along in the $_GET array, and I need to be able to pass other variables to this same page, also using the GET method. My trouble is when I need to append a new variable to the

[PHP] Checking if an array key exists

2003-05-29 Thread James Kaufman
I have a multi-dimensional array. Looks like this: $work_order_hdr = array ('whdr_id'='record_no', 'whdr_order_no'='request_no', 'whdr_site_id'='site_id', 'whdr_user_id'='user_id',

Re: [PHP] Checking if an array key exists

2003-05-29 Thread CPT John W. Holmes
I have a multi-dimensional array. Looks like this: $work_order_hdr = array ('whdr_id'='record_no', 'whdr_order_no'='request_no', 'whdr_site_id'='site_id', 'whdr_user_id'='user_id',

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread CPT John W. Holmes
You have to check for it, regardless. See if this works for you. $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] . '' : '' ) . 'newVar=1'; The middle part basically sees if the QUERY_STRING is empty. If it is, it includes a question mark

[PHP] PHP Fusebox - Circuit within another Circuit

2003-05-29 Thread Christopher Ditty
We are using PHP Fusebox to develop one of our applications where I work. I have a descent-grasp on the whole fusebox concept, but I am having problems getting my head around how sub-circuits work. Can anyone offer any advice? When I go to the main fuseaction, all works fine. When I try to go

[PHP] Netbilling Connect Script or Class...

2003-05-29 Thread Ralph
I have to setup credit card verification/processing with Netbilling.com, does anybody know of a PHP based Netbilling connect script or class? Your help is appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread CPT John W. Holmes
Replying to myself... :) You have to check for it, regardless. See if this works for you. $url = $_SERVER['REQUEST_URI'] . '?' . ((isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] . '' : '' ) . 'newVar=1'; The middle part basically sees if the QUERY_STRING is empty. If it is, it

Re: [PHP] Jpgraph troubles

2003-05-29 Thread John S. Huggins
On Wed, 28 May 2003, Jordan Elver wrote: -Hi, -I've been creating some graphs using jpgraph and they work really well when I -view them directly i.e. directly through the script. My problem comes as soon -as I try to display them using the DEFANGED_IMG tag within another page. When I do: -

RE: [PHP] Variables don't pass... *sniff*

2003-05-29 Thread Evan Nemerson
Deprecated means that it has fallen out of favor, and is _in_the_process_of_being_phased_out_ You should not rely on this code in new applications. Go look it up in a dictionary. If you have to be backward compatible with 4.1.0 (which was released on 10-Dec-2001!) I suggest something like this:

Re: [PHP] Appending to the REQUEST_URI

2003-05-29 Thread Matt Grimm
Yes, thanks John, with a little tweaking this does just what I needed. I keep forgetting to use that compact conditional syntax, it's sexy. I had to use PHP_SELF instead of REQUEST_URI first, since the latter contains the path, the script, and the query string. $url = $_SERVER['PHP_SELF'] . '?'

Re: [PHP] Jpgraph troubles

2003-05-29 Thread Jordan Elver
I can see what headers are sent. What is the url of the image? I checked using curl -I and found that the correct headers are being sent. I found out it was because I didn't have a certain library I needed included within the graph script. Thanks for your help anyway, Cheers, Jord -- Jordan

[PHP] Does array_rand need to be seeded?

2003-05-29 Thread Matt Grimm
The manual entry for array_rand states: Don't forget to call srand() to seed the random number generator. However, the srand page states this: Note: Since PHP 4.2.0 it's no longer necessary to seed the random number generator before using it. Is the 'random number generator' identical for all

[PHP] replacing register_shutdown_function

2003-05-29 Thread Brian Moon
Hi all, Ever since register_shutdown_function was changed to no longer happen after the connection was closed, several things on our site have started to suck. Not the main, public site, but our internal pages where cache is regenerated and such. I have tried using the pcntl functions in an

[PHP] re: quantifiers not working in ereg.*

2003-05-29 Thread matze
On Sunday 25 May 2003 20:42, matze wrote: on a redhat 8.0 box with php 4.1.2 rpm (from rh v7.2) installed the ereg.* functions don't work as i expect. in some cases - especially when \r\n sequences are involved - the ereg functions don't match a string, although they should. i tested with

[PHP] Decrypting data with GnuPG

2003-05-29 Thread Pierre-Luc Soucy
Hi, I would like to decrypt data encoded with GnuPG without including the private key passphrase in the command to prevent people from viewing it with ps. Here is the code I wrote: $command = /usr/bin/gpg --homedir=/path/to/.gnupg --no-secmem-warning --always-trust --yes --output

[PHP] Biding Arrays from Oracle Stored Procedure to PHP Variables

2003-05-29 Thread Gregory Watson
Hi guys... I'm very new to using Oracle and stored procedures. I'm using a stored procedure to return 12 variables, 8 of which are arrays. ?php $EventID = 41403; $BufferSize = 3000; $connection_oracle = OCILogon(,**, **); $statement_oracle = OCIParse($connection_oracle,

[PHP] Parsing html to extract images

2003-05-29 Thread Hidrahyl
Hi, anyone can help me parsing html files in order to get all the images containing a file? Thanks, Simon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session_registered issue

2003-05-29 Thread César Aracena
Hi Jim, To solve the problem about caching I use two methods: In design stage, I simply turn off the Automatic Refresh Page in my Explorer options and, in working stage I use once a jscript to prevent the hole site from caching and the visitor´s brwsers think that it´s allways refreshing... use

[PHP] Help with eval()

2003-05-29 Thread zavaboy
Hey, I'm having problems with the eval() function... if ($Sort == Up) { $do==; } else { $do==; } for ($i = $aNum; eval ('$i ' . $do . ' $bNum'); ) //So.. the above line acts like: //for ($i = $aNum; $i = $bNum; ) //...or... //for ($i = $aNum; $i = $bNum; ) { i if ($Sort == Up) { $i++; } else {

Re: [PHP] detect proxy

2003-05-29 Thread sonjaya
dear sir sorry if my english bad, my question is , any body now script to detect ip(internet protocol) to web us . exsample : your ip is 192.168.1.1 , i get this $ip(REMOTE_ADDRES) , but this script just for main ip i want client ip because i use proxy , how we can detect, i want like this

Re: [PHP] Create Links on the fly?

2003-05-29 Thread Justin French
if you wish to have this work purely with PHP, and not rely on client-side stuff like javascript, then your only option (that i can see) is to create a middle man script which translates their wishes. startpage.html --- html ... form action='redirect.php' method='post' input type='text'

Re: [PHP] How can I change the timezone?

2003-05-29 Thread Justin French
on 28/05/03 11:49 PM, Jay Blanchard ([EMAIL PROTECTED]) wrote: [snip] I am in Hong Kong and the server is in US. I can't change the server setting. [/snip] How about getting the server time and then adding or subtracting from that to get the appropriate time?

[PHP] PHP OOP x Procedural Performance

2003-05-29 Thread William N. Zanatta
It is a known issue that function calls are expensive for the processor. The OOP let us better organize the code but, thinking in function (or method) calls it may be more expensive than in the procedural form. My question is, has anyone made any tests regarding the performance of OOP

Re: [PHP] Session Question

2003-05-29 Thread Justin French
Register globals essentially takes the value of $_SESSION['foo'] and creates $foo. It does the same thing for GET, POST, COOKIES, etc. The problem here is that you have no way of telling if $foo was a POST variable, GET, SESSION, or whatever. So, I can choose to append ?admin=1 to one of your

[PHP] Notice: Undefined variable: PHP_SELF

2003-05-29 Thread Dandie
Hi, I am having problem with a PHP page on our web site. I've installed the latest version of PHP on a Windows 2000 server. The error we're getting is: Notice: Undefined variable: PHP_SELF Where do I start to fix this problem? Thanks -- PHP General Mailing List (http://www.php.net/) To

[PHP] creating thumbnails from .BMP files

2003-05-29 Thread Artoo Smith
Hey, How do you create thumbnails from .BMP files? Is there a function like there is for JPG (ImageJPEG)? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP OOP x Procedural Performance

2003-05-29 Thread Ray Hunter
yes, the bottom line is code reuse...that is why there is oop. So that a developer can always reuse code saving money on development and thus if speed is an issue then adding more hardware. -- Ray On Wed, 2003-05-28 at 20:05, William N. Zanatta wrote: It is a known issue that function calls

  1   2   >