[PHP] Re: Sending file stored on server via email - How?

2007-01-08 Thread Ville Mattila
Matt Arnilo S. Baluyos (Mailing Lists) kirjoitti: What's the easiest way to go about this? Specifically, what's the easiest way to read a file from the server and send it as an email attachment. I would suggest you to use http://phpmailer.sourceforge.net/ that is a featured class for sending e

[PHP] SoapServer and Violation of encoding rules

2006-12-20 Thread Ville Mattila
Hello readers, I am consuming a web service created with PHP from .NET application. I have defined a custom datatype in my WSDL document: http://schemas.xmlsoap.org/wsdl/";> http://www.w3.org/2001/XMLSchema";> My VB.NET is able to see this datatype and

[PHP] Creating custom superglobals

2006-08-14 Thread Ville Mattila
Hello, Does the PHP environment (5.1.4) provide a way to define some custom variables as a superglobal? It would be useful for saving certain site preferences and settings that must be referred in many variables and classes, without every time writing global keyword at the beginning of a func

Re: [PHP] Sending data to persistent process stdin

2006-08-05 Thread Ville Mattila
Stut kirjoitti: 1) Find out how to create a named pipe and start mpg123 to take its input from that named pipe. Your PHP scripts can then write commands to that pipe. Thanks Stut, rather good idea... I tried following commands: mkfifo mpg mpg123 -R < mpg And in another shell echo "LOAD mp3

[PHP] Sending data to persistent process stdin

2006-08-05 Thread Ville Mattila
Hello readers, I have been thinking of making a simple web-based interface to control my media center box (running debian linux). Being a bit enthustiatic, I thought I could use some generic tools for playing media files and write the whole UI by my own. I found mpg123 program that can be ru

Re: [PHP] Re-initiating an autostarted session

2005-05-17 Thread Ville Mattila
[EMAIL PROTECTED] wrote: Look in the user contributed notes in the session-destroy page. There is a function to wipe out the session and has worked nicely for me! http://www.php.net/session_destroy Thank you for a message. Anyway, I could not get it working (the code follows) - I do still have ex

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Ville Mattila
Marek Kilimajer wrote: You are right, unset($_COOKIES) does not remove cookie from the client. You need to unset() it so that your next call to session_start() does not use the same $_COOKIES[session_name()]. session_start will generate new session id if there is not one set in the request variab

Re: [PHP] Re-initiating an autostarted session

2005-05-16 Thread Ville Mattila
Marek Kilimajer wrote: the cookie variable still persists. you need to uset($_REQUEST[session_name()], $_COOKIES[session_name()] ...); Thanks Marek for a reply. I'm not sure but I have been thinking that unset($_COOKIES) does not destroy the cookie from the client side but just unsets the cookie

Re: [PHP] Re-initiating an autostarted session

2005-05-15 Thread Ville Mattila
Leif Gregory wrote: session_destroy(); session_start(); session_write_close(); Header("Location: ..."); exit; I never tried regenerate. Just started a new session again. Hi Leif! Thanks for your reply. For some strange reason, this works not for me. The session cookie will not be overwritten and t

[PHP] Re-initiating an autostarted session

2005-05-11 Thread Ville Mattila
Hi there, I have some problems with PHP session handling. I have set to .htaccess file that PHP will start sessions and use cookies only automatically. Everything works fine until I need to re-initiate the session (give a new session ID and destroy the old one). For some reason, the old session

Re: [PHP] best way todo a case insensitive str_replace

2005-02-21 Thread Ville Mattila
pmpa wrote: What is the best way to do a string insensitive replace? Currently I am doing: I would encourage you to use eregi_replace function that uses regular expressions. $text = eregi_replace("([gr])", "\\1", $text); Ville -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visi

Re: [PHP] Maximum number of emails in mail() command

2005-02-21 Thread Ville Mattila
The Question: I know I can specify multiple email addresses in the BCC field by comma delineating them. But I'm wondering if there is an upper limit to how many email addresses can be attached this way. Is there any upper limit? Are there performance considerations? Is the limit within PHP or

Re: [PHP] Free library for PDF functoins ???

2005-01-18 Thread Ville Mattila
Mário Gamito wrote: Does anyone knows of a free library to compile PHP against and have PDF functions support ? Sure! Take a look at http://www.ros.co.nz/pdf/ . It's a class and doesn't even need any library to compile. So, just include the class file and you'll have a PDF functions available in

Re: [PHP] $_POST

2005-01-17 Thread Ville Mattila
Andrew Maxwell wrote: When you submit something, and you want to make sure that the user inputs all of the info, is there an easier way to do it than this: One method I've done that is to create an array with the required field names, then loop it through and check whether they all have a value.

Re: [PHP] which is best php editor?

2005-01-16 Thread Ville Mattila
QT wrote: Any suggestion for good php editor. My favourite PHP editor is jEdit, one of the best applications ever created. =) http://www.jedit.org/ Ville -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Functions in replacement string of eregi_replace

2005-01-10 Thread Ville Mattila
Hi there! I'm looking for a workaround to carry out a feature similar to that I could use any PHP function inside the replacement string in eregi_replace (or ereg_replace). I have a set of HTML code with some -headers. Now I should convert all HTML headers to uppercase strings. As far as I know

[PHP] Passing regexp substrings to a function

2004-10-25 Thread Ville Mattila
Hi there, I have a few e-mail templates in a file that should be parsed. A template can include also some "module codes" that should be replaced by a return value of a certain function. For example, if the template include a text "{ProductInfo:1032}", the value 1032 would be passed as an argume

[PHP] Lambert's Projection and PHP

2004-09-08 Thread Ville Mattila
wing them or further convertion is impossible. Now I would appreciate your help with this case. Any help is appreciated! Scripts, formulaes and other stuff give valuable help for the project. Thank you! Ville Mattila Ikaalinen, Finland -- PHP General Mailing List (http://www.php.net/) To unsu

[PHP] Defining own globals

2004-01-14 Thread Ville Mattila
Hello, Would it be possible to make all hard-coded variables beginning with $_ automatically global? I've found useful to set some variables per page to $_PAGE variable (for example $_PAGE['title'] etc) that would be nice to get available to all functions without extra procedures (like global

[PHP] Random open_basedir -effection?

2002-10-16 Thread Ville Mattila
Folks, I've noticed that I got "open_basedir restriction in effect" warnings randomly in a random situations. I've seen this error appearing whether the script is using filesystem or not. And the weirdest thing: I don't have any open_basedir restrictions set! Just a second ago I got following er

[PHP] open_basedir without safe mode?

2002-09-11 Thread Ville Mattila
Hi there, I was wondering if there is a possibility to get open_basedir preferences (also set via .htaccess) active in a server running not PHP in open_basedir. I should create a small home site space for some users with PHP equipped, but I don't like to put safe mode on as there are some other a

RE: [PHP] ucwords()? and åäö

2002-09-11 Thread Ville Mattila
I can't say correct answer to this, but want also notify that strtoupper() -function doesn't affect to those special charters å, ä and ö that are very common in Finnish language. Ville -Original Message- From: Tommi Virtanen [mailto:[EMAIL PROTECTED]] Sent: 11. syyskuuta 2002 17:14 To:

[PHP] Problems with GD 2.0.1

2002-09-08 Thread Ville Mattila
Hello everyone, I should get GD 2.0.1 installed to my PHP 4.2.2 binary running as a module in the Apache 1.3. The box is RedHat 7.3. There is a previous version of GD (1.8.4) installed as a default and it seems that I can't even get ereased it due to depencies. Anyway, I'd need that GD 2.0.1 due

[PHP] Dijkstra's Algorithm

2002-07-27 Thread Ville Mattila
Hello there, I found this very good snippet of Dijkstra's Alogrithm here. http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=714 Anyway, I have a rather big node network (5 nodes) and this is getting a bit low. I noted that the script calculates the shortest distance to every node

Re: [PHP] Gradients in PHP & GD

2002-06-26 Thread Ville Mattila
actly! Of course the change can be only across a part of an image. > > > >Ville > > > > > What do you mean by gradients? Is it something like a gradual change > >across > > > an image, say from black to white? > > > Hugh > > > - Orig

Re: [PHP] Gradients in PHP & GD

2002-06-25 Thread Ville Mattila
Exactly! Of course the change can be only across a part of an image. Ville > What do you mean by gradients? Is it something like a gradual change across > an image, say from black to white? > Hugh > - Original Message ----- > From: "Ville Mattila" <[EMA

[PHP] Gradients in PHP & GD

2002-06-25 Thread Ville Mattila
Hello, Does anybody have an idea where could I find a code library or code snippet to create gradients to images with PHP and GD? Thank you, Ville Mattila Ikaalinen, Finland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Copying to network drive (Win32)

2001-10-22 Thread Ville Mattila
nfused explanation but hope that you got the point ;) Cheers, - Ville ..... Ville Mattila Ikaalinen, Finland [EMAIL PROTECTED] www.pilotmedia.fi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED]

[PHP] Thick arc with PHP

2001-10-21 Thread Ville Mattila
Hi there, How it would be possible to draw a "thich" arc with PHP & GD? You can see a picture here about thing I mean: http://www.pilotmedia.fi/xfiles/circle.jpg ImageArc -function is just what I need, but it makes all arcs only 1 pixel width. Any ideas? Cheers, - Ville -- PHP General Ma

[PHP] Always running script

2001-10-18 Thread Ville Mattila
Hi there again, I was wondering that would it be possible to make a script which is always running? Maybe it should be started via console, but there is anyway that maximum execution time limit which should be revoke in this case. Any ideas? - Ville -- PHP General Mailing List (http://www.

[PHP] PDF Download / View

2001-10-18 Thread Ville Mattila
le via that script as the file will be saved as pdf-file? Thanks and cheers, - Ville ......... Ville Mattila Ikaalinen, Finland gsm +358-40-8497506 [EMAIL PROTECTED] www.pilotmedia.fi -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Getting data over https?

2001-09-18 Thread Ville Mattila
Thanks Chris, but I'm using Win32 at the moment... The solution should anyway be compatible with Win32 as well as Linux/Unix. But anyway mainly with Win32. - Ville "Chris Lee" <[EMAIL PROTECTED]> kirjoitti viestissä [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > php doesnt support https url-w

[PHP] Getting data over https?

2001-09-17 Thread Ville Mattila
Hi there, Is there a way to get data over https-protocol as can be done with file("http://www.pilotmedia.fi/";) -function with normal http-protocol? Or some other way? - Ville ..... Ville Mattila Ikaalinen, Finland [EMAIL

[PHP] Mod-function?

2001-09-08 Thread Ville Mattila
can't find what that mod(x, x) -function does. Any idea is there corresponding function in PHP? Cheers, - Ville . Ville Mattila Ikaalinen, Finland [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubs

[PHP] Problems with split

2001-08-13 Thread Ville Mattila
Hi there, First the code: --- $invdate = "14.8.2001"; echo "$invdate\n"; list($day, $month, $year) = split(".", $invdate); echo "$year-$month-$day"; --- Somehow, the second echo outputs only "--" as it should be "2001-8-14". Any idea why this happen and how this could be avoided? Thanks, - Vil

Re: [PHP] newline in preg_split

2001-03-18 Thread Ville Mattila
Hello, If you read the file with file()-function, you can get as a result an array which includes each row of the file. For example: $rows = file("c:\thisfile.txt"); echo $rows[0]; echo $rows[1]; echo $rows[2]; The result should be now like following: core 010105 business 070344 core 020202