[PHP] ignoring client supplied session data

2002-11-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm setting up a site using sessions right now, and I was just wondering if there is a way to ignore anything from the client side- I want them to POST a username and password, from there all data should be handled on the server. I'm already using t

Re: [PHP] ignoring client supplied session data

2002-11-27 Thread Evan Nemerson
This, in my mind, pervents someone from > supplying a key variable like $_session['logged_in']. This way they have > to know the username and password. > > Robbert van Andel > > > -Original Message- > From: Evan Nemerson [mailto:[EMAIL PROTECTED]] > Sent: Wednes

Re: [PHP] ignoring client supplied session data

2002-11-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm not worried about them using the query string for malicious purposes- I have register_globals off... I'm worried about someone messing with their cookie and sedding authorized to true- that _will_ change my $_SESSION variable, unless I can find

Re: [PHP] apache httpd-2.0.40-8 and scanning alternate extensions for php

2002-12-01 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Find the line that looks like "AddType application/x-httpd-php .php", and change it to "AddType application/x-httpd-php .php .html" On Sunday 01 December 2002 01:34 pm, Larry Brown wrote: > I just moved to a machine with RH8 that has their latest ve

Re: [PHP] phpMyAdmin : password and user (Help)

2002-12-01 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Try changing the username from "username" to "[EMAIL PROTECTED]" On Sunday 01 December 2002 01:21 pm, Iguider wrote: > Hi > Please I need a help, I used to work with asp and now I am migrating to > php, my site web works perfectly on my PC (windows).

Re: [PHP] header gives different results with post

2002-12-09 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are you trying to attach an additional results.csv, or are you trying to name the output (ie "test")??? If you're trying to name the output, changing Content-Disposition: attachment;filename="results.csv" to Content-Disposition: inline;filename="re

[PHP] SQL: INSERT using subqueries

2002-12-16 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First off, sorry it's a SQL question not PHP, but I don't subscribe to mysql-general (or whatever it's called), and I have a feeling someone on this list will be able to help... Anyways, my question is rather simple- how do I do an INSERT using a su

Re: [PHP] SQL: INSERT using subqueries

2002-12-16 Thread Evan Nemerson
I think if you omit the (owner, name), it thinks you want to fill the whole table, so by doing it this way you can specify only what you want to change. Thanks for your help, Ernest! - -Evan On Monday 16 December 2002 12:13 am, you wrote: > At 09:01 16.12.

[PHP] Disable session cookies

2002-12-20 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there any way to disable using cookies in sessions? I haven't found a good reason to do this, only my boss's predisposition against cookies ;). Thanks in advance, Evan - -- A leader is the wave pushed ahead by the ship. - -Leo Nikolaevich Tolst

Re: [PHP] Disable session cookies

2002-12-20 Thread Evan Nemerson
Sorry about the double post- I got an error message (which i now realize was from a mirror), so i tried again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] chown()

2003-01-22 Thread Evan Nemerson
what does posix_getlogin() return? perhaps you aren't really running the script as root... On Wednesday 22 January 2003 08:05 pm, Urb LeJeune wrote: > Has anyone had success in changing the ownership of a directory > for within a PHP script? I am running as root an have tries > exec() > passthru

Re: [PHP] total file size

2003-01-22 Thread Evan Nemerson
I can't think of a way to do this via PHP only- I'm pretty sure the file is sent in the POST request, therefore the page has not begun to output anything. Perhaps when you saw it done it was a java applet running in the browser? On Wednesday 22 January 2003 08:10 pm, Victor wrote: > Is there

Re: [PHP] Re: Mass Mailing

2003-01-22 Thread Evan Nemerson
Q If it delivers when possible, won't the server flake if it get's 100,000 emails inject into Qmail? If I was to use your class and loop through 100,000 emails into Qmail, will Qmail attempt all at once? A The answer was right above the question... "With qmail you do not have to run the queue lik

Re: [PHP] htpasswd

2003-01-22 Thread Evan Nemerson
Don't chmod .htpasswd- _huge_ security risk... Will your server allow you to have suid scripts??? If so, you can just write a little wrapper and make it suid. If you do that, I'd also reccomend using an extension other than PHP, and/or placing it outside your web root. Wouldn't want people addin

Re: [PHP] Why PHP doesn't work with Apache2?

2003-01-23 Thread Evan Nemerson
Albert Camus. Your sig has a quote attributed to "unknown". It was Albert Camus. Don't walk in front of me, I may not follow, Don't walk behind me, I may not lead, Just walk beside me, and be my friend. -Albert Camus On Thursday 23 January 2003 12:28 pm, Richard Baskett wrote: > Ok I am heari

Re: [PHP] Problems to compile php (cvs)

2003-01-26 Thread Evan Nemerson
I'll bet you're trying to mix v4 and v5... Make sure you're using the latest anoncvs instructions, as they have changed recently... On Sunday 26 January 2003 07:52 am, Robert Mena wrote: > Hi, I usually fetch php from cvs a couple of times in > order to try new features etc. > > Unfortunately s

Re: [PHP] content type header for downloading files

2003-01-28 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Change header("Content-Disposition: attachment; filename=".basename($fname).";"); to header("Content-Disposition: inline; filename=".basename($fname).";"); On Tuesday 28 January 2003 06:27 pm, Dara Dowd wrote: > I have the following headers in downlo

Re: [PHP] content type header for downloading files

2003-01-29 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Manually connect and request a page using HTTP echo -e "GET / HTTP/1.0\r\n\r\n" | nc server 80 works on many boxes... you may have to use telnet and actually type in the request instead of piping On Wednesday 29 January 2003 05:29 pm, Dara Dowd wrot

Re: [PHP] Base64 Encode

2003-02-01 Thread Evan Nemerson
What about $_GET['goto']??? Sounds like another register_globals issue. Also, instead of base64 encoding, you may want to use the rawurlencode and rawurldecode functions. On Saturday 01 February 2003 07:02 pm, Stephen wrote: > I have a PHP script that works on older versions of PHP but on 4.3,

Re: [PHP] quick echo output

2003-03-03 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 "There are four sets of tags which can be used to denote blocks of PHP code. Of these, only two ( and . . .) are always available; the others can be turned on or off from the php.ini configuration file. While the short- form tags and ASP-style tags

Re: [PHP] query strings(still broken)

2003-03-03 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 // UNTESTED $tArr = explode('&',$QUERY_STRING); foreach ( $tArr as $tVar ) { $a = explode('=',$tVar); ${rawurldecode($a[0])} = rawurldecode($a[1]); } ??? On Monday 03 March 2003 04:17 pm, Sunfire wrote: > tried everything except ses

Re: [PHP] XML Array

2003-07-15 Thread Evan Nemerson
I seem to remember seeing something like that on hotscripts.com... On Tuesday 15 July 2003 03:58 pm, Michael Smith wrote: > Hey, > > I'm looking for a function to take an XML file and turn it into a PHP > array with the same structure. So if I have: > > > #00 > image.jpg > > > I

Re: [PHP] Array key names - can they be called as strings?

2003-07-17 Thread Evan Nemerson
I kinda skimmed, but I think what you want is foreach ( array_keys($SAVEVARS) as $key ) $query = "update table set $key=$SAVEVARS[$key];"; On Thursday 17 July 2003 02:38 pm, Mike Morton wrote: > Perhaps I was not that clear on the subject :) > > I have the following array: > > $SAVEVARS

Re: [PHP] php4apache2.dll

2003-07-17 Thread Evan Nemerson
Well if phpinfo.php looks like , and when you view it through the server you get tons of data, PHP is working. If you just get , it's not. On Thursday 17 July 2003 02:28 pm, jsWalter wrote: > What part of phpinfo.php tells me that mod_php4 is loaded and running on my > Apache2/PHP 4.3.2 Win 2k

Re: [PHP] The stupidest question of the month.

2003-07-17 Thread Evan Nemerson
Since you don't need to put up a server, you can just use fsockopen. If I recall correctly, passing the timeout argument as 0 means no timeout... If you use the cli version of php, you can just enter `php -q myscript.php &` on the command line (doubt this works w/ m$...). The ampersand tells the

Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Evan Nemerson
Were you planning on incrementing $_SESSION['count'] anywhere? If not, try On Tuesday 22 July 2003 09:55 am, Joe Sheehan wrote: > Just noticed my email was messed up because of the html. Sorry > about that > > I've been using up until a day or so ago version 4.0.6. > I'm moving everything no

Re: [PHP] Arrays and Alphabetical order

2003-07-22 Thread Evan Nemerson
/* UNTESTED - and prolly could be more efficient */ $c = $d = ''; natsort($info); foreach ( $info as $i ) { $d = substr($i, 0, 1); if ( $d != $c ) echo "\n"; echo $i; $c = $d; } On Tuesday 22 July 2003 09:40 am, Don Mc Nair wrote: > Hi folks > > I a

Re: [PHP] php weirdness

2003-07-22 Thread Evan Nemerson
Does the cpu spike for all scripts or just this one. If just this one, can you narrow it down to a single line? On Tuesday 22 July 2003 08:50 am, Javier wrote: > Hi, I'm running PHP 4.3.2 (cgi-fcgi) (win32). > > Everytime I run a script from the command line: > php -q myscript.php > > The proce

Re: [PHP] Session Problems with 4.3.2

2003-07-22 Thread Evan Nemerson
no luck either. > Anyone have any idea what i'm doing wrong? I'm hoping its just > a user error. > Thanks in advance > > > > From: Evan Nemerson <[EMAIL PROTECTED]> > > >To: "Joe Sheehan" <[EMAIL PROTECTED]> > >CC: [EMAIL PROTECTED] &g

Re: [PHP] Unable to configure PHP5 on Linux

2003-07-28 Thread Evan Nemerson
Ya- you have to have libxml2-devel installed. Possibly http://rpmfind.net/linux/RPM/rufus/libxml/libxml2-devel-2.5.1-1.i386.html but check your distro cd first. Or you could rpm -e libxml2-2.5.1-1, get a tarball, and compile it yourself On Monday 28 July 2003 07:13 pm, Jonathan Villa wrote: >

Re: [PHP] foreach help

2003-07-30 Thread Evan Nemerson
Well you could do foreach ( $_POST as $var ) ${$var} = ( isset($_POST[$var]) ? 1 : 0); but that's really sloppy. If possible, I'd go more for something like $vars = Array( 'noPlatform', 'littlePlatform', 'lotsaPlatform', 'yoMommasaPlatform'); foreach ( $v

Re: [PHP] splitting content into pages

2003-07-30 Thread Evan Nemerson
Is there a reason this can't be solved with a CSS background-repeat: repeat-y; ? Or is download time of individual pages an issue? This is really a client-side issue. The math is going to vary depending on each user's settings- which font is used, the size of the font, random browser stupidity,

Re: [PHP] [PHP-WIN] http://www.zend.com/manual/function.memory-get-usage.php (fwd)

2003-07-30 Thread Evan Nemerson
Was php configured with --enable-memory-limit? function_exists('memory_get_usage')??? function_exists('get_memory_usage')??? Did the function even exist in 4.3.3 RC1? Why is your address @ unix-systems.net and you're asking about win32? On Wednesday 30 July 2003 04:36 pm, Miha Nedok wrote: > I

Re: [PHP] tags to lowercase

2003-07-30 Thread Evan Nemerson
Interesting timing... http://coggeshall.org/archives/e_65.html On Wednesday 30 July 2003 04:25 pm, Justin French wrote: > Sounds great, although I doubt my host will install... has anyone > considered such a beast running as a PHP function/class? > > Justin > > On Wednesday, July 30, 2003, at 02

Re: [PHP] Hash

2003-07-30 Thread Evan Nemerson
do you have something agains php.net/md5? php.net/crc32? php.net/sha1? They're all included in 4.3 On Wednesday 30 July 2003 07:40 pm, AECT Listas wrote: > Hi, > > How set up functions hash in php4.3.2 > > thanks > > _ > Charla con

Re: [PHP] splitting content into pages

2003-07-30 Thread Evan Nemerson
cters, (untested) background-repeat: repeat-y; Next page"; ?> On Wednesday 30 July 2003 07:44 pm, Chris W. Parker wrote: > Evan Nemerson <mailto:[EMAIL PROTECTED]> > > on Wednesday, July 30, 2003 7:17 PM said: > > Is there a reason this can't be solved wit

Re: [PHP] mcrypt mhash

2003-07-30 Thread Evan Nemerson
http://mcrypt.hellug.gr/ http://mhash.sf.net/ On Wednesday 30 July 2003 08:11 pm, AECT Listas wrote: > Hi, > > What is utility of mcrypt and mhash? > > Thanks, > > _ > Charla con tus amigos en línea mediante MSN Messenger: > http://m

Re: [PHP] System() works on /usr/sbin commands

2003-07-30 Thread Evan Nemerson
You usually need to be root to execute /usr/sbin/* check the permissions of the file you're trying to execute. On Wednesday 30 July 2003 11:13 pm, tirumal b wrote: > hello, > > i was using system function to invoke useradd > command but it doesn't work. well it works for all the > commands bu

Re: [PHP] Upload scripts timing out

2003-07-31 Thread Evan Nemerson
php.net/set-time-limit On Thursday 31 July 2003 09:03 pm, Josh Abernathy wrote: > My current upload script times out too quickly when users are uploading > large files. How can I stop this from happening? > > Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] Building an XML Parser Class

2003-08-08 Thread Evan Nemerson
Try getting rid of the quotes around $this->startElement, or changing them to double quotes. If you don't understand why, php.net/language.types.string should make for an exhilarating read :) On Thursday 07 August 2003 12:40 pm, Donald Tyler wrote: > Hi, > > I am trying to create a Class that

Re: [PHP] gzip to max 9

2003-08-11 Thread Evan Nemerson
try setting zlib.output_compression_level in your php.ini On Saturday 09 August 2003 09:42 am, Decapode Azur wrote: > Dear All, > > > function wrl2wrz($buffer) { return gzencode ($buffer, 9); } > ob_start("wrl2wrz"); > > /* here the file */ > > ob_end_flush(); # end of the output buffering > ?>

Re: [PHP] HTML equivalents of accented characters

2003-08-14 Thread Evan Nemerson
I think php.net/htmlentities will do this. On Monday 11 August 2003 11:18 am, Liam Gibbs wrote: > I don't think this has been discussed, although I'm not really sure what > you would call these accented characters, so I haven't been able to do a > complete search of the archives, so apologies if

[PHP] callback function in class

2003-08-14 Thread Evan Nemerson
Basic problem: I need to use preg_replace_callback, and would like the callback parameter to be a function in a class (the same as that which contains the call to preg_replace_callback). "classname::function" doesn't seem to work... Anyone have any ideas? If it helps: I'm creating a class whi

[PHP] Large sites running PHP (or Apache, or MySQL, or Linux)

2003-08-14 Thread Evan Nemerson
Hey everyone. I put a list of sites running LAMP components @ http://www.coeusgroup.com/qwik-e-wiki.php/lamp Could help people convince their boss/professor/friend/jealous spouse/whoever... It's a wiki, so everyone have a good time! -Evan -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] PHP vs ASP.NET "formal opinions" request

2003-08-14 Thread Evan Nemerson
Dunno if it will help, but here's a link to a thread I started a while back: http://marc.theaimsgroup.com/?l=php-general&w=2&r=1&s=convince+teh+boss&q=t Make sure you read the whole thread- a lot of people emailed more info than was originally posted. Also, check everything first- it's been a whi

Re: [PHP] callback function in class

2003-08-14 Thread Evan Nemerson
Never mind. I can create an anonymous function w/ create_function(), and use that as the callback. It's not pretty, but it works. Sorry about wasting everyone's time w/ a brain fart. -Evan On Friday 08 August 2003 06:16 pm, Evan Nemerson wrote: > Basic problem: >

Re: [PHP] Not fair: REMOTE_HOST

2003-08-19 Thread Evan Nemerson
$_SERVER['REMOTE_HOST'] = gethostbyaddr($_SERVER['REMOTE_ADDR']); better? On Tuesday 19 August 2003 01:18 pm, John Taylor-Johnston wrote: > Aw gee, $_SERVER['REMOTE_HOST'] (only REMOTE_ADDR) does not exist in PHP? > Bummer. > Why is that? -- "Everything has a natural explanation. The moon is

Re: [PHP] GPL question

2003-08-19 Thread Evan Nemerson
Smarty is LGPL, not GPL. The LGPL allows linking. So no. PEAR packages typically use the PHP license, but some do use GPL. If you link to a GPL'd package, you must GPL your package. Otherwise, no. So unless you link to a GPL'd PEAR package, the answer is no. Read: http://www.gnu.org/licenses/gp

Re: [PHP] Object Aggregation - does anyone have experience with it?

2003-03-26 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 my _guess_ would be you compiled w/ default (v1) zend engine. v2 has lots of improvements for oop- perhaps this is one of them. Try compiling with v2 of the engine and see what happens. On Tuesday 25 March 2003 02:44 pm, Christopher E. Welton wro

Re: [PHP] Uploading Files Via PHP

2003-03-26 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are you getting any errors through PHP? Set error reporting to E_ALL then try. On Wednesday 26 March 2003 04:41 pm, Vernon wrote: > Is there some thing that needs to be turned on in the php.ini in order to > be able to upload photos VIA php? I ha

Re: [PHP] Return Character in a Text File?

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 If you use \r\n instead of \n notepad should be fine. Winblows uses CRLF for everything... On Thursday 27 March 2003 10:07 am, Jay Paulson wrote: > I have a slight problem. Is there anyway to make a text file with a return > character that doesn't

Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You might wanna move ipaddr.log outside your server root... or at least use some .htaccess... wouldn't want someone to just browse to the file... $fp = fopen("ipaddr.log", "a+"); fputs($fp, $_SERVER['REMOTE_ADDR']."\n"); fclose($fp); On Thursday 2

Re: [PHP] character set problem

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 can you do a rawurlencode() on the data before you put it in the DB, and a rawurldecode when you suck it out? It's a hack, but it would prolly work fine. On Thursday 27 March 2003 09:46 am, Filip De Graeve wrote: > Hello, > > Using PHP 4.3.1 on a W

Re: [PHP] Excel

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not exactly, but http://pear.php.net/package-info.php?pacid=156 On Thursday 27 March 2003 05:47 am, Gabi Moise wrote: > Hi, > Can someone point me to a php and Excel tutorial? > > tnx. - -- First they came for the Communists, and I didn't speak up,

Re: [PHP] character set problem

2003-03-27 Thread Evan Nemerson
m just talking about a plain text string... > > is there anybody else who got any idea ? > thank you for your quick response... > > regards, > > Filip > > "Evan Nemerson" <[EMAIL PROTECTED]> schreef in bericht > news:[EMAIL PROTECTED] > > > -

Re: [PHP] Stupid question perhaps?

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 register globals is of in newer versions of php. you can re-enable it in the php.ini.. See http://www.php.net/manual/en/configuration.directives.php#ini.register-globals On Thursday 27 March 2003 10:57 am, Tom Tsongas wrote: > I just recently upgra

Re: [PHP] logging ip address when submitting a form

2003-03-27 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Not true- $_SERVER['REMOTE_ADDR'] doesn't rely on anything sent by the browser. Load up a phpinfo() on your server, then request it by hand... echo -e "GET /phpinfo.php HTTP/1.0\r\n\r\n" | nc www.yourserver.com 80 You'll see it has your IP address e

Re: [PHP] Redirec.t

2003-03-28 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 header("Location: http://www.domain.com/admin.php";); if you _really_ need to use your syntax, you could function redirect($uri) { header("Location: ".$uri); } On Friday 28 March 2003 03:28 pm, Johnny Martinez wrote: > Hi all, > Can someone tell m

Re: [PHP] Re: What program do you use to Create PHP Application?

2003-05-27 Thread Evan Nemerson
Nothing, except for the keyboard shortcuts are so damn addictive. I get out of emacs and it pisses me off that every application doesn't have that kind of power that easily accessible. Just like Opera & mouse gestures... On Tuesday 27 May 2003 06:56 am, David Grant wrote: > Joe Stump wrote: >

Re: [PHP] Anyone know of a php script to extract files from a zip file.

2003-05-27 Thread Evan Nemerson
http://dev.maxg.info/projets/projet.ziplib.en.maxg maybe??? haven't tried it On Tuesday 27 May 2003 12:16 pm, Al wrote: > I doing a little photos album application and I'd like my, non-techie, > users to be able to zip together their photos and upload them to a > folder on the site. I've got eve

Re: [PHP] secure code

2003-05-27 Thread Evan Nemerson
Good question! I rarely see this type of question here. http://www.dwheeler.com/secure-programs/ is a good one- even has a small section dedicated specifically to PHP The Shmoo Group has a good list at http://www.shmoo.com/securecode/ And if you're one of the learn by example of how not to do i

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] Decrypting data with GnuPG

2003-05-29 Thread Evan Nemerson
GnuPG doesn't use stdin to read the password, which is where you're sending it. It uses a more low-level interface (check out the below link if you're interested) where they interact directly with the virtual console. Try piping to your command- that won't work either echo $PASSPHRASE | \ /usr/bi

Re: [PHP] Decrypting data with GnuPG

2003-05-30 Thread Evan Nemerson
work. Any idea? I am unfortunately not familiar with C code, so I > can difficultly find solutions to my problems by reading the GnuPG source. > > Thanks! > > Pierre-Luc > > Evan Nemerson wrote: > > GnuPG doesn't use stdin to read the password, which is where you'r

Re: [PHP] request

2003-05-30 Thread Evan Nemerson
On Thursday 29 May 2003 01:24 pm, Marius wrote: > $random = gmp_random(10); > echo "$random"; > ?> > how to do that it echoes a random number and not a > Resource id #1, -- Happy shall he be, that taketh and dasheth thy little ones against the stones. -Psalms 137:9 -- PHP General Mailing

Re: [PHP] random

2003-05-30 Thread Evan Nemerson
"limiter" is the maximum number of limbs, not the max random number. A limb, according to the GMP documentation, is " the part of a multi-precision number that fits in a single word. (We chose this word because a limb of the human body is analogous to a digit, only larger, and containing several

Re: [PHP] general question

2003-05-30 Thread Evan Nemerson
"The php-gtk-general list is meant for general discussion about using PHP-GTK. To subscribe, send blank email to [EMAIL PROTECTED] The address of the list itself is [EMAIL PROTECTED] The list is archived at MARC. " - http://gtk.php.net/resources.php Try there- you'll prolly get a better answer

Re: [PHP] How to secure a download ?

2003-05-31 Thread Evan Nemerson
header("Content-type: application/zip"); header("Content-Disposition: attachment; filename=yourfilename.zip"); readfile("/path/to/yourfilename.zip"); On Friday 30 May 2003 03:34 pm, Vincent M. wrote: > Hello, > > Is there any way to launch a download of a Zip file to the user without > a link.

Re: [PHP] Function result is an array

2003-05-31 Thread Evan Nemerson
IMHO the function()[] syntax should be allowed, but it isn't. You could use list() or extract(), but then you'd wind up with a lot more date than you want. What I've been doing is creating a function, then calling when needed. For example: function array_get_value($array, $index) { retu

Re: [PHP] Using Cookies Securely

2003-05-31 Thread Evan Nemerson
Send a session ID to the user in a cookie, then lookup that ID in a database on the server. It's extremely difficult to guess random session ID's (don't just increment them!), and if you have a session timeout, you're pretty much set. It's not perfect, but I don't think anyone has come up with

Re: [PHP] Using Cookies Securely

2003-06-01 Thread Evan Nemerson
te: > On Fri, May 30, 2003 at 11:01:26PM -0700, Evan Nemerson wrote: > > Send a session ID to the user in a cookie, then lookup that ID in a > > database on the server. It's extremely difficult to guess random session > > ID's (don't just increment them!), and if

Re: [PHP] Compile 4.3.2 Errors.

2003-06-01 Thread Evan Nemerson
Don't know about 4.3.2, but at the end of 5.0-dev make, the following message is output: Build complete. (It is safe to ignore warnings about tempnam and tmpnam). On Saturday 31 May 2003 06:29 am, Volker Augustin wrote: > hi, > this sounds like a warning not like an error, your php is suc

Re: [PHP] reading binary data

2003-06-01 Thread Evan Nemerson
file_get_contents() is binary safe. $binary_data = file_get_contents("/path/to/file"); php.net/file_get_contents On Saturday 31 May 2003 12:42 pm, Ferhat BINGOL wrote: > Hi, > > I have binary data. I know the format but I do not know how to read it with > PHP. I saw some articles and comments o

Re: [PHP] get modification date of remote page

2003-06-01 Thread Evan Nemerson
/* UNTESTED. */ function get_http_lm_date($url) { $d = parse_url($url); if ( !$fp = fsockopen ($d['host'], (isset($d['port'])) ? $d['port'] : '80') ) return FALSE; fputs($fp, "HEAD ".$d['path']." HTTP/1.0\r\n\r\n"); while ( !feof($fp) ) {

Re: [PHP] reading binary data

2003-06-01 Thread Evan Nemerson
have any comment on this? > > And can you point me an example for file_read_contents??? > > regards > > > > "Evan Nemerson" <[EMAIL PROTECTED]>, iletide sunu yazdi > news:[EMAIL PROTECTED] > > > file_get_contents() is binary safe. > >

Re: [PHP] Adding a particalar POST value to a string

2003-06-02 Thread Evan Nemerson
Taking into account your earlier post: $string = ''; foreach ( array_keys($_POST) as $var ) { if ( !is_empty($_POST[$var]) ) { string .= $var.' '; } } trim($string); On Monday 02 June 2003 03:22 am, Shaun wrote: > Hi, > > I have many textfields on my page. How c

Re: [PHP] Needing Just a Little Advice!

2003-06-05 Thread Evan Nemerson
Try not hijacking threads. Other than that, this has been discussed several times in the past. Methinks a thorough scouring of the archives would be fruitful. On Wednesday 04 June 2003 01:18 pm, sevenfiftyflat wrote: > Hi! > > From any of you out there that managed to get a PHP script to > au

[PHP] New word proposition (was: Re: [PHP] HTML and PHP)

2003-06-05 Thread Evan Nemerson
Clode? I like it. Really, who wants to say "closing php tag", "terminating php tag", or whatever you say. Why not start calling it a clode? What does everyone else think? The only issue is if a "closing php tag" (or should it be a more general "closing tag", with php being able to serve as a mo

Re: [PHP] Detecting Bots...

2003-06-09 Thread Evan Nemerson
This should be helpful: http://www.robotstxt.org/wc/active/all.txt On Monday 09 June 2003 07:36 pm, Steven Kallstrom wrote: > Dear List, > > So $_SERVER['HTTP_REFERER'] gives us the User Agent... is there anyway > to determine if in general the User-Agent is a bot, or do I have to > check for a

Re: [PHP] PHP extensions and multiple source files?

2003-06-11 Thread Evan Nemerson
Good question, but wrong place for it. Ask [EMAIL PROTECTED] On Wednesday 11 June 2003 08:31 pm, Ed wrote: > Howdy folks! > > Is there a way to have multiple *.c source files and still end up with a > single *.so while using gcc? How would that be reflected in the config.m4 > file? > > I searche

[PHP] generate word docs

2003-06-24 Thread Evan Nemerson
Summary: I have to create a word document on the fly. what's the best way to go about it? Okay so I have a client that would like something output to a word document. I already have HTML and PDF versions... I'm trying to figure out the best way to do this. I am already aware of the open html in

Re: [PHP] secure sockets

2002-07-23 Thread Evan Nemerson
Patrick is right in that you can use CURL to do this, but as of PHP 4.3.0, you can use https:// if you have compiled in OpenSSL support. On Tuesday 23 July 2002 11:56 am, Josh Levine wrote: > I'm trying to connect to a Java application that's listening on a socket > using SSL. I am trying to

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Evan Nemerson
What do you guys think? Should we tell him he's running a vulnerable version of PHP _and_ of Apache??? On Tuesday 23 July 2002 16:26 pm, Andre Dubuc wrote: > Apache 1.3.23 + PHP 4.1.2 + PostgreSQl 7.2 > > I have a guestbook that I would like to display the current month's > entries. I can disp

Re: [PHP] Sorting db entries by Year-Month

2002-07-23 Thread Evan Nemerson
Yeah. Apache is vulneralbe to a buffer overflow in the chunked-encoding, and PHP has (i think) a buffer overflow in the multipart/form-data POST form handling. It might be a format string though... that just came out this week. yesterday, i think. For dev you might want to consider using the C

Re: [PHP] trim away x > 1 number of spaces from a strin

2002-07-24 Thread Evan Nemerson
php.net/str_replace On Wednesday 24 July 2002 02:05 am, Victor Spång Arthursson wrote: > Hi! > > Could someone help me with a replace that takes all occurances of " ", > that is space more than one, and replaces them with ""…? > > Sincerely > > Victor -- Go to Heaven for the climate, Hell for

[PHP] sorting multiple-dimensional arrays

2002-08-18 Thread Evan Nemerson
I have an array that looks like $array = Array( Array($var1, $var2, $var3), Array($var1, $var2, $var3), Array($var1, $var2, $var3) ); I want to sort the arrays within $array by $var3 (although if it helps i can easily change that to $var1). $var1 and $var2 are strings, $

Re: [PHP] save all vars in a url to a var?

2002-08-18 Thread Evan Nemerson
take a look at $QUERY_STRING. If that's not what you want, you should be able to find something in phpinfo(); On Sunday 18 August 2002 02:53 pm, you wrote: > is there some way to save all the info that is after the .php? in a var? > need that for a function on my page, but I have no idea what t

Re: [PHP] sorting multiple-dimensional arrays

2002-08-18 Thread Evan Nemerson
Thanks Rasmus. On Sunday 18 August 2002 02:37 pm, you wrote: > usort(), uasort() or uksort(). uasort() has a nice little example in the > user comment. > > On Sun, 18 Aug 2002, Evan Nemerson wrote: > > I have an array that looks like > > > > $array = Array( >

Re: [PHP] Problems with filesize() and large files

2002-09-09 Thread Evan Nemerson
Just figure out what the limits of 32-bit integers are. It might be enough to do something like $num = INT_MAX + abs( INT_MIN - filesize(bigFile) ); I'm not sure if that's the right math, but I hope you get the idea. If memory serves, what's happening is that the 32nd bit (which represents the

Re: [PHP] Encrypting/Decrypting Data

2002-09-19 Thread Evan Nemerson
If memory serves, $td is returned by mcrypt_module_open() http://www.php.net/mcrypt-module-open On Thursday 19 September 2002 00:54, [-^-!-%- wrote: > Hello. > > How do you decrypt a data that's encrypted with crypt($data). > > Now, the php documents says crypt() is a one-way crypting functio

Re: [PHP] Binary Safety and Sockets

2002-09-20 Thread Evan Nemerson
Don't assume either way, especially since sockets are currently experimental. If you're worried it isn't binary safe, you could base64_encode() and base64_decode everything... Extra bandwidth, but at least it will work. On Friday 20 September 2002 10:10, Hans Zaunere wrote: > I'm working with

[PHP] wow

2002-10-31 Thread Evan Nemerson
http://www.auschron.com/issues/dispatch/2000-08-11/xtra_feature2.html -- If there is no higher reason--and there is none--then my own reason must be the supreme judge of my life. -Leo Nikolaevich Tolstoy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] wow

2002-10-31 Thread Evan Nemerson
ize to any who recieved my eMail in error. It was an honest mistake. Sorry. Sincerly, Evan Nemerson On Thursday 31 October 2002 07:51 am, Evan Nemerson wrote: > http://www.auschron.com/issues/dispatch/2000-08-11/xtra_feature2.html -- PHP General Mailing List (http://www.php.net/) To un

Re: [PHP] Is there an ISP that supports GD Library 2.0?

2002-10-31 Thread Evan Nemerson
Hurrican Electric does... here's a php -m from them: Running PHP 4.1.2 Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies [PHP Modules] xml standard session posix pcre mysql imap gd ftp db zlib [Zend Modules] Not Implemented I had to use pdflib once, and after talking to them for a

Re: [PHP] String to Ascii

2002-10-31 Thread Evan Nemerson
"ebcdic2ascii() is an Apache-specific function which is available only on EBCDIC based operating systems (OS/390, BS2000)." -php.net/ebcdic What kind of text??? Usually, the text is in ASCII? Do you want to convert to the actual numerical representation (ie A == 0x41)? If so, you can try bin2he

Re: [PHP] Stop At Return

2002-10-31 Thread Evan Nemerson
Try fgets()... fread() is binary safe, so it doesn't terminate at \x0d\x0a. fges, on the other hand, does. On Thursday 31 October 2002 08:41 am, Adam Voigt wrote: > I'm running PHP in console mode, on a script which uses: > > $f = fopen("php://stdin","r"); > $data = fread($f,12); > fclose($f);

Re: [PHP] unlink function

2002-10-31 Thread Evan Nemerson
It probably isn't supported in windows. Unlink is (in C) in the unistd.h file. It provides a way to remove a file based on the unlink syscall (which i sincerly doubt is available from Win32). Looking at php.net/unlink... yep fourth comment: "unlink() function dosen't work with windows98, but it

Re: [PHP] ^M at the end of each line when I use php to write file

2002-10-31 Thread Evan Nemerson
a what does your code look like??? What happens when you $fp = fopen("temp", a+); for ( $x=0 ; $x<10 ; $x++ ) fputs($fp, "$x\n"); fclose($fp); ??? On Thursday 31 October 2002 09:44 am, Brandon Orther wrote: > Hello, > > Does anyone know a way around all the ^M at the end of eac

Re: [PHP] command to determine the end of a page?

2002-10-31 Thread Evan Nemerson
Might not be the best solution, but you _could_ create PDFs of your data, then print those...? Really clunky, but you could do nice formatting type stuff... On Thursday 31 October 2002 10:08 am, Jeff Bluemel wrote: > is there a php command that could determine if the end of a page has been > rea

[PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-05 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm trying to get XSLT working with PHP, and after slowly working my way through several other problems, I've found one that I can't figure out. Software: PHP 4.2.3 Apache 1.3.27 Sablotron 0.96 GCC 3.2 Linux 2.4.19-lsm1 ./configure \ - --enable-xml

  1   2   3   4   >