[PHP] Re: Converting HTML to BBCode [SOLVED]

2006-03-07 Thread J_K9
.. :D Cheers, J_K9 First of all, the back-slashes added before a character is probably because of the gpc_magic_quotes directive in PHP, wich tries to escape the quotes (pretty stupid, if you ask me), so you must have to use strip_slashes() on the string you received, e.g

[PHP] Re: Converting HTML to BBCode

2006-03-06 Thread J_K9
41 ---/ERROR--- Thanks for your help so far! It'd be great if this works out ;) Cheers, J_K9 Here is an example for you. First make an array like this: $translate_array= array( ' ' = ' amp; ', '' = 'amp;', 'WOD'= 'Wamp;OD', 'O' = 'amp;O', 'MF' = 'Mamp;F

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Curt Zirzow wrote: On Tue, Feb 14, 2006 at 09:02:50PM +, J_K9 wrote: Hi, I'm currently learning PHP, and I'd like to put it into practice to help me learn. I want to make a download script so that if the value of a certain variable is '1', the first download is selected, if it's '2

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Barry wrote: J_K9 wrote: Curt Zirzow wrote: On Tue, Feb 14, 2006 at 09:02:50PM +, J_K9 wrote: Hi, I'm currently learning PHP, and I'd like to put it into practice to help me learn. I want to make a download script so that if the value of a certain variable is '1', the first

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Barry Krein wrote: J_K9 wrote: Barry wrote: J_K9 wrote: Curt Zirzow wrote: On Tue, Feb 14, 2006 at 09:02:50PM +, J_K9 wrote: Hi, I'm currently learning PHP, and I'd like to put it into practice to help me learn. I want to make a download script so that if the value of a certain

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Barry wrote: J_K9 wrote: This is what I used: ?php // fix for IE catching or PHP bug issue header(Pragma: public); header(Expires: 0); // set expiration time header(Cache-Control: must-revalidate, post-check=0, pre-check=0); // browser must download file from server instead of cache

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
); header(Content-Length: .filesize($path)); readfile($path); ? html head titleDownloads/title /head body /body /html Any idea what could be going wrong? Thanks, J_K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
was encountered while trying to use an ErrorDocument to handle the request. Thanks, J_K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Duncan Hill wrote: On Wednesday 15 February 2006 11:05, J_K9 wrote: Here's the exact 500 error I'm getting: Standard Apache error. Look in your error log for more details like it suggests? I would, but I can't find it. I thought it was under /var/log, but having taken a good look I just

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Duncan Hill wrote: On Wednesday 15 February 2006 11:35, J_K9 wrote: Duncan Hill wrote: On Wednesday 15 February 2006 11:05, J_K9 wrote: Here's the exact 500 error I'm getting: Standard Apache error. Look in your error log for more details like it suggests? I would, but I can't find it. I

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
Barry wrote: J_K9 wrote: Duncan Hill wrote: On Wednesday 15 February 2006 11:35, J_K9 wrote: Duncan Hill wrote: On Wednesday 15 February 2006 11:05, J_K9 wrote: Here's the exact 500 error I'm getting: Standard Apache error. Look in your error log for more details like it suggests

Re: [PHP] Routing downloads through PHP

2006-02-15 Thread J_K9
that into a server. I've already contacted my hosters, so I should receive an answer pretty soon. As for the code - lemme get down to setting up that server ;) Thanks guys for all your help - I'll let you know if it works out! J_K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] Routing downloads through PHP - Thanks!

2006-02-15 Thread J_K9
Thanks everyone, especially Barry for that great script which I've tested on a home server and _does_ work... So, I'm going to wait for my external hosting company to get back to me and alter the files there so that it'll work on my website. Thanks again! ;-) J_K9 -- PHP General Mailing

Re: [PHP] missing modules ??? help please ...

2006-02-15 Thread J_K9
path to take. Cheers, J_K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] HN CAPTCHA at http://www.phpclasses.org

2006-02-15 Thread J_K9
there... Cheers, J_K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Routing downloads through PHP

2006-02-14 Thread J_K9
displaying where the file is. How can I do this? Thanks, J_K9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Routing downloads through PHP

2006-02-14 Thread J_K9
? Thanks, J_K9 Russell Jones wrote: ? $fileid = $_GET['file_id']; $filearray = array( a0=filename.zip, a1=filename2.zip, a2=filename3.zip); $location = $filearray['a'.$fileid]; if($location!='') { header(LOCATION: $location); } ? ? -- PHP General Mailing List (http

Re: [PHP] Routing downloads through PHP

2006-02-14 Thread J_K9
(Reply beneath quotes) Richard Lynch wrote: On Tue, February 14, 2006 3:41 pm, J_K9 wrote: ? $fileid = $_GET['file_id']; $filearray = array( a0=data/download1.zip, a1=data/download2.zip); $location = $filearray['a'.$fileid]; if($location!='') { header(LOCATION: $location