[PHP] Send mail and attachment with php - looking for PHP module
Hi, I'm looking for PHP module which allows to send mail and attachment both. Is there any one ? Thank You for any suggestions. Krzysztof -- Muzyka dla Twoich uszu... http://link.interia.pl/f15ac -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail
//-- function sendmail( $From, $To, $CC, $BCC, $Replay_To, $Subject, $Body, $Mailer, $Extra_Header ) { $Header = ''; $Header .= 'From: ' . $From . \n; $Header .= 'Reply-To: ' . $Replay_To . \n; if ( $CC != '' ) { $Header .= CC: . $CC . \n; } if ( $BCC != '' ) { $Header .= BCC: . $BCC . \n; } if ( $Mailer == '' ) { $Header .= X-Mailer: PHP/ . phpversion(); } else { $Header .= $Mailer; } $Header .= $Extra_Header; mail( $To, $Subject, $Body, $Header ); Krzysiek Sven Jacobs wrote: hey Is it possible to put somebody in CC when you use the mail() function ??? -- Aktualnosci gospodarcze. Gielda. Kursy. Stopy. Waluty. Kredyty... Bezplatny Biuletyn Ekonomiczny. http://biznes.interia.pl/biuletyn/ -- Doniesienia z ostatniej chwili http://newsroom.interia.pl/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] BIG PROBLEm with headers
Hi I have problem with downloading any file from my site using IE 5.5 and HTTPS protocol. My php script works fine with Netscape 6.2 and HTTP/HTTPS protocols and with IE 5.5 but only with HTTP protocol. I can't find problem. I use Apache 1.3.20, PHP 4.0.6, mod_ssl 2.8.4 and OpenSSL 0.9.6 on RedHat 7.1 platform. My download php script is so simple, but I present it below: ? header( 'Content-Encoding: gzip'); header( 'Content-Type: application/x-gzip' ); header( 'Content-Disposition: attachment; filename=file.txt.gz' ); readfile( '/tmp/file.txt.gz' ); exit(); ? As I said it works fine with Netscape 6.2 for both HTTP and HTTPS and only with IE 5.5 for HTTP. Is there any expert how can tell me what is it wrong or what I have to do to use IE 5.5 and HTTPS protocol for downloading gziped files (or any other files) from my site. All pages in my site work fine except this simple one. Thank You very much for any help. Krzysiek -- Wejdz do gry! Pilkarska Ruletka! http://ruletka.interia.pl/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP SECOND TIME - header for download gzip file using IE and Netscape with HTTP and HTTPS
Hi I have big problem with headers which I send to www browser: IE 5.5 and Netscape 6.2. On my web site I have PHP script to download huge text files to client side. The text file is compressed by gzip program before it will be downloaded to client. My problem is how to send to www browser correct headers to download gziped file for example text.gz and force www browser to store this file with name text.gz. I tested with protocol http sending headers like below, but it work only with IE 5.5. Using Netscape 6.2 downloaded file should be stored as text.gz but is stored as name of the PHP script. There is PHP code with headers I send to www browser: header( 'Content-Encoding: zip'); header( 'Content-Length: 100' ); header( 'Content-Location: text.gz' ); header( 'Content-Type: application/octet-stream' ); header( 'Content-Type: application/zip' ); header( 'Content-Disposition: filename=text.gz' ); readfile( 'text.gz' ); exit(); When I switched the protocol from http to https the I've got second problem. Downloading gziped file text.gz using IE 5.5 it didn't work completely. IE showed me strange error message with information that this resource couldn't be opened. Using Netscape 6.2 the problem is the same. Thank You for any suggestions. Krzysiek -- Najlepsza bezplatna poczta w Polsce http://poczta.interia.pl/ Jako jedyna oceniona bardzo dobrze przez Komputer Swiat (nr 5/2002) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Correct header to force name to store of download file with IE and Netscape
Hi I have big problem with headers which I send to www browser: IE 5.5 and Netscape 6.2. On my web site I have PHP script to download huge text files to client side. The text file is compressed by gzip program before it will be downloaded to client. My problem is how to send to www browser correct headers to download gziped file for example text.gz and force www browser to store this file with name text.gz. I tested sending headers like below, but it work only with IE 5.5. Using Netscape 6.2 downloaded file should be stored as text.gz but is stored as name of the PHP script. There is PHP code with headers I send to www browser: header( 'Content-Encoding: zip'); header( 'Content-Length: ' . $file_size ); header( 'Content-Location: ' . $file_gz ); header( 'Content-Type: application/octet-stream' ); header( 'Content-Type: application/zip' ); //header( 'Location: ' . $file_gz ); header( 'Content-Disposition: filename=' . $short_file_gz ); Thank You for any suggestions. Krzysiek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading files | how to avoid submitting twice?
In JavaScript define varaible which is global for this page, name it like page_submited, by default set it to false. On submit event set this variable to true and then from JavaScript submit form. When user second time will try to submit the form do nothig, just leave function code. Your JvaScript code is enabled durring your html page is in browesr so it will have to work. I suppose there isn't any other solution. Here is simple code script language=JavaSript form_submited = 0; function submit_only_one() { if ( form_submited ) { return 1; } else { form_submited = 1; document.forms[ 'name_of_your_formform' ].submit(); } } /script input type=button onclick=JavaScript:submit_only_one() I hope I didn't make any JavaScript code errors, I didn't use it for long time. Good luck Krzysztof Andy wrote: Hi there, I would like to upload files using a form. Unfortunatelly it takes a while till the file is uploaded to the server. During this time the same page with the submit button is viewed. If the user clicks another time on the submit button, I get wrong records and sometimes the same file twice. Is there a way to redirect imediatelly to a waiting page? I tryed to redirect, but somehow the server is first uploading the file before something else happens. Thanx for any help Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Header problem
It seems to be bug in IE/Netscape/Other www browser on Mac, that's all. Header wasn't correct interpreted. I had similar problem with NETSCAPE 6 on Windows. I hope they will correct it shortly. Krzysztof Petr Rezek wrote: Here is my question. I wrote a script, which gets parameters from db about document (location on disc, hashed filename and original filename). Then script open this file a send it to user. I use this headers Header(Content-Type: application/download\n); Header(Content-Disposition: attachment;filename=\name_of_file\); Header(Content-Transfer-Encoding: binary); On Windows it works good, but on Mac it doesn't accept name_of_file and try save this file with name of script. What is wrong ? Do you have any idea ?? If I used: Header(Content-Disposition: filename=\jmeno_souboru\); then this script doesn't work also on Windows with Mozilla. Is there any error in MSIE on Mac, isn't it ? Thank you for any idea Petr -- Bojkot dokumentow w formacie Worda? http://komputery.interia.pl/id/arch/www/wysinf_id=218065 -- 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] deleting file contents
recreate it, for example: % exec( 'type your_file_name' ); % Krzysztof DigitalKoala wrote: Hi Everyone, I'm running a script that automatically reads lines from /var/mail/myaccount, parses the lines then insert specific items into a database this is in a loop What i want to do is then delete the contents of the file, but not the file itself...can you tell me the best way to do this? many thanks anna -- 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] Re: best way to handle a form with 60 fields !!!
Fred wrote: Third, it is ineffecient and unneccessary to put 60 fields in a single form. If you are using the GET method it probably will not work since it passes the variable names and values in the URL, which has a maximum length of 255 In my mind maximum length 255 is not true. There isn't any limit for GET/POST requests as I read in RFC documents. The limit depends on Your web server implementation. I've never tested but suppose Apache could handle GET method with URL longer than 255 characters. I've never had problems with form's data length using Apache and GET/POST methods. But if I'm wrong I apologize. Krzysztof -REKLAMA--- Juz w sprzedazy. Katalog Samochodowy AUTO TESTY 2002. Ceny i dane techniczne 1400 samochodow, 236 raportow z jazd, testy porownawcze, wszystko o bezpieczenstwie. -- 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] Write html to file
There is option in PHP (php.ini file) magic_quotes_runtime set it Off.It shuold help You. Restart apache after. Krzysztof [EMAIL PROTECTED] wrote: Hi I have a problem with writing html code to a file.Every time i write html to a file PHP replace every character into a \ character.Further more every nbsp; character will replace into a empty character. So what should i do to stop replacing this character ? Thank you very much! Chris -- Oszczedzaj papier. Nie przestawaj notowac. Z zewnatrz poczta, w srodku takze notatnik. Twoja nowa poczta http://poczta.interia.pl/ -- 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] Loading message
flush() (http://www.php.net/manual/en/function.flush.php) the server cache. By defult Apache caches response to time this is completed. Then it responds. But You can flush() the cache in php code. It can help you not to use JavaScript. Krzysztof Daniel Alsén wrote: Hi, is there a easy way in php to display text like Loading... while elements on a page is being loaded from the server? Regards # Daniel Alsén| www.mindbash.com # # [EMAIL PROTECTED] | +46 704 86 14 92 # # ICQ: 63006462 | # -- Oszczedzaj papier. Nie przestawaj notowac. Z zewnatrz poczta, w srodku takze notatnik. Twoja nowa poczta http://poczta.interia.pl/ -- 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] connect to sybase
Can You describe more detail ??? What kind, version of Sybase server do You use, what version of PHP, what Linux distribution etc... In other case I can't help You. Krzysztof Kocjan Edney Marcel Imm wrote: Hi How I can connect to syBase? Tks -- Sprawdz, jak fantazja staje siê rzeczywistoscia... http://final-fantasy.interia.pl/ -- 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] Problem with simple classes to connect/query to SYBASE database
Hi, I have simple PHP code. ?php /** DB **/ class db { var $connect_id; function open( $database, $host, $user, $password ) { $this-connect_id = @sybase_connect( $host, $user, $password ); if ( $this-connect_id ) { $result = @sybase_select_db( $database ); if ( !$result ) { $this-connect_id = $result; } return $this-connect_id; } else { return 0; } } }; // End class /** QUERY ***/ class query { var $result; var $was_error; function query( $db, $query = ) { global $php_errormsg; global $GLOBALS; $this-was_error=0; //remove comment sings at line below to get OK result //$query = select * from mytab; $this-result = @sybase_query( $query, $db-connect_id ); if( $this-result == FALSE ) { $fh = fopen( /tmp/syberror.log, a ); fwrite( $fh, 'PHP_ERRORMSG:' . $php_errormsg . \n ); fwrite( $fh, 'PHP_ERRORMSG:' . $GLOBALS[ php_errormsg ] . \n ); fwrite( $fh, $query.\n ); fclose( $fh ); $this-was_error = 1; } } function error() { if( $this-was_error ) $result = 1; else $result = 0; return $result; } }; // End class $dbName='mydb'; $dbUser='sa'; $dbPass=''; $dbServer='SYBASE'; $DB = new db(); $DB-open( $dbName, $dbServer, $dbUser, $dbPass ); $q = new query($DB); //dummy query for generic operations $query = select * from mytab; $q-query( $DB, $query ); //there is called query if ( $q-error() ) { //I always get WRONG when doesn't change the value of $query paramater inside query() method print( 'WRONG' ); } else { //I always get OK when change the value of $query paramater inside query() method print( 'OK' ); } ? When I run script above I got WRONG message. Then I changed value of the $query parameter inside query method of query class and rerun the script then I got OK. Funny, isn't it ???. What is it wrong ??? It is NOT MY FIRST TIME when I'm using PHP, Apache and Sybase Adaptive Server Enterprise. Till this time I've never used class for connecting and querying database. I have my own scripts to connect/query SYBASE database, but I tried to use classes. It's more useful and powerful. Second problem. How to get values of the global variables inside methods of any class ??? Code inside method query() doesn't return values of global variable $php_errormsg (trace error flag is ON). Thanks for any help Krzysztof Kocjan --R--E--K--L--A--M--A--- Zapal lampe w sypialni! Swiatlo wzmaga apetyt na seks. http://www.polki.interia.pl/seks/erotyka -- 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] new to php
In head section of HTML page You can include meta tag like below: meta http-equiv=refresh content=2;URL=http://domain.dot.com/loop.php; If loop. php contains that meta tag like it calls itself every 2 seconds. Krzysztof Kocjan Kostis Mentzelos wrote: Hi all, is it possible to create a table that automatically updates its contents every 30 seconds? Thanks in advance, Kostis Mentzelos. -- 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] -- Sledzie z tokajem? Ty decydujesz, co Ci smakuje. Zobacz, jak lamac kulinarne stereotypy. http://www.polki.interia.pl/mistrzyni/porady -- 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] Does PHP work with Sybase ASA?
I suppose You have ASA 6.0 or later version installed on Your machine with Linux. If it is true, then You can install Open Client for ASE 11.0.3 (it is free) and You can communicate via Open Client to ASA. It works only with ASA 6.0 and higher. Then You need to compile PHP with Sybase Open Client. You have to look into guides how to do it on PHP side and Sybase side. I'm not expert about compiling PHP but it only one config file to bulid PHP, there should be section about Sybase Open Client interface, default this is commented. It is not very dificult. If You will have problem You can ask me I will try to help You. We (not only me) had recompiled PHP 3.0/4.0 with Open Client for ASA 11.0.3/11.9.2 (all the combinations). Krzysztof Kocjan Davor Pleskina wrote: I mean, is there in PHP support for Sybase Adaptive Server Anywhere, any version, like for MySQL and some other databases? Thanks. -- 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] --- KONKURS: Niedobre miejsca - 50 ksiazek W. Whartona do wygrania! http://szkola.interia.pl/wharton/strona.html?co=13 -- 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 pass variables to php functions from url's?
Try method=GET in Your form to submit if You want to url be like url?var=value. Or php function header( 'Location: ' .rul . 'var=value' ); That's all You need I hope. Sorry but Your question is not good explained. Krzysztof Kocjan Martin Lindhe wrote: I need to solve the following problem, but I can't figure out how: Let's assume we have a server called www.test.com When a user access http://www.test.com/path/username, I want a php script to execute, as if the url entered was http://www.test.com/path.php?value=username. I'm running PHP 4.0.6 on Apache 1.3.20. I've looked at both PHP and Apache documentation about this, but i havent found any information or examples on how this could be solved, so I'm asking the question here in hope for help. Thanks! /Martin Lindhe -- 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] --- KONKURS: Niedobre miejsca - 50 ksiazek W. Whartona do wygrania! http://szkola.interia.pl/wharton/strona.html?co=13 -- 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] Build and install PHP 4.0 and Apache 1.3.20 on Digital-Unix 4.0e
Hi Is it possible to bulid PHP 4.0 and Apache 1.3.20 on Digital Unix 4.0E, DEC ALPHA. I've only bulid and installed them on RedHat 6.x and 7.x, few times without any problems :-))) . Is there any problems on Digital Unix. Thank You for Your any advice or comments. Krzysztof Kocjan --R--E--K--L--A--M--A-- Czym jest asertywnosc? Przeczytaj i nie pozwol sie wykorzystywac! http://www.polki.interia.pl/rodzina/partnerstwo -- 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: Posting data through PHP scripts
I've never used method virtual but it seems to fit Your problem. Explanation below. Krzysztof Kocjan virtual (PHP 3, PHP 4 = 4.0b1) virtual -- Perform an Apache sub-request Description int virtual (string filename) virtual() is an Apache-specific function which is equivalent to !--#include virtual...-- in mod_include. It performs an Apache sub-request. It is useful for including CGI scripts or .shtml files, or anything else that you would parse through Apache. Note that for a CGI script, the script must generate valid CGI headers. At the minimum that means it must generate a Content-type header. For PHP files, you need to use include() or require(); virtual() cannot be used to include a document which is itself a PHP file. Jean Madson wrote: I have been thinking about a thing. If I have a PHP script (a) which receives some data by a POST method only -- GET method is track to not be accepted --, and if I have another PHP script (b) that takes initial input from the user's browser... Well, the question is: how can I, in the script b, take the input data and post it to script a and receive its response, following by processing it and giving back the response to the browser? The user wouldn't see the action of script a in any way. To the user, only script b would exist. I think I can do this by using Delphi, but in PHP this task seens to be a nightmare. browser ==input== b ==post== a... ...a ==response== b ==response== browser Is this possible with PHP 3 or later? -- 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]