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 w

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] 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 : "); } } closedir($handle); file://check if the directory exist for last month file://Folder's Name $folder=date("M",mktime(0,0,0,$previousmonth,1,$currentyear)); $dirname="Oct-02"; if (is_dir("Oct-02")) { print ("G

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] 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] Re: Using strtotime on 'old' dates.

2003-01-23 Thread Joakim Andersson
tes pre-1970 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] 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:

RE: [PHP] Re: Cry for help

2002-09-12 Thread joakim . andersson
t;|", $buffer); // Divides each row into separate elements in an array. echo $arr[4]; // Prints the 5th element of each row. // The first element ($arr[0]) is actually "" (an empty string) since each line starts with |. } fclose ($fd); Hopefully this will get you in the rig

RE: [PHP] Re: Cry for help

2002-09-12 Thread joakim . andersson
wser you will see that the lines are separated. To do a line break in the browser you have to insert the correct html () instead. > You see my 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 v

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 enou

RE: [PHP] Writing a GIF/JPG Image

2002-07-02 Thread joakim . andersson
Maybe something like this... If you are going to use this with different types of images you should probably store the content-type along with the image in the dB. /Joakim > -Original Message- > From: Brandon [mailto:[EMAIL PROTECTED]] > Sent: Saturday, June 29, 2002 3:52 AM > To: [EM

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): /Joakim > -Original Message- > From: Steve Vernon [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 02, 2002 9:43 PM > To: [EMAIL PROTECTED] > Subject: [PHP] FW: Help please! > > > Hello, > I hav

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 MyDoc.pdf Then in download.php you update your stats table with the relevant info and then send the file to the user. | do

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

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 Mail

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 tra

RE: [PHP] imagecopyresized() problems

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

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
d you 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. :-) Rega

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
tececo_stats whe' at line 2 > > What I want to do: This is essentially a script for a stats > program that I > am writting that returns the number of hits for each page. Instead of > looping a query I decieded to try and join the two tables to > make it more > efficiant. I

RE: [PHP] Grr SQL syntax error silghtly OT

2002-07-09 Thread joakim . andersson
#x27;].'< > > /td>'; > > } > > ?> > > > > > do_html_footer(); > > ?> > > > > error message: > > Query failed: select count(tececo_stats.*) as tececo_stats.views, > > meta_data.title from meta_data and tececo_stats whe

RE: [PHP] PHP Image Functions

2002-07-09 Thread joakim . andersson
Well, you're halfway there... You just have to separate the image-script from the rest like this: image_spewing_script.php: and in the other file (your actual page): Regards Joakim Andersson > -Original Message- > From: Mark Colvin [mailto:[EMAI

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
} while ($myrow = mysql_fetch_array($result)); > } > > "; You might wanna do like this instead: $realcontent = ""; while ($myrow = mysql_fetch_array($result)) { $realcontent .= "$myrow['pid']"; $realcontent .= "$myrow['nm']

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

RE: [PHP] Re: Wildcard

2002-07-10 Thread joakim . andersson
Regards Joakim Andersson > -Original Message- > From: César Aracena [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 12:50 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP] Re: Wildcard > > > Ok. Maybe I didn't express myse

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: Wedn

RE: [PHP] Dos Paths

2002-07-10 Thread joakim . andersson
Hi all, It's actually rather easy. ? 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 Message- > From: BB [mailto:[EMAIL PR

RE: [PHP] Re: Images in Mysql

2002-07-10 Thread joakim . andersson
llways be unique, otherwise you probably have trouble with your dB aswell... 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] 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

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

2002-07-16 Thread joakim . andersson
low-speed version until you 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 tho

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,

RE: [PHP] Create Thumbnail from Blob online

2002-07-16 Thread joakim . andersson
t; thank you for any answer, tommi > You're welcome! Regars Joakim Andersson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

RE: [PHP] Upload File Problem

2002-07-18 Thread joakim . andersson
mean if($img1 != "") However, I'm not sure this will work in this case. Try this instead. (Taken straight from the PHP-manual. A real good resource!) If you use PHP < 4.1.0 you must exchange $_FILES to $HTTP_POST_FILES Regards Joakim Andersson -- PHP General Mailing Li

RE: [PHP] draw statistics

2002-07-18 Thread joakim . andersson
Graphs_and_Charts/ Regards 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
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

RE: [PHP] PHP & HASP

2002-07-18 Thread joakim . andersson
t. Regards 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

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']))'

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

2002-07-19 Thread joakim . andersson
> > ($str would now be 'abc4567hijklmnop') Hi, substr_replace() does exactly what you want. $newstring = substr_replace($str, "4567", 4, 4); 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
de not tested. You might want to check 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] 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] 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] 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'"; // A

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) end file1 getimage.php (the ---end getimage.php Good Luck /Joakim > -Original Message- > From: Narvaez, Teresa [mailto:[EMAIL PROTECTED]] > Sent: Wednesd

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 PROT

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

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, > d

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, 2