Re: [PHP] Re: Using strtotime on 'old' dates.

2003-01-23 Thread Joakim Andersson
to strtotime(). I then found this post among PHP's bug reports: http://bugs.php.net/bug.php?id=14313 Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fopen over a network

2002-12-05 Thread Joakim Andersson
Dara Dowd wrote: Thanks for the advice lads but I realise I should have been clearer. I know about header(etc..) so displaying the download dialog isn't the problem, it's how to get to the file on the file server and then open it. The file server isn't a web server. This is probably ridiculously

Re: [PHP] Creating dynamic names for images

2002-12-04 Thread Joakim Andersson
row. (You do have an auto_increment column, right?) Use that ID as filename. Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Decrypt Password

2002-11-27 Thread Joakim Andersson
Stephen wrote: That's what I'm going to do but how can I pull it from the database to decrypt it, then send it? You can't. Well that depends what method you used to create the passwords, but most likely you used a one-way encryption. How to solve the problem then? 1. User klicks link 'Forgot

Re: [PHP] Problem on OpenDir()

2002-11-27 Thread Joakim Andersson
Jack wrote: Dear Joakim First of all, thx for the reply and here is the code : ? include 'phpstudy/constant.inc'; $link=mysql_pconnect(HOST,USER,PASSWD); mysql_select_db(DBNAME,$link); file://Define Date format $currentyear = date('y'); $currentmonth = date(m); $previousmonth=$currentmonth -1;

Re: [PHP] implode()

2002-11-26 Thread Joakim Andersson
Jef wrote: implode() expects an array as the second argument. You're passing a string. In fact with the code you have above I don't see why you don't just tack the comma on the end in the first place: if($image11_name != '') $sqlUpdate .= image11='$image11_name', ; The reason being the

Re: [PHP] Problem on OpenDir()

2002-11-25 Thread Joakim Andersson
Jack wrote: Dear all here is the path i want to open for reading files from it! path = c:/pdf_reports/bills/Oct-02 Here you have no trailing / --- Snip --- when i change the path to : c:/pdf_reports/bills/ But here you do... It should not make a difference as far as I know, but it may be

Re: [PHP] Ip address as 32bit int?

2002-11-22 Thread Joakim Andersson
In MySQL (and others?) you can use these two functions: INET_NTOA(expr) INET_ATON(expr) Regards Joakim - Original Message - From: Noodle Snacks [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 22, 2002 10:13 AM Subject: [PHP] Ip address as 32bit int? Is it easy enough to

RE: [PHP] Re: Cry for help

2002-09-13 Thread joakim . andersson
dilemmas no? I wish I could find a list of syntax and functions like a reference guide. That would be a start www.php.net/manual/en/ is a very good start. Tack again -Tree Varsågod! Joakim - Original Message - From: Joakim Andersson [EMAIL PROTECTED] Newsgroups: php.general

RE: [PHP] Re: Cry for help

2002-09-12 Thread joakim . andersson
. // The first element ($arr[0]) is actually (an empty string) since each line starts with |. } fclose ($fd); Hopefully this will get you in the right direction. Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] imagecopyresized problems

2002-09-09 Thread joakim . andersson
Hi, imagejpeg($dst_img); This actually outputs the image, so your result is not unexpected. Try this instead: imagejpeg($dst_img, /path/and/filename/to/newfile.jpg); Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

RE: [PHP] best way to delete char# 4-7 from a string?

2002-07-19 Thread joakim . andersson
); Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Why won't this work?

2002-07-19 Thread joakim . andersson
the MySQL manual Still not tested :-) Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Upload File Problem

2002-07-18 Thread joakim . andersson
to $HTTP_POST_FILES Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] draw statistics

2002-07-18 Thread joakim . andersson
From: Jose Morales [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 11:34 AM Hi! Im looking for some class that alow me to draw an histogram, or a piechar, for display statistics. thx! http://www.hotscripts.com/PHP/Scripts_and_Programs/Graphs_and_Charts/ Regards Joakim

RE: [PHP] Sessions: watertight?

2002-07-18 Thread joakim . andersson
the constant SID which is defined, if the client did not send the appropriate cookie. SID is either of the form session_name=session_id or is an empty string. [/quote] Regards Joakim Andersson -Original Message- From: PHPCoder [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 11

RE: [PHP] PHP HASP

2002-07-18 Thread joakim . andersson
Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Sessions: watertight?

2002-07-18 Thread joakim . andersson
From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 11:46 AM Joakim, please don't take offence, I know you're being helpful but ... None taken. ... do we really need quotes from the manual? You've already given the pointer which is sufficient in itself for any

RE: [PHP] Upload File Problem

2002-07-18 Thread joakim . andersson
From: Mark Colvin [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 12:41 PM To: [EMAIL PROTECTED] Joakim, Thank you for your reply. I tried your example and get 'Possible file upload attack: filename.' meaning that 'if (is_uploaded_file($_FILES['img1']['tmp_name']))' returns

RE: [PHP] Crazy idea about detecting visitor's connection speed

2002-07-16 Thread joakim . andersson
added our domainname to your list. Then what if I connect to our modem-pool from home... Then you wouldn't know I connected through a modem. And my ISP at home doesn't have anything in their dns-names to differentiate adsl from dial-up users. Just my thoughts... Regards Joakim Andersson -- PHP

RE: [PHP] outputting a pdf file to IE browser? POST/GET method bug or not?

2002-07-16 Thread joakim . andersson
I really think you should read the user comments in the online PHP-manual before doing anything else... Look here: http://www.php.net/manual/en/function.header.php Regards Joakim Andersson -Original Message- From: gilles [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 7:19 PM

RE: [PHP] Create Thumbnail from Blob online

2002-07-16 Thread joakim . andersson
a thumbnail to show it within the browser without creating a file - how can i pass the mysql-blob directly to a gd-function like imagecreate() or imagejpg() ?? (gd-library is working well) Take a look at imagecreatefromstring() thank you for any answer, tommi You're welcome! Regars Joakim

RE: [PHP] Purpose of $$var ?????

2002-07-16 Thread joakim . andersson
/language.variables.predefined.php Regards Joakim Andersson -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 16, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Purpose of $$var ? The script was working great before PHP 4.2.x and not after that. So

RE: [PHP] Table Making

2002-07-11 Thread joakim . andersson
' and store arr[0][1] to arr[maxrows][1] etc. - loop through the array the other way round and create the html-table. So start with arr[0][0] to arr[0][4] etc. Make any sense? Another way of doing it is to use mysql_data_seek() to jump back and forth in the result set. Regards Joakim Andersson

RE: [PHP] Re: Wildcard

2002-07-10 Thread joakim . andersson
'])) { $sql_query .= $separator; $sql_query .= col2 = '{$_POST['select2']}' ; $separator = AND ; } if(isset($_POST['select3'])) { $sql_query .= $separator; $sql_query .= col3 = '{$_POST['select3']}' ; $separator = AND ; } run_sql_query_here(...) ? Regards Joakim

RE: [PHP] not parsing vars

2002-07-10 Thread joakim . andersson
Hmm, why post this here when I already answered your question in PHP-DB (where it shouldn't have been in the first place) almost 40 minutes before this post? Regards Joakim Andersson -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002

RE: [PHP] Dos Paths

2002-07-10 Thread joakim . andersson
Hi all, It's actually rather easy. ?php $str_test = passthru(dir /x c:\\myfolder\\); ? After this it's just a matter of parsing the dirlist and extracting the right string... Regards Joakim Andersson PS. dir /x works in Windows 2000, not sure about the others... DS. -Original

RE: [PHP] Re: Images in Mysql

2002-07-10 Thread joakim . andersson
... This is how I do it. Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] imagecopyresized() problems

2002-07-09 Thread joakim . andersson
quality. Then to output the image from another script (not within test.php) use this: img src=test.php Regards Joakim Andersson -Original Message- From: Lance Earl [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 8:54 AM To: [EMAIL PROTECTED] Subject: [PHP] imagecopyresized

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
probably need a group by-statement at the end: GROUP BY whatever_you_need_to_group_by It's really difficult to answer your questions without the table designs, the error message and what you expect this query to do. And, it's not slightly OT. It's totally OT. :-) Regards Joakim Andersson

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
Joakim Andersson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I assume that 2count should really be count and 2 is just the line-number you added in this post... tececo_stats.views is (probably) the name of a column and cannot be used as

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
and thank you for your help. -- JJ Harrison [EMAIL PROTECTED] www.tececo.com Joakim Andersson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I assume that 2count should really be count and 2 is just the line-number you added in t

RE: [PHP] PHP Image Functions

2002-07-09 Thread joakim . andersson
tdimg alt=text src=image_spewing_script.php valign=top //td /tr Regards Joakim Andersson -Original Message- From: Mark Colvin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 11:27 AM To: Php (E-mail) Subject: [PHP] PHP Image Functions I have a directory of jpegs

RE: [PHP] PHP Image Functions

2002-07-09 Thread joakim . andersson
imagejpeg($thumbnail,'test.jpg',$quality); should of course be imagejpeg($thumbnail,'',$quality); Otherwise you are creating a new image on your server and not outputting it to the browser. /Joakim -Original Message- From: Mark Colvin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July

RE: [PHP] Sending data in table, multiple rows, via mail()

2002-07-09 Thread joakim . andersson
wanna do like this instead: $realcontent = ; while ($myrow = mysql_fetch_array($result)) { $realcontent .= $myrow['pid']br; $realcontent .= $myrow['nm']br; $realcontent .= $myrow['q']br; } Regards Joakim Andersson -- PHP General Mailing List (http://www.php.net

RE: [PHP] Bug in SQL can you help?

2002-07-09 Thread joakim . andersson
-Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 12:33 PM To: [EMAIL PROTECTED] Subject: [PHP] Bug in SQL can you help? Here is my SQL(used in a PHP script so this isn't ot) PHP-script or not, it's still an SQL-query, right? I'll

RE: [PHP] How to use transparent png in createfrompng?

2002-07-05 Thread joakim . andersson
Have you tried imagecopyresampled instead? Maybe it solves your problem. It's a long-shot. Requires GD 2.x /Joakim -Original Message- From: Victor Spång Arthursson [mailto:[EMAIL PROTECTED]] Sent: Friday, July 05, 2002 1:03 PM To: [EMAIL PROTECTED] Subject: [PHP] How to use

RE: [PHP] AdRotator for PHP?

2002-07-04 Thread joakim . andersson
I'm pretty sure you'll find what you are looking for here: http://www.hotscripts.com/PHP/Scripts_and_Programs/Ad_Management/ /Joakim -Original Message- From: Patrick Teague [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 04, 2002 1:31 PM To: PHP-General Subject: [PHP] AdRotator for

RE: [PHP] extension problem

2002-07-04 Thread joakim . andersson
You probably shoul start here: http://www.php.net/manual/en/zend.php /Joakim -Original Message- From: adelpfephp [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 04, 2002 4:34 PM To: php-france; [EMAIL PROTECTED] Subject: [PHP] extension problem -- PHP General Mailing List

RE: [PHP] FW: Help please!

2002-07-03 Thread joakim . andersson
Hi, Maybe you can do something like this (if you have access to GD on the server): ? $str_image = my_function_to_read_image_from_db($_GET['id']); $im_old = imagecreatefromstring($str_image); $im_new = imagecreatetruecolor($_GET['width'], $_GET['height']); imagecopyresampled($im_new, $im_old, 0,

RE: [PHP] Simple Example of Passing on a file through a PHP script

2002-07-03 Thread joakim . andersson
Hi, Store all files in a 'secret' folder, preferably outside the www-root. Store filename, size, type, date, whatever in your dB. To link to a file, use something like this a href=download.php?fileid=3MyDoc.pdf/a Then in download.php you update your stats table with the relevant info and then

RE: [PHP] Writing a GIF/JPG Image

2002-07-02 Thread joakim . andersson
Maybe something like this... ?php $filename = Logo.gif; $fd = fopen ($filename, r); $contents = fread ($fd, filesize ($filename)); fclose ($fd); $str_sql = INSERT INTO mytable (myblob) VALUES ('$contents'); $link = mysql_connect(localhost, mysql_user, mysql_password); $dbselect =

RE: [PHP] exists?

2002-03-05 Thread joakim . andersson
Perhaps something like this: if(strpos($searchenquiry, %)) { do }else{ don't } /Joakim -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 9:29 AM To: [EMAIL PROTECTED] Subject: [PHP] exists? It's late, I'm tired. I want to

RE: [PHP] Directory

2002-03-05 Thread joakim . andersson
mkdir() http://www.php.net/manual/en/function.mkdir.php -Original Message- From: Roman Duriancik [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 9:45 AM To: PHP-General Subject: [PHP] Directory Help me, I want create directory on local disc in php script, do you

RE: [PHP] Unable to display images on browser

2002-02-28 Thread joakim . andersson
You need to insert the following lines after this line: Header(Content-type: image/gif); $im = ImageCreateFromString ($fileContent); ImageGif ($im); and then remove this line: echo $fileContent; That should do it. /Joakim -Original Message- From: Narvaez, Teresa [mailto:[EMAIL

RE: [PHP] Unable to display images on browser

2002-02-27 Thread joakim . andersson
Well, you probably need to do something like this: file1.php (where you want to display an image) img src=getimage.php?fileId=42 end file1 getimage.php (the ? needs to be on the first line in the file) ? Code to connect and selected DB not included

RE: [PHP] php - assigning date variables

2002-02-26 Thread joakim . andersson
I think you can't achieve this with the example you've provided. Perhaps something like this will work: query = ; mysql_query(SELECT * FROM table . $query ); query = WHERE date = '2001-01-01'; // This should return all rows with 2001-01-01 as date. query = WHERE date '1995-01-01'; // All items

RE: [PHP] Guestbook question

2002-02-25 Thread joakim . andersson
This example generates previous/next links but could be modified to make links to page 1, 2, 3, 4, etc. This code is not tested what so ever, but it should look something like this: - $rows_to_show = 10; $total_rows = mysql_num_rows(mysql_query(select name, post from guestbook order by

RE: [PHP] Help is_dir command driving me crazy!

2002-01-24 Thread joakim . andersson
Try to add the following line above all code: clearstatcache(); This clears the status from previous is_dir()'s. Good luck, Joakim -Original Message- From: Dean Dunn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 22, 2002 6:11 PM To: [EMAIL PROTECTED] Subject: [PHP] Help

RE: [PHP] Copying file to a network drive (in WinNT4)

2001-10-01 Thread joakim . andersson
Yes, but when you run it from command line it is run with your account that has H:\ mapped. The scheduler is run as the account 'System' and that doesn't know anything about H:\. /Joakim -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 29,