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
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
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
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
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;
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
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
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
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
.
// 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
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
);
Regards
Joakim Andersson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
to $HTTP_POST_FILES
Regards
Joakim Andersson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
Joakim Andersson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
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
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
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
/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
' 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
']))
{
$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
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
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
...
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
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
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
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
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
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
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
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
-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
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
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
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
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,
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
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 =
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
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
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
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
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
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
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
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,
50 matches
Mail list logo