[PHP] copy image from database
Hi! I have images in my DB and want to write them to disk. I tried to copy but nothing happend, the image only pops up in my browser with echo. I want it saved in a directory on my server. - $query = select bin_data,filetype from $table where id=$id; $result = @MYSQL_QUERY($query); $image = @MYSQL_RESULT($result,0,bin_data); echo $image; $destfile=image.jpg; copy($image,$destfile) - Thanks for any help Regards, Jan -- Jan Grafström Lillemans Hus AB Sweden 46 (0)611-60920 46 (0)70-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] phpautodoc
Trying to get phpautodoc to work: If you saw this line, how would you write it with example values in it for file(s) etc? [php] phpdoc.php [php interpreter options] file(s) [-- -o output path] phpautodoc instructions say the following, but I don't understand: Scans the specified PHP source files (given directories are searched recursively - default: .) and writes HTML files to the specified output path (default: .). TIA Malcolm, UK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] WDDX
Hi EVERYONE! I'm running RH7.1 with PHP version 4.04pl1 and Apache1.3.19-5. A simple php script ?php phpinfo(); ? tells me that the library is configured with the '--enable-wddx' and '--with-xml' options. I'm using netscape4.76 and konqueror(kde 2.1.1) browser. Now running a slightly more complicated script from one of the online tutorials ?php $one_var = I was serialized on 2001-12-08; print wddx_serialize_value($one_var); ? I find that it produces no output at all! There are no errors reported in the log files... Then, if I put an echo statement before the print: ?php echo ==WDDX Test; $one_var = I was serialized on 2001-12-08; print wddx_serialize_value($one_var); ? I get the following output. ==WDDX Test I was serialized on 2001-12-08 I'm not too concerned about this wierd behaviour; However, I was expecting this code to produce something dressed in XML: wddxPacket version='0.9' data stringI was serialized on 2001-12-08/string /data /wddxPacket Can anyone help me? Thanks, Conpulpa _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Text file busy
HI I'm trying to run a php file in CGI mode and I get : Text file busy I'm running many other files like that for years and this is the 1st time I see such a message. php.net seems to be down for me, any idea? berber -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
Thx ! It works, now I can code further ! Ashley M. Kirchner [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Daniel Urstöger wrote: How could I check, which file apache tried to access, and didn´t found ? That would be a pretty nice function for my PHP skript .. Check your REQUEST_URI variable. -- H | Life is the art of drawing without an eraser. - John Gardner + Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 Director of Internet Operations / SysAdmin. 800.441.3873 x130 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] fopen to check if file exists
I am using this function: function isAfile($url){ $fp = @fopen($url,r); if ($fp) { //print The file exists!; return 1; } else { //print The file does not exist; return 0; } } to check if a remote file exists... now the problem is that the URL's i am trying to check are in this way: http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100 The problem is that LogoGen.php exists but depending on the ID the image may exists or not. How can i actually check if the image exists? Thanks anyone! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
Opps, sorry, I had a bug, now I have this problem: Browser is showing this URL: http://yourdomain.com/play/404.php and so the REQUEST_URI is: /play/404.php But I would need the requested file, before apache redirected to the 404.php Is this possible as well ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 8 Dec 2001 11:52:20 -0000 Issue 1040
php-general Digest 8 Dec 2001 11:52:20 - Issue 1040 Topics (messages 77090 through 77110): Re: Finding num of days b/t two dates. 77090 by: Steve Cayford Re: PHP + MySQL problem (strange behavior) 77091 by: Javier Muniz Re: Image problem 77092 by: Andrew Chase RegEx gurus help... 77093 by: Brian V Bonini phpautodoc 77094 by: Malcolm Clark 77105 by: Malcolm Clark ASP aplication object 77095 by: Max Re: Comparison between string failing 77096 by: Fred Costum Error Page 77097 by: Daniel Urstöger 77098 by: Ashley M. Kirchner 77108 by: Daniel Urstöger 77110 by: Daniel Urstöger Getting started - what do I need? 77099 by: Indera 77100 by: Michael Hall 77101 by: Matthew Moreton snmpv3 for php4 and later 77102 by: Yan nick why didnt you come watch me like you said you would? 77103 by: Karina69.AgoodfucK.com () copy image from database 77104 by: Jan Grafström WDDX 77106 by: con pulpa Text file busy 77107 by: Boaz Yahav fopen to check if file exists 77109 by: moe Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Here's one way to do it by converting dates into timestamps. ?php $date1 = mktime(0,0,0,10,1,2001); // in the form (hours, minutes, seconds, month, day, year) $date2 = mktime(0,0,0,10,1,2000); $timedif = $date1 - $date2; print(strftime(date 1 is %b %d, %Y, $date1) . br\n); print(strftime(date 2 is %b %d, %Y, $date2) . br\n); print(the difference in seconds is . $timedif . br\n); print(the difference in days is . ($timedif / (60 * 60 * 24)) . br\n); ? -Steve On Friday, December 7, 2001, at 04:48 PM, Alex Fritz wrote: If somebody could help me with this, it would save me a lot of heartache. I thought that this would be simple, but I can't seem to find a function anywhere in PHP that has this capability and I can't seem to find any external libraries for anything actually. I need to be able to give PHP a start date and an end date and have it return the number of days between the dates. If the first date is more recent than the second, I need it to give me a negative number. Can somebody please help? Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- Unfortunately, mysql returns no error string. MySQL doesn't appear to think it's an error, as it does apply changes to the row I'm trying to change, it simple isn't applying the CORRECT change to said row :) -Javier -Original Message- From: David Robley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 05, 2001 4:59 PM To: Javier Muniz; '[EMAIL PROTECTED]' Subject: Re: [PHP] PHP + MySQL problem (strange behavior) On Thu, 6 Dec 2001 08:32, Javier Muniz wrote: Hello, I'm having trouble determining what's going wrong with a MySQL query that I'm doing from PHP. Now before you go blaming MySQL read on :) I have a table with the following columns: id (int) name (varchar 20) starttime (int) duration (int) now, i have a row that has a starttime of 60, when i attempt to do the following update with PHP, it sets it to 0: UPDATE mytable SET starttime=starttime-30 WHERE name = 'myname' but when I run it from the MySQL command line, copy/pasted from the code, it sets the value of starttime to 30 as expected. Anyone have any clue why this is? mysql_error() is a good debugging tool; it will return an error string that may be useful. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA A waist is a terrible thing to mind. ---End Message--- ---BeginMessage--- PHP needs to be compiled with libjpeg and libpng in addition to the GD library to use those formats respectively. The PHP manual section covering image functions (including those for manipulating JPEGs and PNGs) is at http://www.php.net/manual/en/ref.image.php -Andy -Original Message- From: Peter Lalka [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 5:50 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Image problem Thanks, in phpinfo list really isn't support for GIF:( How can I manipulate jpeg images? Which functions are for this img. format? P. |+- || Johan [EMAIL PROTECTED] | || Odoslané kým: | ||
Re: [PHP] Costum Error Page
Use $QUERY_STRING instead - Original Message - From: Daniel Urstöger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 1:51 PM Subject: Re: [PHP] Costum Error Page Opps, sorry, I had a bug, now I have this problem: Browser is showing this URL: http://yourdomain.com/play/404.php and so the REQUEST_URI is: /play/404.php But I would need the requested file, before apache redirected to the 404.php Is this possible as well ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] fopen to check if file exists
I've tested given url.. If there is no image php script return file = '139'. Check if file content is different from 139. or try to get image size of file: $size = GetImageSize (http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100;); and check what happens if there is no image Zliy PEs, http://www.zliypes.com.ua - Original Message - From: moe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 1:48 PM Subject: [PHP] fopen to check if file exists I am using this function: function isAfile($url){ $fp = @fopen($url,r); if ($fp) { //print The file exists!; return 1; } else { //print The file does not exist; return 0; } } to check if a remote file exists... now the problem is that the URL's i am trying to check are in this way: http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100 The problem is that LogoGen.php exists but depending on the ID the image may exists or not. How can i actually check if the image exists? Thanks anyone! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Getting started - what do I need?
Hi there, I found this site very useful for lots of help-me-up-the-learning-curve tutorials. http://perl.about.com/cs/beginningphp/ C:o) Indera wrote: Hello, I have never used php or mysql before and want to know what tools I should use so that I can start learning php and mysql. I would like to build basic things like a login page and forms that append the data to a database. I went to the bookstore and think the book PHP fast and easy web development is something that I could handle. I've read through some of the posts on this news group and realized that there are tools that I can use as front ends for these packages. I went to mysql.com and php.net and it seems that i can download both of these packages to my computer for free. Any help would be greatly appreciated. Thanks Indera -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
thx for your help .. But I cannot get this running .. Not with getenv nor with the variable itself :( Could you give me a short example ? Would really help me much ! :) thx and cya ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Getting started - what do I need?
Fellows who suggested php triad were right!! It is a good option to downloading PHP, MySQL and Apache!! Php Comprhensive docs.. www.php.net/download-docs.php Php tutorials by v s babu-- http://vsbabu.org/tutorials/php/ (you can download it --very good) Indera [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I have never used php or mysql before and want to know what tools I should use so that I can start learning php and mysql. I would like to build basic things like a login page and forms that append the data to a database. I went to the bookstore and think the book PHP fast and easy web development is something that I could handle. I've read through some of the posts on this news group and realized that there are tools that I can use as front ends for these packages. I went to mysql.com and php.net and it seems that i can download both of these packages to my computer for free. Any help would be greatly appreciated. Thanks Indera -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] R: [PHP] fopen to check if file exists
what do you mean that it returns file= '139'? you are talking about the id? please can you explain me better? Valentin V. Petruchek [EMAIL PROTECTED] wrote in message 002101c17fdf$2ed881a0$[EMAIL PROTECTED] I've tested given url.. If there is no image php script return file = '139'. Check if file content is different from 139. or try to get image size of file: $size = GetImageSize (http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100;); and check what happens if there is no image Zliy PEs, http://www.zliypes.com.ua - Original Message - From: moe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 1:48 PM Subject: [PHP] fopen to check if file exists I am using this function: function isAfile($url){ $fp = @fopen($url,r); if ($fp) { //print The file exists!; return 1; } else { //print The file does not exist; return 0; } } to check if a remote file exists... now the problem is that the URL's i am trying to check are in this way: http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100 The problem is that LogoGen.php exists but depending on the ID the image may exists or not. How can i actually check if the image exists? Thanks anyone! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WDDX
Browsers discard whatever tags they don't understand. They don't grok WDDX tags, so only the string is displayed. View source and it all should be there. -Stathis. con pulpa wrote: Hi EVERYONE! I'm running RH7.1 with PHP version 4.04pl1 and Apache1.3.19-5. A simple php script ?php phpinfo(); ? tells me that the library is configured with the '--enable-wddx' and '--with-xml' options. I'm using netscape4.76 and konqueror(kde 2.1.1) browser. Now running a slightly more complicated script from one of the online tutorials ?php $one_var = I was serialized on 2001-12-08; print wddx_serialize_value($one_var); ? I find that it produces no output at all! There are no errors reported in the log files... Then, if I put an echo statement before the print: ?php echo ==WDDX Test; $one_var = I was serialized on 2001-12-08; print wddx_serialize_value($one_var); ? I get the following output. ==WDDX Test I was serialized on 2001-12-08 I'm not too concerned about this wierd behaviour; However, I was expecting this code to produce something dressed in XML: wddxPacket version='0.9' data stringI was serialized on 2001-12-08/string /data /wddxPacket Can anyone help me? Thanks, Conpulpa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Shopping project with quantity discounts
Hi I'm working on a shopping project which involves a complex pricing model with discounts by product quantity threshold as well as customer specific discounts. Has anyone got experience of this or point me in the right direction with regards to the database layout and theory behind this. Thanks Girish -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] simple regexp question - validating new line chars
Hi everyone:) I need to validate a string that comes from a submitted form. There's nothing unusual in it... but the problem part showes up, when I need to validate a new line character... I have tried many diffrent variations of the code and I have ended up on something VERY simple: ?php $regexp='\n'; $text=\n; echo $text; if (true==eregi($regexp, $text)) { echo 'ok'; } else { echo 'error'; } ? Unfortunately this script results with error ;( Does somebody know how to make this regexp to work? Maybe it is a bug? I am using php 4.0.6 on windows 2000. I will appreciate any feedback about this ;) Chris Jarecki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] simple regexp question - validating new line chars
that's because you're testing to see if '\n' is \n...single quotes mean: interpret the text between literally, so '\n' is a backslash followed by n...doulbe quotes mean: interpolate the value, so \n becomes a newline... -Original Message- From: Krzysztof Jarecki [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 12:10 PM To: [EMAIL PROTECTED] Subject: [PHP] simple regexp question - validating new line chars Hi everyone:) I need to validate a string that comes from a submitted form. There's nothing unusual in it... but the problem part showes up, when I need to validate a new line character... I have tried many diffrent variations of the code and I have ended up on something VERY simple: ?php $regexp='\n'; $text=\n; echo $text; if (true==eregi($regexp, $text)) { echo 'ok'; } else { echo 'error'; } ? Unfortunately this script results with error ;( Does somebody know how to make this regexp to work? Maybe it is a bug? I am using php 4.0.6 on windows 2000. I will appreciate any feedback about this ;) Chris Jarecki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Sorting Multidimensional Array..second dimension has 12 elements
I have a 2 dimensional array...with the second dimension having 12 elements. What I want to do is sort (and re-sort) they array by one of the 12 elements...keeping data consistent. All of the examples I have read @php.net seem to deal with multidim-arrays that only have one element in them. Here is a cut-n-paste of a print_r() of my array: -begin paste-- Array ( [barnhij] = Array ( [name] = Jeremy Barnhill [toi] = 5855 [pdk] = 1456 [tpdk_trans] = 40169 [tpallm_trans] = 17430 [terrors] = 174 [total_trans] = 57599 [pct] = 97.03 [modpct] = 98.3630 [pdk_pct] = 69.74 [pallm_pct] = 30.26 [trans_per_req] = 9.84 ) [clarkm10] = Array ( [name] = Michelle Clark [toi] = 1971 [pdk] = 402 [tpdk_trans] = 15427 [tpallm_trans] = 9970 [terrors] = 97 [total_trans] = 25397 [pct] = 95.08 [modpct] = 97.3484 [pdk_pct] = 60.74 [pallm_pct] = 39.26 [trans_per_req] = 12.89 ) [humphrj5] = Array ( [name] = Jill Humphries [toi] = 6104 [pdk] = 1002 [tpdk_trans] = 42759 [tpallm_trans] = 28907 [terrors] = 125 [total_trans] = 71666 [pct] = 97.95 [modpct] = 98.8889 [pdk_pct] = 59.66 [pallm_pct] = 40.34 [trans_per_req] = 11.74 ) [roberj15] = Array ( [name] = Jamison Roberts [toi] = 7132 [pdk] = 1524 [tpdk_trans] = 52542 [tpallm_trans] = 42311 [terrors] = 46 [total_trans] = 94853 [pct] = 99.36 [modpct] = 99.6533 [pdk_pct] = 55.39 [pallm_pct] = 44.61 [trans_per_req] = 13.30 ) ) ---end paste- Hope this is clear, Thanks - Jamison. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: copy image from database
copy copies file to file, not data to a file (creating files). You should look at using fopen() and fwrite() instead. You may also want to check the returned value from these functions to see if an error occurred. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
how about you make a phpInfo() page, and set that as 404 error, then you can find the correct variable to use :) Andrew - Original Message - From: Daniel Urstöger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 12:43 PM Subject: Re: [PHP] Costum Error Page thx for your help .. But I cannot get this running .. Not with getenv nor with the variable itself :( Could you give me a short example ? Would really help me much ! :) thx and cya ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] copy image from database
read the specs on copy() it copys a source file to a destination file... You are not copying files!... You should use something like fwrite to write the contents of $image to a file... Andrew - Original Message - From: Jan Grafström [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 8:28 AM Subject: [PHP] copy image from database Hi! I have images in my DB and want to write them to disk. I tried to copy but nothing happend, the image only pops up in my browser with echo. I want it saved in a directory on my server. - $query = select bin_data,filetype from $table where id=$id; $result = @MYSQL_QUERY($query); $image = @MYSQL_RESULT($result,0,bin_data); echo $image; $destfile=image.jpg; copy($image,$destfile) - Thanks for any help Regards, Jan -- Jan Grafström Lillemans Hus AB Sweden 46 (0)611-60920 46 (0)70-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Flash jpeg/gif/bmp
Does anyone know of a tool to export a frame of a Flash movie to a flat image file on the client-side? I want users to be able to set the last frame of my flash movie as their wallpaper. The only way I know of doing this is to use PHP to re-build the Flash frame by receiving coordinates from the Flash movie, and having GIFs of all the movie's symbols on the server. However, this solution would probably take me an afternoon to do, so if you know of a tool, or a quick script please let me know. Thanks, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
Just put a phpinfo() call in your 404.php page and see for yourself. On Sat, 8 Dec 2001, Daniel Urstöger wrote: Opps, sorry, I had a bug, now I have this problem: Browser is showing this URL: http://yourdomain.com/play/404.php and so the REQUEST_URI is: /play/404.php But I would need the requested file, before apache redirected to the 404.php Is this possible as well ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] SQL Query Question
Hi, This isn't a php question, more of a SQL question, but I don't know any where better to send it, and I guess its trival enough for someone here to answer. Anyway, I have a list of members each with a score field. How can I say that Member 3 is ranked 10 out of 100 members for example. Here is the layout of the members table: ID, Name, Score I can get the total count of members in the table, but I don't know how to determine what rank they are, unless I return all the rows in the table (sorted), and cycle through them until I find the member I want, counting how many people are above him... This method would work, but would be slow (and wastful), is there a better way to determine his position with a SQL Query? Thanks in advance Andrew P.S If it matters I'm using MySQL PHP 4.0.6 on WinXP under Apache 1.3.22
[PHP] update mysql record
Newbie is trying to edit a mysql record on my local machine using mysql 3.23.34 and PHP 4.04 and nothing gets updated after changes are made. I would be most grateful for any help Thank you Gee. html head /head body table border=0 cellpadding=4 cellspacing=0 width=730 align=center ? echo form method='post' action='$PHP_SELF'; ? ? include(matai.inc); mysql_connect(localhost,$user,$password); $query1 = select * from $table where id = '$id'; $result1 = mysql_db_query('matai',$query1); while($row = mysql_fetch_object($result1)) { print trtd align=rightLatin Name:/tdtd align=left input type=text name='latin_name' value='$row-latin_name'/td/tr; print trtd align=rightCommon Name:/tdtd align=left input type=text name='common_name' value='$row-common_name'/td/tr; print trtd align=rightDescription:/tdtd align=left input type=text name='description' value='$row-description'/td/tr; print trtd align=rightHeight:/tdtd align=left input type=text name='height' value='$row-height'/td/tr; print trtd align=rightGrowth Rate:/tdtd align=left input type=text name='growth_rate' value='$row-growth_rate'/td/tr; print trtd align=rightSoil Requirement:/tdtd align=left input type=text name='soil_requirement' value='$row-soil_requirement'/td/tr; print trtd align=rightPrice 100:/tdtd align=left input type=text name='price100' value='$row-price100'/td/tr; print trtd align=rightPrice 200:/tdtd align=left input type=text name='price200' value='$row-price200'/td/tr; print trtd align=rightPrice 1000:/tdtd align=left input type=text name='price1000' value='$row-price1000'/td/tr; $id = $row-id; } echo /tablep; echo brinput type=hidden name='id' value='$id'; ? table border=0 cellpadding=4 cellspacing=0 width=730 align=center input type=submit name=change value=Update record /form ? if ($change) { //Do some error-checking first if($latin_name == || $common_name == ) { die(bYou left one or more fields blank./b); } $sql = UPDATE matai SET cat='$cat', latin_name='$latin_name', common_name='$common_name', description='$description', height='$height', growth_rate='$growth_rate', soil_requirement='$soil_requirement', price='$price', frost_tolerance='$frost_tolerance', price100='$price100', price1000='$price1000', onelitretubes='$onelitretubes', price200='$price200', fivelitrepots='$fivelitrepots', price10='$price10', Flowering_Season='$Flowering_Season', price500='$price500' where id='$id'; mysql_db_query('matai',$sql); echo bYour record has been updated/b/p; } mysql_close(); ? a href='modconifers.php'bView updated database/b/a /table /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How do I check GD version?
Cheers all... This mail got rather long, so here are my 3 questions in a short version: 1) What is GD? (fore use with imagecopyresampled function) 2) How can I run a function that will tell me what version of GD is installed on my server, if any version at all? 3) Anyone know of some good hosts out there which has got all of this under control? (basically people who has a clue about what they're doing) The long version: As many of us I am buying my hosting services and paying a monthly sum for it. (sigh... yes) I am working on using a function to make thumbnails out of uploaded images, and I see from the php manual that many of those have been made already. I can also read that ImageResample gives a much better result than ImageResized. (ImageCopyResampled and ImageCopyResized maybe the names were...) I also see that I need something called GD to use the resampled function. Well I tried searching the php site for some clue as to what GD is. I didn't find much there (hard to search when the query is shorter than 3 letters). So I was looking for a brief explenation as to what GD is. Also: Could anyone point me in the direction of a function that would tell me if my server has this GD thing installen and if it does: What version it is running. Just like PHP has its version info function... Its so much easier than writing those damn hosting people and ask them. They might not even know And on that subject: Anyone know of some really good hosts out there which has got some clue as to how to set up a server properly and how to ... ehem ... fulfill every clients little needs :) ?? Lots of questions? heh. So I wrote a short version on the top. - Torkil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 8 Dec 2001 23:52:35 -0000 Issue 1041
php-general Digest 8 Dec 2001 23:52:35 - Issue 1041 Topics (messages 77111 through 77131): Re: Costum Error Page 77111 by: Valentin V. Petruchek 77114 by: Daniel Urstöger 77118 by: Papp Gyozo 77125 by: Andrew Brampton 77128 by: Rasmus Lerdorf Re: fopen to check if file exists 77112 by: Valentin V. Petruchek Re: Getting started - what do I need? 77113 by: administrator 77115 by: Bharath Bhushan Lohray R: [PHP] fopen to check if file exists 77116 by: moe Re: WDDX 77117 by: Rouvas Stathis 77119 by: Papp Gyozo Shopping project with quantity discounts 77120 by: Girish Nath simple regexp question - validating new line chars 77121 by: Krzysztof Jarecki 77122 by: Jack Dempsey Sorting Multidimensional Array..second dimension has 12 elements 77123 by: J. Roberts Re: copy image from database 77124 by: Thomas 77126 by: Andrew Brampton Flash jpeg/gif/bmp 77127 by: lists.mhess.qn.net SQL Query Question 77129 by: Andrew Brampton update mysql record 77130 by: gee How do I check GD version? 77131 by: Torkil Johnsen Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- Use $QUERY_STRING instead - Original Message - From: Daniel Urstöger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 1:51 PM Subject: Re: [PHP] Costum Error Page Opps, sorry, I had a bug, now I have this problem: Browser is showing this URL: http://yourdomain.com/play/404.php and so the REQUEST_URI is: /play/404.php But I would need the requested file, before apache redirected to the 404.php Is this possible as well ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- thx for your help .. But I cannot get this running .. Not with getenv nor with the variable itself :( Could you give me a short example ? Would really help me much ! :) thx and cya ... ---End Message--- ---BeginMessage--- there is an example in the apache docs or httpd.conf samples how to pass to error script the original request uri, ins't there any? - Original Message - From: Ashley M. Kirchner [EMAIL PROTECTED] To: Daniel Urstger [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 4:02 AM Subject: Re: [PHP] Costum Error Page | Daniel Urstger wrote: | | How could I check, which file apache tried to access, and didnt found ? | That would be a pretty nice function for my PHP skript .. | | Check your REQUEST_URI variable. | | -- | H | Life is the art of drawing without an eraser. - John Gardner | + | Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 | Director of Internet Operations / SysAdmin. 800.441.3873 x130 | Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 | http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] | ---End Message--- ---BeginMessage--- how about you make a phpInfo() page, and set that as 404 error, then you can find the correct variable to use :) Andrew - Original Message - From: Daniel Urstöger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 12:43 PM Subject: Re: [PHP] Costum Error Page thx for your help .. But I cannot get this running .. Not with getenv nor with the variable itself :( Could you give me a short example ? Would really help me much ! :) thx and cya ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] ---End Message--- ---BeginMessage--- Just put a phpinfo() call in your 404.php page and see for yourself. On Sat, 8 Dec 2001, Daniel Urstöger wrote: Opps, sorry, I had a bug, now I have this problem: Browser is showing this URL: http://yourdomain.com/play/404.php and so the REQUEST_URI is: /play/404.php But I would need the requested file, before apache redirected to the 404.php Is this possible as well ? ---End Message--- ---BeginMessage--- I've tested given url.. If there is no image php script return file =
Re: [PHP] How do I check GD version?
This mail got rather long, so here are my 3 questions in a short version: 1) What is GD? (fore use with imagecopyresampled function) GD is an image library. You need GD version 2.0.1 or higher to use imagecopyresampled(). 2) How can I run a function that will tell me what version of GD is installed on my server, if any version at all? phpinfo() would tell you. Look for the block titled GD. If you don't see one, you don't have GD support in your PHP build. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to compute time to load page...
Hi All... (again) I was just wondering if anyone out there has made a function that will compute how long time (seconds, milliseconds) it will take to load a page? I see some search engines have a function that displays how long time the search took, and I'm looking for the same thing, to compare different designs and improve loading time for my viewers. Anyone? - Torkil Johnsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to compute time to load page...
the search time is different than the page load timegoogle for example can find thousands of records in a tenth of a second, yet it takes longer to get that html result back to your browseryou could estimate page download time by calculating the filesize and using the connection speedcertainly not 100% accurate, but it will give you a way of estimating. jack -Original Message- From: Torkil Johnsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: [PHP] How to compute time to load page... Hi All... (again) I was just wondering if anyone out there has made a function that will compute how long time (seconds, milliseconds) it will take to load a page? I see some search engines have a function that displays how long time the search took, and I'm looking for the same thing, to compare different designs and improve loading time for my viewers. Anyone? - Torkil Johnsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Comparing Dates
I'm trying to do a check on a date, to see if it's after the current date, so basically i'm doing an if(date(d-m-y)15-12-01) { do something } I know that's obviously not the right way to do it, but can someone help me out?
RE: [PHP] Comparing Dates
you could pass the values to mktime and compare -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 8:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Comparing Dates I'm trying to do a check on a date, to see if it's after the current date, so basically i'm doing an if(date(d-m-y)15-12-01) { do something } I know that's obviously not the right way to do it, but can someone help me out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
Thx ! The one with the phpinfo was a nice tip .. But yeah, I didn´t found the stuff I wanted either .. But now, I already coded a work around :) Seems to work pretty fine ! :) cya ! and thanks for your help ! Andrew Brampton [EMAIL PROTECTED] schrieb im Newsbeitrag 003801c1801a$26faa4f0$2528260a@STUDENT5830">news:003801c1801a$26faa4f0$2528260a@STUDENT5830... how about you make a phpInfo() page, and set that as 404 error, then you can find the correct variable to use :) Andrew - Original Message - From: Daniel Urstöger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 12:43 PM Subject: Re: [PHP] Costum Error Page thx for your help .. But I cannot get this running .. Not with getenv nor with the variable itself :( Could you give me a short example ? Would really help me much ! :) thx and cya ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to compute time to load page...
Or this: at the beginning of your script, get the time using microtime then at the bottom, you could get the time again, subtract the difference and voila, thats how long the execution time of your script is. -ajf - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 7:59 PM Subject: RE: [PHP] How to compute time to load page... the search time is different than the page load timegoogle for example can find thousands of records in a tenth of a second, yet it takes longer to get that html result back to your browseryou could estimate page download time by calculating the filesize and using the connection speedcertainly not 100% accurate, but it will give you a way of estimating. jack -Original Message- From: Torkil Johnsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: [PHP] How to compute time to load page... Hi All... (again) I was just wondering if anyone out there has made a function that will compute how long time (seconds, milliseconds) it will take to load a page? I see some search engines have a function that displays how long time the search took, and I'm looking for the same thing, to compare different designs and improve loading time for my viewers. Anyone? - Torkil Johnsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SQL Query Question
Assuming you have the variable member_id (for the member in question)... Get the score for that member and store it to $score... SELECT score FROM members WHERE id=$member_id Then to determine rank, just do this... SELECT COUNT(*)+1 as rank FROM members WHERE SCORE$score; -Jason Garber IonZoft.com At 08:47 PM 12/8/2001 +, Andrew Brampton wrote: Hi, This isn't a php question, more of a SQL question, but I don't know any where better to send it, and I guess its trival enough for someone here to answer. Anyway, I have a list of members each with a score field. How can I say that Member 3 is ranked 10 out of 100 members for example. Here is the layout of the members table: ID, Name, Score I can get the total count of members in the table, but I don't know how to determine what rank they are, unless I return all the rows in the table (sorted), and cycle through them until I find the member I want, counting how many people are above him... This method would work, but would be slow (and wastful), is there a better way to determine his position with a SQL Query? Thanks in advance Andrew P.S If it matters I'm using MySQL PHP 4.0.6 on WinXP under Apache 1.3.22 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Comparing Dates
Absolutely you are doing in the right way:) But pls make sure that string comparison is from left to right. For example, 16 is larger than 15-12-01. Alex - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 8:16 PM Subject: [PHP] Comparing Dates I'm trying to do a check on a date, to see if it's after the current date, so basically i'm doing an if(date(d-m-y)15-12-01) { do something } I know that's obviously not the right way to do it, but can someone help me out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to compute time to load page...
Basically I agree with you. But the second time to get time must be done after the page is rendered on local browser. So I suggest to use Javascript for the second time to get time, and pass the first time value into a js function. Alex - Original Message - From: Andrew Forgue [EMAIL PROTECTED] To: Jack Dempsey [EMAIL PROTECTED]; Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 9:42 PM Subject: Re: [PHP] How to compute time to load page... Or this: at the beginning of your script, get the time using microtime then at the bottom, you could get the time again, subtract the difference and voila, thats how long the execution time of your script is. -ajf - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 7:59 PM Subject: RE: [PHP] How to compute time to load page... the search time is different than the page load timegoogle for example can find thousands of records in a tenth of a second, yet it takes longer to get that html result back to your browseryou could estimate page download time by calculating the filesize and using the connection speedcertainly not 100% accurate, but it will give you a way of estimating. jack -Original Message- From: Torkil Johnsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: [PHP] How to compute time to load page... Hi All... (again) I was just wondering if anyone out there has made a function that will compute how long time (seconds, milliseconds) it will take to load a page? I see some search engines have a function that displays how long time the search took, and I'm looking for the same thing, to compare different designs and improve loading time for my viewers. Anyone? - Torkil Johnsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session woes
I have a friend who is using an ISP that uses php4.0.3pl1 . It appears that session_register is not working between pages. In script A, the session var gets registered and shows registered using session_is_registered('testvar'); However, when script B is called, a session-start is issued and testvar is not registered. Running the identical code, but not with his ISP, under 4.06, it works perfectly. Are there known issues? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.5 Guest Book http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to compute time to load page...
What about the small difference there will be between server time and local time? -Jason Garber At 10:40 PM 12/8/2001 -0500, Alex Shi wrote: Basically I agree with you. But the second time to get time must be done after the page is rendered on local browser. So I suggest to use Javascript for the second time to get time, and pass the first time value into a js function. Alex - Original Message - From: Andrew Forgue [EMAIL PROTECTED] To: Jack Dempsey [EMAIL PROTECTED]; Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 9:42 PM Subject: Re: [PHP] How to compute time to load page... Or this: at the beginning of your script, get the time using microtime then at the bottom, you could get the time again, subtract the difference and voila, thats how long the execution time of your script is. -ajf - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 7:59 PM Subject: RE: [PHP] How to compute time to load page... the search time is different than the page load timegoogle for example can find thousands of records in a tenth of a second, yet it takes longer to get that html result back to your browseryou could estimate page download time by calculating the filesize and using the connection speedcertainly not 100% accurate, but it will give you a way of estimating. jack -Original Message- From: Torkil Johnsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: [PHP] How to compute time to load page... Hi All... (again) I was just wondering if anyone out there has made a function that will compute how long time (seconds, milliseconds) it will take to load a page? I see some search engines have a function that displays how long time the search took, and I'm looking for the same thing, to compare different designs and improve loading time for my viewers. Anyone? - Torkil Johnsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to compute time to load page...
This is an Einstein problem :)) Maybe we need a time server However, we can have an alternative solution to get round turn time. Let's say on page A there's a link to a backend script. When the link is clicked, then use javascript to pick up current time T1 and pass it to the script. This script will send a page back to browser. Let's say this is page B. Time T1 is passed to the js of page B. And at the end of page B a js function will pick up current time T2. When the page rendered at local browser, we have both T1 and T2. Thus we calculate the time difference of a round turn. I know it is not a final solution but this is acurate. Hope someone else out there can give better solution. Alex - Original Message - From: Jason G. [EMAIL PROTECTED] To: Alex Shi [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 11:42 PM Subject: Re: [PHP] How to compute time to load page... What about the small difference there will be between server time and local time? -Jason Garber At 10:40 PM 12/8/2001 -0500, Alex Shi wrote: Basically I agree with you. But the second time to get time must be done after the page is rendered on local browser. So I suggest to use Javascript for the second time to get time, and pass the first time value into a js function. Alex - Original Message - From: Andrew Forgue [EMAIL PROTECTED] To: Jack Dempsey [EMAIL PROTECTED]; Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 9:42 PM Subject: Re: [PHP] How to compute time to load page... Or this: at the beginning of your script, get the time using microtime then at the bottom, you could get the time again, subtract the difference and voila, thats how long the execution time of your script is. -ajf - Original Message - From: Jack Dempsey [EMAIL PROTECTED] To: Torkil Johnsen [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 7:59 PM Subject: RE: [PHP] How to compute time to load page... the search time is different than the page load timegoogle for example can find thousands of records in a tenth of a second, yet it takes longer to get that html result back to your browseryou could estimate page download time by calculating the filesize and using the connection speedcertainly not 100% accurate, but it will give you a way of estimating. jack -Original Message- From: Torkil Johnsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 08, 2001 7:14 PM To: [EMAIL PROTECTED] Subject: [PHP] How to compute time to load page... Hi All... (again) I was just wondering if anyone out there has made a function that will compute how long time (seconds, milliseconds) it will take to load a page? I see some search engines have a function that displays how long time the search took, and I'm looking for the same thing, to compare different designs and improve loading time for my viewers. Anyone? - Torkil Johnsen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Costum Error Page
there is an example in the apache docs or httpd.conf samples how to pass to error script the original request uri, ins't there any? - Original Message - From: Ashley M. Kirchner [EMAIL PROTECTED] To: Daniel Urstger [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 4:02 AM Subject: Re: [PHP] Costum Error Page | Daniel Urstger wrote: | | How could I check, which file apache tried to access, and didnt found ? | That would be a pretty nice function for my PHP skript .. | | Check your REQUEST_URI variable. | | -- | H | Life is the art of drawing without an eraser. - John Gardner | + | Ashley M. Kirchner mailto:[EMAIL PROTECTED] . 303.442.6410 x130 | Director of Internet Operations / SysAdmin. 800.441.3873 x130 | Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6 | http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] |
Re: [PHP] WDDX
What do you get as result from a 'Show source...' in your browser? AFAIK, NS4.76 does not display unrecognized HTML element, and it treats your script's output as HTML source. try: ?php print (htmlspecialchars(wddx_serialize_value($one_var))); ? - Original Message - From: con pulpa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, December 08, 2001 11:57 AM Subject: [PHP] WDDX | Hi EVERYONE! | | I'm running RH7.1 with PHP version 4.04pl1 and | Apache1.3.19-5. A simple php script ?php phpinfo(); ? | tells me that the library is configured with the | '--enable-wddx' and '--with-xml' options. | | I'm using netscape4.76 and konqueror(kde 2.1.1) browser. | | Now running a slightly more complicated script from one of | the online tutorials | | ?php | $one_var = I was serialized on 2001-12-08; | print wddx_serialize_value($one_var); | ? | | I find that it produces no output at all! | There are no errors reported in the log files... | | Then, if I put an echo statement before the print: | ?php | echo ==WDDX Test; | $one_var = I was serialized on 2001-12-08; | print wddx_serialize_value($one_var); | ? | | I get the following output. | ==WDDX Test I was serialized on 2001-12-08 | | I'm not too concerned about this wierd behaviour; | However, I was expecting this code to produce something | dressed in XML: | | wddxPacket version='0.9' | data | stringI was serialized on 2001-12-08/string | /data | /wddxPacket | | Can anyone help me? | | Thanks, Conpulpa | | | | | | | _ | Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | To contact the list administrators, e-mail: [EMAIL PROTECTED] |