Re: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread John W. Holmes
PHP User wrote: Hi, I have been trying to format the textarea output and have come across some code that almost does what I need, but I still have one small problem. Look at the text below that was input into my textarea: Now is the time for all young men to come to the aid of the party. Now is

Re: [PHP] track click throughs

2004-07-16 Thread cab
Ed, Thank you found it with your help. Cheers Col Ed Lazor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Check the script that records the click. It shouldn't have any output, spaces, or extra lines before or after ?php ? -Original Message- From: cab [mailto:[EMAIL

Re: [PHP] track click throughs

2004-07-16 Thread cab
Ed, Sorry it redirects now but on checking the database is no longer being updated? ?php require_once('/home/virtual/site/var/www/cgi-bin/Connections/DB_connection _script.php'); $newUserTracking = mysql_query(INSERT INTO track (user,type) VALUES (' ','Join')); Header(Location:

[PHP] Using SSL and PHP

2004-07-16 Thread Harlequin
Hi everyone. We've recently decided to move all our PHP pages to an SSL server. Can anyone give any advice on any caveats I should be aware of...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP General Mailing List

RE: [PHP] Using SSL and PHP

2004-07-16 Thread Ed Lazor
You add an S to http ;) Beyond that, some servers allow one webspace for your files and encryption is based on whether you specify the S or not. Some servers have separate directories for http and https files. -Original Message- Hi everyone. We've recently decided to move all our

[PHP] How To capture WebCam

2004-07-16 Thread khuram noman
Hi everyone Is there any body woh knows how to capture web cam in php i need some tutorial / code that helps me in this regard.waiting for soon reply Thanks Khuram __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage!

Re: [PHP] track click throughs

2004-07-16 Thread Daniel Kullik
mysql_query() should return a boolean true if your insert-query works. Check that. [code] print (mysql_query('insert bla...')) ? '(-:' : ')-:'; die(); [/code] Cab wrote: Ed, Sorry it redirects now but on checking the database is no longer being updated? ?php

[PHP] Trouble with include/require

2004-07-16 Thread A. Lanza
Hi list, i'm trying to include files in my php scripts but things seem not to work properly. In my script, i include a file like this: ?php include 'includes/db.inc' ? I have all include files in includes directory, that's a children of the directory where my scrips are. The include_path

Re: [PHP] image

2004-07-16 Thread Frank Holtschke
Php wrote: like i call an image if the img tag but instead of loading the image it loads a php script did you send the mime-type header first? Something like: header(Content-Type: image/png); Then you can do an include of the image or something like that. Jason Wong [EMAIL PROTECTED] wrote in

Re: [PHP] problem including images in safe_mode

2004-07-16 Thread Frank Holtschke
Jason Wong wrote: On Thursday 15 July 2004 23:30, Frank Holtschke wrote: Even if you could prevent an included file from being parsed, I can't see how it would help you as you can't assign the contents to a variable. But you say that you sometimes have problems which implies that sometimes it

[PHP] Re: Trouble with include/require

2004-07-16 Thread Daniel Kullik
You should not overwrite the whole include-path. Just append new paths. This should do: [code] // Expand include-path (';' on Windows) $sep = ('WIN' == substr(PHP_OS, 0, 3)) ? ';' : ':'; ini_set('include_path', ini_get('include_path') . $sep . dirname(__FILE__) . 'includes/'); [/code] Daniel A.

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread A. Lanza
In fact, i'm not changing the include_path in my code, just uncommented the line in php.ini configuration file. Do i have to set include_path in code? Where in code should i put that piece of code setting include_path? Is there any simple way to include files using relative paths from the ones

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Daniel Kullik
Does your PHP-interpreter parse .inc files at all? Did you get any error-messages? If not, set your error-reporting level to E_ALL any force PHP to display errors on screen. [code] error_reporting(E_ALL); ini_set('display_errors', true); [/code] Place this code before your include() call. PHP

[PHP] Getting the primary key from a MySQL insert

2004-07-16 Thread Andrew Wood
If the primary key in a MySQL DB is an autoincrementing integer, is there anyway of automatically getting it back when I do an insert in PHP. In other words taking the status returned by mysql_query and extracting the PK of the record we just entered? -- PHP General Mailing List

[PHP] Re: Getting the primary key from a MySQL insert

2004-07-16 Thread Daniel Kullik
Here you can find an overview of all existing MySQL functions in PHP: http://www.php.net/mysql And this is the function you are looking for: http://www.php.net/manual/en/function.mysql-insert-id.php And please take your time to look at this posting:

Re: [PHP] Getting the primary key from a MySQL insert

2004-07-16 Thread Andrew Wood
Thanks. When it says 'the last insert' is that just the last insert my PHP script did, or the last insert on the DB as a whole? On 16 Jul 2004, at 11:40, [EMAIL PROTECTED] wrote: If the primary key in a MySQL DB is an autoincrementing integer, is there anyway of automatically getting it back

Re: [PHP] Getting the primary key from a MySQL insert

2004-07-16 Thread John W. Holmes
Andrew Wood wrote: Thanks. When it says 'the last insert' is that just the last insert my PHP script did, or the last insert on the DB as a whole? Read the links Daniel just sent out. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for

[PHP] Re: PHP and MySQL Installation on Apache for Windows

2004-07-16 Thread Ciprian Constantinescu
PHP doesn't detect anything. You need to have your mysql server running and you try with mysql_connect() or mysql_pconnect() to see if you can connect to the server Sean Vasey [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does anyone know how to get PHP to detect MySQL after it has

[PHP] Re: Dynamic to Static

2004-07-16 Thread rush
Ed Lazor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is anyone taking a dynamic PHP / MySQL site and storing or cacheing it statically in order for pages to display more quickly when visitors access the site? If so, what solutions are you using to achieve this? well, mysql query

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread A. Lanza
Still i cannot place my include files in a directory other than the same as my main scripts... I have scripts in /var/www/html/project/ directory. I would like to put the include files in /var/www/html/project/includes. How should i include them in the main scripts? I've tried the two following

[PHP] Re: Encrypting passwords from page to page -mcrypt question

2004-07-16 Thread Ciprian Constantinescu
Why don't you try POST instead of GET? This way the password will not be visible in the URL. Scott Taylor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I would like to go from page to page, submitting the password through a GET query string. Of course I wouldn't want to do this

[PHP] flash to image using PHP

2004-07-16 Thread Cosmin
Is it possible to convert a swf file(static, no animation) to an image format(jpeg or png preferably) using PHP? I have a flash script which chooses the colors for a logo and saves it a swf file and I need to transform it in an image file so I could I use it in a PDF file -- PHP General Mailing

[PHP] Checking for character absence with regular expressions

2004-07-16 Thread Rory McKinley
Hi List I am currently trying to check for the absence of certain substrings within larger strings using regular expressions. I know that I could use on of the string functions, but in the interests of flexibility I must use a regexp match of some shape or variety. Up until now, I have used

[PHP] Re: mysql connection question

2004-07-16 Thread Torsten Roehr
John Meyer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, For a long time, on all of my mysql pages, I've done something like this $conn = mysql_connect($server,$username,$password) or die(Could not connect) mysql_select_db($db); I've finally put that into its own script

[PHP] Re: Most used oop pattern to use for php application development?

2004-07-16 Thread Torsten Roehr
Brent Clements [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Good Evening All, I know this will probably start a flame war, but I want to get everyone's opinion on which oop pattern is either the accepted pattern or most used pattern for php application. I'm pretty partial to MVC but

Re: [PHP] Want to save png to file

2004-07-16 Thread Victor Spång Arthursson
2004-07-08 kl. 06.25 skrev Wudi: int imagepng ( resource image [, string filename]) Back on track again! What I don't know is how to save the file - do I read the datastream from imagepng and then create a file and write the stream to it? Sincerely Victor -- PHP General Mailing List

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Daniel Kullik
Using chmod 710 on your include-directroy and chmod 640 on your scripts might solve your file-permission problem. A. Lanza wrote: Still i cannot place my include files in a directory other than the same as my main scripts... I have scripts in /var/www/html/project/ directory. I would like to put

Re: [PHP] Got JavaScript error when using PHP's include()...

2004-07-16 Thread Scott Fletcher
It doesn't matter where because the webpage is loading, the JavaScript is not running while loading. It only run when the user click on the pop-up window. It worked fine if I use HTML/JavaScript only. Just that it doesn't work when I use PHP. FletchSOD Neal Owen [EMAIL PROTECTED] wrote in

Re: [PHP] Want to save png to file

2004-07-16 Thread Jason Wong
On Friday 16 July 2004 20:41, Victor Spång Arthursson wrote: 2004-07-08 kl. 06.25 skrev Wudi: int imagepng ( resource image [, string filename]) Back on track again! What I don't know is how to save the file - do I read the datastream from imagepng and then create a file and write the

Re: [PHP] Got JavaScript error when using PHP's include()...

2004-07-16 Thread Scott Fletcher
Okay, I still get this same error when I move the jsTest to before the function FletchSOD Neal Owen [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] You defined jsTest after the include where it should be before. On Thu, 2004-07-15 at 16:24, Scott Fletcher wrote: When an

Re: [PHP] Got JavaScript error when using PHP's include()...

2004-07-16 Thread Scott Fletcher
Oh never mind... I looked up at http://us3.php.net/manual/en/function.include.php and saw this... --snip-- When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file

[PHP] Re: including external C header files and libraries

2004-07-16 Thread Jason Barnett
Jeremy Booker wrote: I have a 3rd party SDK written in C. It includes a compiled .a file and a header file (.h). Is there any way that I can call the functions included in the SDK from within a php script? Regards, Jeremy Yes you can extend the Zend engine. You'll need to write an

[PHP] Re: How to tell if the file is already locked with flock()???

2004-07-16 Thread Jason Barnett
Scott Fletcher wrote: Hi! How do we tell if the file is already locked when someone use a flock() on the file?? FletchSOD Do you mean within PHP code? If that's the case then this is taken care of by the flock() function... it checks the file's status and based on the parameter(s) that you

[PHP] Re: How To capture WebCam

2004-07-16 Thread Jason Barnett
Please search google for tutorials, you can often find them when you use the right keywords. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread PHP User
Thanks for the info John, but your suggestion produces the same output. Look at the source below to see what it produces. Now is the time for all young men to come to the aid of the party. Now is the time for all young men to come to the aid of the party.br / brbr / brTestingbr / brbr / brNow

Re: [PHP] Got JavaScript error when using PHP's include()...

2004-07-16 Thread Curt Zirzow
* Thus wrote Scott Fletcher: When an include file contain plain JavaScript codes, with the echo command before and after the include file. I get the javascript error saying undefined jsTest... Anyone know why is that? With the information you've provided, jsTest is never accessed. So its

[PHP] Re: Embedded Email Directives

2004-07-16 Thread Manuel Lemos
Hello, On 07/15/2004 10:25 PM, Jordi Canals wrote: Dennis Gearon wrote: remove carriage returns to prevent embedded email directives In an other thread, I readed that sentence. I'm interested to find more information about that. I have some mail forms and want to make them as secure and

RE: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread PHP User
John, Something came to mind as soon as I sent my last email, and it seems to work. Not sure it will work in every circumstance but the few tests I tried seemed ok. This is what I did. I added the two following lines to my script. $text=str_replace(\n,br,$text); $text=str_replace(br /,,$text);

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Curt Zirzow
* Thus wrote A. Lanza: In fact, i'm not changing the include_path in my code, just uncommented the line in php.ini configuration file. Do i have to set include_path in code? Where in code should i put that piece of code setting include_path? Is there any simple way to include files using

Re: [PHP] Re: problem with super global '$_REQUEST'

2004-07-16 Thread Justin Patrin
It does. ;-) I was just throwing out an interesting piece of code. Honestly, I'm surprised that it doesn't segfault PHP. Good job, internals! On Thu, 15 Jul 2004 21:02:10 -0700, Dennis Gearon [EMAIL PROTECTED] wrote: I bet it would work, 'cause whenever $GLOBALS is 'print_r'd, Globals shows up

[PHP] SNMP traps generation

2004-07-16 Thread Alessandro Vitale
Hi all, does anybody know any good library (class|script) for generating SNMP traps wirtten in PHP? thanks in advance, A. *** Alessandro Vitale Jr. Software Engineer Tiscali International Network Spa +39 070 4601678 [EMAIL PROTECTED]

Re: [PHP] Checking for character absence with regular expressions

2004-07-16 Thread Matt M.
I need to check that the substring R (that's a space followed by an uppercase R) is not contained within my haystack. Just one way to do it: $strings[] = 'Blah Blah R 99.99'; $strings[] = 'Blah Blah R99.99'; $strings[] = 'Blah Blah 99.99CR'; foreach($strings as $value) { if

Re: [PHP] Most used oop pattern to use for php application development?

2004-07-16 Thread Justin Patrin
On Thu, 15 Jul 2004 23:57:59 -0500, Brent Clements [EMAIL PROTECTED] wrote: Good Evening All, I know this will probably start a flame war, but I want to get everyone's opinion on which oop pattern is either the accepted pattern or most used pattern for php application. I'm pretty

[PHP] Echoing Results in a Table

2004-07-16 Thread Harlequin
I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- PHP

Re: [PHP] Echoing Results in a Table

2004-07-16 Thread Justin Patrin
http://www.google.com/search?hl=enie=UTF-8q=HTML+tablebtnG=Google+Search On Fri, 16 Jul 2004 17:07:17 +0100, Harlequin [EMAIL PROTECTED] wrote: I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these

[PHP] quotes in text.

2004-07-16 Thread Ed Curtis
I'm having some difficulty with quotation marks, both single and double, input via a textarea in a form. Here's and example of text. Trying out the Special Character thing. Page 1 is the form. Page 2 is the data shown back to the user. original POST data is not touched. NO stripslashes

Re: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread John W. Holmes
PHP User wrote: Something came to mind as soon as I sent my last email, and it seems to work. Not sure it will work in every circumstance but the few tests I tried seemed ok. This is what I did. I added the two following lines to my script. $text=str_replace(\n,br,$text); $text=str_replace(br

Re: [PHP] Echoing Results in a Table

2004-07-16 Thread John W. Holmes
Harlequin wrote: I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? How would you show a table now with a single record? Start there. Now, what areas would need repeating with a

Re: [PHP] quotes in text.

2004-07-16 Thread John W. Holmes
Ed Curtis wrote: I'm having some difficulty with quotation marks, both single and double, input via a textarea in a form. Here's and example of text. Trying out the Special Character thing. Page 1 is the form. Page 2 is the data shown back to the user. original POST data is not touched. NO

RE: [PHP] Need help with line breaks in a textarea form

2004-07-16 Thread PHP User
John, If I just echo $text on the webpage now, everything shows as it should. HOWEVER, another problem I didn't even clue into until now. This form gets emailed to a specified address and all I get in my email is one long line with no line breaks. How do I fix this? I was reading a thread in a

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread Jason Barnett
That will try and find a file in these locations in order: /var/www/html/projects/include/db.inc ./db.inc /php/includes/db.inc And will use the first one found. I would not suggest using ini_set() inside you're scripts to adjust your paths. Curt Hey Curt, why do you suggest we don't use

Re: [PHP] Re: Trouble with include/require

2004-07-16 Thread raditha dissanayake
Jason Barnett wrote: I would not suggest using ini_set() inside you're scripts to adjust your paths. Hey Curt, why do you suggest we don't use ini_set to adjust paths? I'm using it as part of my library autoloader - it may not be as efficient as changing the path directly but it seems to work

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, John W. Holmes wrote: Let's say you have $_POST['text'] from the user. To display the value back to the user with magic_quotes_enabled, you'd do this: echo htmlentities(stripslashes($_POST['text'])); To put the value into a hidden form element, you'd do this:

[PHP] Re: Echoing Results in a Table

2004-07-16 Thread rush
Harlequin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I've managed to develop a query which pulls a finite number of records from a table based on a query. What commends do I now use to present these results in a table...? There are plenty of such advices, I assume google will

[PHP] mysqli prepapred SELECT statement

2004-07-16 Thread Support
Anyone working with php5/mysql 4.1 yet with the new ext/mysqli? This has me stumped: $stmt = $mysqli-prepare('SELECT * FROM users WHERE userid=?'); $stmt-bind_param('i', $userID); $stmt-execute(); ...now how to get the results??? I can't use bind_result() since I have no clue how many columns

[PHP] Security vulerability, any more detail info than this???

2004-07-16 Thread Scott Fletcher
Saw a website about security vulerability and there's no info on php.net that can describe more about it. So, anyone know? http://pcworld.co.nz/news.nsf/0/4D6AE0157B37ACDCCC256ED200693BB3?OpenDocument FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Security vulerability, any more detail info than this???

2004-07-16 Thread Scott Fletcher
Except that 4.3.8 cover the 4.3.7 issues Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Saw a website about security vulerability and there's no info on php.net that can describe more about it. So, anyone know?

[PHP] load data infile

2004-07-16 Thread Hull, Douglas D
I have a tab delimited file I am trying to load in my database using: LOAD DATA INFILE '/users/dbs/sites/phpmyadmin/gus/exptab.txt' INTO TABLE datable; But all it will load is the first record and I have about 2000 records. There are 20 columns of data in my 'exptab.txt' file I am loading and

[PHP] Putting $_POST into string to send to ASP

2004-07-16 Thread Jeff Oien
Dumb question, sorry if it's a repeat. I will use PHP for a form with error checking. When there are no errors I need to send all the variables thru something like this: $URL = https://example.com/script.asp?First=JimLast=Smith;; urlencode($URL); header(Location: $URL\n); How do I gather up all

Re: [PHP] Putting $_POST into string to send to ASP

2004-07-16 Thread Matt M.
How do I gather up all the variables in $_POST and attach them as a string after the question mark? Thanks. this is untested: $arr = array(); foreach($_POST as $key = $value) { $arr[] = $key.'='.urlencode($value); } $URL = https://example.com/script.asp?.implode('',$arr);

RE: [PHP] load data infile

2004-07-16 Thread Jay Blanchard
[snip] I have a tab delimited file I am trying to load in my database using: LOAD DATA INFILE '/users/dbs/sites/phpmyadmin/gus/exptab.txt' INTO TABLE datable; But all it will load is the first record and I have about 2000 records. There are 20 columns of data in my 'exptab.txt' file I am loading

Re: [PHP] Echoing Results in a Table

2004-07-16 Thread Harlequin
Thanks John. I managed to get what I wanted. Now I have a very neat table showing my results. Nice. Next conundrum is stuffing a dropdown menu with results. I'll post a new thread but have a dig around the Internet, many thanks John. -- - Michael Mason Arras

[PHP] Populating a Dropdown Menu From a Query

2004-07-16 Thread Harlequin
Another day another conundrum. I have a form where one option is a dropdown menu. I'd like that menu to only have items in it that are actually available. Selecting the items with a query is easy enough but I wondered if anyone could tell me where to start wit the code. Am I using a for each

Re: [PHP] Populating a Dropdown Menu From a Query

2004-07-16 Thread Matt M.
I have a form where one option is a dropdown menu. I'd like that menu to only have items in it that are actually available. Selecting the items with a query is easy enough but I wondered if anyone could tell me where to start wit the code. I dont know what kind of db so I will just use mysql,

Re: [PHP] Populating a Dropdown Menu From a Query

2004-07-16 Thread Arnout Boks
The exact implementation differs with your database system, but as an example for MySQL: select name=select size=1 ?php $result = mysql_query($query); while($row = mysql_fetch_assoc){ echo(option value=\{$row['name_of_value_field']}\{$row['name_of_description_field']}

[PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Lars Torben Wilson
Jeff Oien wrote: Dumb question, sorry if it's a repeat. I will use PHP for a form with error checking. When there are no errors I need to send all the variables thru something like this: $URL = https://example.com/script.asp?First=JimLast=Smith;; urlencode($URL); header(Location: $URL\n); How

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
How about (probably one of fifty solutions; Foreach($_POST as $k = $v) $vals[] = $k.=.$v; $strvals = urlencode(implode(,$vals)); Header(Location: https://example.com/script.asp?.$strvals); One thing to think about, URL's are limited in length, and one reason for using method=post is that they

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Lars Torben Wilson
Vail, Warren wrote: How about (probably one of fifty solutions; Foreach($_POST as $k = $v) $vals[] = $k.=.$v; $strvals = urlencode(implode(,$vals)); Header(Location: https://example.com/script.asp?.$strvals); One thing to think about, URL's are limited in length, and one reason for using

Re: [PHP] quotes in text.

2004-07-16 Thread Justin Patrin
On Fri, 16 Jul 2004 11:58:55 -0500 (EST), Ed Curtis [EMAIL PROTECTED] wrote: On Fri, 16 Jul 2004, John W. Holmes wrote: Let's say you have $_POST['text'] from the user. To display the value back to the user with magic_quotes_enabled, you'd do this: echo

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Jeff Oien
Thanks for the helpful examples. One other question. Is there an advantage to sending the URL via a header as opposed to doing http_post like this? http://shiflett.org/hacks/php/http_post Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
You could do that, but for one thing, it doesn't handle arrays. The code snippet in the user notes does. You are absolutely correct, but I'm not sure that ASP could handle arrays either. On the other side Matt M.s processing should work better than mine; foreach($_POST as $key = $value) {

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, Justin Patrin wrote: This is why he said: Since you seem to have magic_quotes_gpc enabled, you can put the value directly into your query. You shouldn't use htmlentities when putting it into the DB. Use it when displaying the text. I tried it both ways and it only

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Matt M.
Thanks for the helpful examples. One other question. Is there an advantage to sending the URL via a header as opposed to doing http_post like this? http://shiflett.org/hacks/php/http_post Jeff Like someone mentioned earlier. URL's have length limits. That would be one reason to do a post.

[PHP] PHP5 Install Version (Win32)

2004-07-16 Thread Ron Stiemer
Hello List, Does anybody got some information if there will be a Win32 Install Version of PHP5 like it exists for 4.3.8 ? Kind Regards, -Ron **Disclaimer: everything I post, will post and have posted, is subject to change without reason; any errors in logic, math or spelling is to assumed to

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
If the hack works, it should get around the length limitation of the URL, but I would be more tempted to use CURL for that. http://www.php.net/manual/en/ref.curl.php Warren Vail Warren Vail (415) 667-0240 SF211-07-434 -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]

Re: [PHP] Security vulerability, any more detail info than this???

2004-07-16 Thread John W. Holmes
Scott Fletcher wrote: Saw a website about security vulerability and there's no info on php.net that can describe more about it. So, anyone know? http://pcworld.co.nz/news.nsf/0/4D6AE0157B37ACDCCC256ED200693BB3?OpenDocument One more reason to not use strip_tags... like I really needed another,

Re: [PHP] quotes in text.

2004-07-16 Thread John W. Holmes
Ed Curtis wrote: On Fri, 16 Jul 2004, Justin Patrin wrote: This is why he said: Since you seem to have magic_quotes_gpc enabled, you can put the value directly into your query. You shouldn't use htmlentities when putting it into the DB. Use it when displaying the text. I tried it both ways and it

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Lars Torben Wilson
Jeff Oien wrote: Thanks for the helpful examples. One other question. Is there an advantage to sending the URL via a header as opposed to doing http_post like this? http://shiflett.org/hacks/php/http_post Jeff As mentioned a couple of times, size is one. But you still need to url-encode the data

[PHP] Problem with calculate

2004-07-16 Thread Rosen
Hi, I have following problem: I use some numbers from mysql table and other local vars to calculate one number. But on one calc I receive thath $value=4.5474735088646E-013; This must be zero (0) - I see all vars and calc then with calculator. I use function number_format($value, 2, ., ) and it

Re: [PHP] Problem with calculate

2004-07-16 Thread John W. Holmes
Rosen wrote: I use some numbers from mysql table and other local vars to calculate one number. But on one calc I receive thath $value=4.5474735088646E-013; This must be zero (0) - I see all vars and calc then with calculator. I use function number_format($value, 2, ., ) and it return me -0.00

Re: [PHP] quotes in text.

2004-07-16 Thread Ed Curtis
On Fri, 16 Jul 2004, John W. Holmes wrote: Ed Curtis wrote: On Fri, 16 Jul 2004, Justin Patrin wrote: This is why he said: Since you seem to have magic_quotes_gpc enabled, you can put the value directly into your query. You shouldn't use htmlentities when putting it into the DB. Use it

Re: [PHP] quotes in text.

2004-07-16 Thread Matt M.
Ok then, I want to know how to do it the right way but just using $_POST['text'], as stated before, in my query still cuts off the text at the quote. While passing this field between pages I don't do anything to it but when I want to show it to the user I would use

RE: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Vail, Warren
I believe we all missed something important here, but I've been wrong before. Notice his URL below, specifically the https part. I believe this means that the data not only needs to be URL encoded but SSL encrypted. I believe this makes a stronger case for using CURL, does it not? I also would

Re: [PHP] Problem with calculate

2004-07-16 Thread Rosen
Thanks ! abs() will not work for me, because I may have na negative numbers, but with round() it worked ! 10x John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Rosen wrote: I use some numbers from mysql table and other local vars to calculate one number. But on

[PHP] Re: PHP5 Install Version (Win32)

2004-07-16 Thread Lester Caine
Ron Stiemer wrote: Does anybody got some information if there will be a Win32 Install Version of PHP5 like it exists for 4.3.8 ? Personally I simply don't see the point :) Unzip the zip, tweak Apache and php.ini and I have what *I* want running in minutes. I don't want MySQL, I do use Apache2 so

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Jeff Oien
The client's vendor only specifies that it's field=data pairs and that it's URL encoded so I don't think that's an issue. But don't let that squelch any discussion. :) Jeff Oien Vail, Warren wrote: I believe we all missed something important here, but I've been wrong before. Notice his URL

Re: [PHP] Re: Putting $_POST into string to send to ASP

2004-07-16 Thread Justin Patrin
Thee is a PEAR package to do posts, gets, etc. http://pear.php.net/package/HTTP_Request On Fri, 16 Jul 2004 14:00:02 -0700, Vail, Warren [EMAIL PROTECTED] wrote: I believe we all missed something important here, but I've been wrong before. Notice his URL below, specifically the https part.

[PHP] convert degrees to heading

2004-07-16 Thread René Fournier
I have to write a little function to convert a direction from degrees to a compass -type heading. 0 = West. 90 = North. E.g.: from: 135 degrees to: NW Now, I was planning to write a series of if statements to evaluate e.g., if ($heading_degrees 112.5 $heading_degrees 67.5) {

[PHP] Re: convert degrees to heading

2004-07-16 Thread Tim Van Wassenhove
In article [EMAIL PROTECTED], René fournier wrote: I have to write a little function to convert a direction from degrees to a compass -type heading. 0 = West. 90 = North. E.g.: from: 135 degrees to: NW Now, I was planning to write a series of if statements to evaluate e.g., if

[PHP] Re: convert degrees to heading

2004-07-16 Thread Tularis
Here's a quick script I wrote for it: ?php $deg = $_GET['deg']; // get from URL, for testing atm $deg %= 360; // make sure it doesn't break on eg 560 degrees $deg = ((ceil(($deg-22.5)/45))*45+22.5); // break it up into parts we know, there might be an easier way though, just too tired to see it.

Re: [PHP] Re: convert degrees to heading

2004-07-16 Thread René Fournier
Works beautifully. Thanks! ...Rene On Friday, July 16, 2004, at 04:36 PM, Tim Van Wassenhove wrote: function degrees2compass($degrees) { $compass = array('N', 'NNW', 'NNE', 'NE', ...); $index = $heading_degrees / sizeof($compass); return $compass[$index]; } -- PHP General Mailing List

RE: [PHP] Re: convert degrees to heading

2004-07-16 Thread Vail, Warren
Well, isn't north really about 340 to 020 degrees? Looks like if you threw in a factor. Warren Vail -Original Message- From: René Fournier [mailto:[EMAIL PROTECTED] Sent: Friday, July 16, 2004 3:59 PM To: Tim Van Wassenhove Cc: php Subject: Re: [PHP] Re: convert degrees to heading

Re: [PHP] PHPEclipse?

2004-07-16 Thread robert mena
I have downloaded the latest .zip from source forge but it keeps giving me an error has occured when activating this view.. and hsow the php browser. eclipse 3.0, linux fedora core2, java 1.4.2_04-fcs -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Tiff to Jpeg conversion

2004-07-16 Thread Hardik Doshi
Hi Group, Can anyone suggest me a tool for converting Tiff image to JPEG image? Currently i am using the GD library for manipulating images and i didn't see any function which converts Tiff image to JPEG image. I notice Imagmagic support this feature. Please let me know if anyone has any idea

Re: [PHP] SNMP traps generation

2004-07-16 Thread franck
If you find something, it's interesting me !! Because of ASN1 encryption, it's hard to send a simple SNMP Trap with somes lines of code. Alessandro Vitale [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Hi all, does anybody know any good library (class|script) for

[PHP] PHP5 and pass by reference bug.

2004-07-16 Thread Daevid Vincent
So, I'm getting all these errors/warnings in PHP5 now saying that I have to put the on the function and not in the passing (which sorta makes sense and puts the burden on the function rather than the user, which I like too). So I spend the time to go and fix several thousand lines of code. Then

[PHP] using PHP script to simulate a login

2004-07-16 Thread Alex Shi
Hi, We have a web interface to do following: 1. login 2. check phone number (maybe thousands of) 3. logout. I am just wondering is it possible to use a php script to simulate the three steps? I understand that after login the web server will send a cookie to browser, so in that way a session

[PHP] Uploading a directory of files

2004-07-16 Thread Ryan Schefke
Does anyone have a script to upload a directory full of files? .something like a recursive upload. Thanks, Ryan

[PHP] php5.0.0(cli) + loose STDIN when using pcntl_alarm

2004-07-16 Thread franck
My goal is to parse apache log into a php piped program. I need pcntl_alarm to launch some function, while reading stdin. When exiting of pcntl_alarm function handler, i loose STDIN, php say it's a valid resource, but feof found, since data continu to be send into the pipe. With php5-rc1 it was

Re: [PHP] Uploading a directory of files

2004-07-16 Thread John W. Holmes
Ryan Schefke wrote: Does anyone have a script to upload a directory full of files? .something like a recursive upload. Not going to happen with PHP and an HTML interface. If you have PHP running on two machines and want to do this, then say so. -- ---John Holmes... Amazon Wishlist:

  1   2   >