[PHP] mail question

2003-02-13 Thread Jonas Geiregat
is it possible to do something like mail("[EMAIL PROTECTED]","subject","hello
if($a){ return andreas; }");
or what would be the best solution for this ?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] general question ?

2003-02-24 Thread Jonas Geiregat
http://kemu.ath.cx/intranet/login.phps
when I press submit everything is OK it works like I want it to work but 
I'm not happy with the result I see in my url window
I see this
http://localhost/intranet/login.php?user=kemu&passwd=test&submit=login
I don't like it that you can know the passwd
is there a way to just make this login.php and not with all the vars I 
send with it

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Removing URL Variables

2003-02-24 Thread Jonas Geiregat
Jim Pringle heeft geschreven:
I've noticed some sites that have variables in the link
(template.php?tpl=fold), but when the page is displayed, the variable is not
visable in URL in the address window.
How do you do this?

thanks


Maybe they redirect you ?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] general question ?

2003-02-24 Thread Jonas Geiregat
Ernest E Vogelsinger heeft geschreven:
At 22:42 24.02.2003, Jonas Geiregat spoke out and said:
[snip]
http://kemu.ath.cx/intranet/login.phps
when I press submit everything is OK it works like I want it to work but 
I'm not happy with the result I see in my url window
I see this
http://localhost/intranet/login.php?user=kemu&passwd=test&submit=login
I don't like it that you can know the passwd
is there a way to just make this login.php and not with all the vars I 
send with it
[snip] 

Make the form a POST form, like this:


---

This will avoid variables travelling along the URL.

For more information on forms, refer to 
http://www.w3.org/TR/REC-html40/interact/forms.html

HTH,


when I add method="post" it doesn't work anymore I always get the form back

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] date question

2002-09-29 Thread Jonas Geiregat

I have a date ex 24/08/02
and I need to see if that date is the same date as it is today (only one 
month later) but 5day's in advanced => that would be 24/09/02
so if(date == date now - 5)
{true}
else{false}

how can I do this right ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: date question

2002-09-29 Thread Jonas Geiregat

and If I want to calculate from given date the next month
like strtotime("next month") gives me the date of one month in advanced 
from NOW
but I want to get the date one month in advanced from a given date not NOW

Jonas Geiregat wrote:
> I have a date ex 24/08/02
> and I need to see if that date is the same date as it is today (only one 
> month later) but 5day's in advanced => that would be 24/09/02
> so if(date == date now - 5)
> {true}
> else{false}
> 
> how can I do this right ?
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] pdf question

2002-09-29 Thread Jonas Geiregat

this is my code


I can't save the pdf file on server cause webserver doesn't have write 
permission to the dir I normally wanted to be in
but I just want to generate a pdf file and send it as attachement with email
how can I do this by generating the pdf in memory


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mail + memory question

2002-09-29 Thread Jonas Geiregat

this is my code what I want to do is
generate a pdf file(not save it on hd of server but in memory)
then send it as attachement to someone

$pdf = pdf_new();

pdf_open_file($pdf,"");
pdf_begin_page($pdf, 595, 842);
pdf_set_font($pdf, "Times-Roman", 30, "host");
pdf_set_value($pdf, "textrendering", 1);
pdf_show_xy($pdf, "A PDF document created in memory!", 50, 
750);
pdf_end_page($pdf);
pdf_close($pdf);
$data = pdf_get_buffer($pdf);


/**
* Filename...: example.3.php
* Project: HTML Mime Mail class
* Last Modified..: 15 July 2002
*/
error_reporting(E_ALL);
include('htmlMimeMail.php');

/**
* Example of usage. This example shows
* how to use the class to send a plain
* text email with an attachment. No html,
* or embedded images.
*
* Create the mail object.
*/
$mail = new htmlMimeMail();

/**
* Read the file test.zip into $attachment.
*/
$attachment = $mail->getFile('test.pdf');

/**
* Since we're sending a plain text email,
* we only need to read in the text file.
*/
$text = $mail->getFile('example.txt');

/**
* To set the text body of the email, we
* are using the setText() function. This
* is an alternative to the setHtml() function
* which would obviously be inappropriate here.
*/  
$mail->setText($text);

/**
* This is used to add an attachment to
* the email.
*/
$mail->addAttachment($attachment, 'test.pdf', 'application/zip');

/**
* Sends the message.
*/
$mail->setFrom('Joe <[EMAIL PROTECTED]');
$result = $mail->send(array('"Richard" <[EMAIL PROTECTED]>'));

echo $result ? 'Mail sent!' : 'Failed to send mail';


the mail get's send but I get this error
Warning: fopen("test.pdf", "rb") - No such file or directory in 
/home/web/intranet/httpdocs/htmlMimeMail.php on line 162
and test.pdf is included in the mail but is 0kb big
anyone sees the prob ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mail + pdf + memory question

2002-09-29 Thread Jonas Geiregat

this is my code what I want to do is
generate a pdf file(not save it on hd of server but in memory)
then send it as attachement to someone

$pdf = pdf_new();

pdf_open_file($pdf,"");
pdf_begin_page($pdf, 595, 842);
pdf_set_font($pdf, "Times-Roman", 30, "host");
pdf_set_value($pdf, "textrendering", 1);
pdf_show_xy($pdf, "A PDF document created in memory!", 50, 
750);
pdf_end_page($pdf);
pdf_close($pdf);
$data = pdf_get_buffer($pdf);


/**
* Filename...: example.3.php
* Project: HTML Mime Mail class
* Last Modified..: 15 July 2002
*/
error_reporting(E_ALL);
include('htmlMimeMail.php');

/**
* Example of usage. This example shows
* how to use the class to send a plain
* text email with an attachment. No html,
* or embedded images.
*
* Create the mail object.
*/
$mail = new htmlMimeMail();

/**
* Read the file test.zip into $attachment.
*/
$attachment = $mail->getFile('test.pdf');

/**
* Since we're sending a plain text email,
* we only need to read in the text file.
*/
$text = $mail->getFile('example.txt');

/**
* To set the text body of the email, we
* are using the setText() function. This
* is an alternative to the setHtml() function
* which would obviously be inappropriate here.
*/  
$mail->setText($text);

/**
* This is used to add an attachment to
* the email.
*/
$mail->addAttachment($attachment, 'test.pdf', 'application/zip');

/**
* Sends the message.
*/
$mail->setFrom('Joe <[EMAIL PROTECTED]');
$result = $mail->send(array('"Richard" <[EMAIL PROTECTED]>'));

echo $result ? 'Mail sent!' : 'Failed to send mail';


the mail get's send but I get this error
Warning: fopen("test.pdf", "rb") - No such file or directory in 
/home/web/intranet/httpdocs/htmlMimeMail.php on line 162
and test.pdf is included in the mail but is 0kb big
anyone sees the prob ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] xinclude

2007-11-19 Thread Jonas Geiregat
I've been playing with DOMDocument->xinclude but it just doesn't seem to
work for me.

test.php:

preserveWhiteSpace = false;
$doc->formatOutput = true;


$doc->load('test.xml');

$doc->xinclude();

$doc->saveXML();
?>

test.xml:



http://www.w3.org/2001/XInclude";>


xinclude: book.xml not found




foo.xml:





sfsd


The output of test.php is nothing plain white space.

Any help is appreciated. 

thanks in advance Jonas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] xinclude

2007-11-19 Thread Jonas Geiregat
Sorry the code works fine, just forgot the echo the output.


On Mon, 2007-11-19 at 22:04 +0100, Jonas Geiregat wrote:
> I've been playing with DOMDocument->xinclude but it just doesn't seem to
> work for me.
> 
> test.php:
> 
>  header('set content-type: text/xml');
> $doc = new DomDocument;
> 
> $doc->preserveWhiteSpace = false;
> $doc->formatOutput = true;
> 
> 
> $doc->load('test.xml');
> 
> $doc->xinclude();
> 
> $doc->saveXML();
> ?>
> 
> test.xml:
> 
> 
> 
> http://www.w3.org/2001/XInclude";>
> 
> 
> xinclude: book.xml not found
> 
> 
> 
> 
> foo.xml:
> 
> 
> 
> 
> 
> sfsd
> 
> 
> The output of test.php is nothing plain white space.
> 
> Any help is appreciated. 
> 
> thanks in advance Jonas
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Should I put pictures into a database?

2007-11-21 Thread Jonas Geiregat


Op 21-nov-07, om 03:45 heeft Bastien Koert het volgende geschreven:



Well, this was just hashed out last week, again.

Its a personal thing. I am against it, having seen the slowdown and  
database bloat caused when this is done. I prefer a pointer to the  
image to be stored in the table and use that. I have found that  
after about 12Gb of binary data gets into the table, it really  
starts to affect perfomance (in mysql).


Using a pointer just makes more sense to me.


The arguments for storing the image:
- automatically backed up with the db (you do back up, right?)
- stored with the relevant backing data

Against:
- more complex to show image
- db bloat (size of db balloons, may affect cost of storage)
- performance slowdowns as image data grows

regards,

bastien> Date: Wed, 21 Nov 2007 10:14:43 +0800> From:  
[EMAIL PROTECTED]> To: php-general@lists.php.net> Subject: [PHP]  
Should I put pictures into a database?> > I have an application,  
where I use pictures. The size of the picture is> about 90kB and to  
speed up the preview, I made a thumbnail of each> picture which is  
about 2.5 to 5kB.> I use now a directory structure of ../$a/$b/$c/ 
> > I wonder if it would be good to put the thumbnails  
into the current> table, in a different table or leave it like it  
is now. Same for the> pictures.> > What is your opinion and why?> >  
bye> > Ronald> > -- > PHP General Mailing List (http://www.php.net/) 
> To unsubscribe, visit: http://www.php.net/unsub.php>

_
Send a smile, make someone laugh, have some fun! Start now!
http://www.freemessengeremoticons.ca/?icid=EMENCA122


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] manipulating XML via php DOM

2007-11-21 Thread Jonas Geiregat
I don't think it is valid to have an opening tag and a closing tag with
nothing in between. So an initial  and a final , as you recall
it, should become .
Second, I'm not sure I understand what you want to accomplish. From the
example document you added is this the result you expect:



  
genus
ontophaugs332
  






Regards 

Jonas

On Tue, 2007-11-20 at 10:27 -0800, pere roca wrote:
> please, I need some help with php DOM, for me it's becoming a hell!
> 
> After trying other methods (check message from 19th november, called "php
> DOM question"), I'm getting a little more success to manipulate XML.
> 
> From the code you can see below you generate this xml. Now I just want to
> keep only the initial  and the final . How can I access and delete
> the other (the "between" tags)? 
> I suppose there is no way to create an initial  without the associated
> .
> Thanks a lot,
> 
> Pere
>  
> This is the WRONG XML generated from code. 
> ...
> 
> 
>   
> genus
> ontophaugs332
>   
> 
> 
> 
>
>  genus
> copris
>
> 
> 
> 
>
>  genus
> copris2
>
> 
> 
> 
>  $species=array('ontophaugs332','copris','copris2');
> $dom = new DOMDocument;
> //XML we will insert the data to
> $dom -> load('edit_iberia3.xml');
> 
> 
> $count=count($species);
> 
> foreach ($species as $sp=>$value) {
> //we pass parameters of the array
> 
>   $where_to_insert= $dom->getElementsByTagName('And')->item(0);
> 
>   $child = $dom->createElement('Or'); 
> $or=$where_to_insert->appendChild($child);
>   
>   $child = $dom->createElement('PropertyIsEqualTo');  
> $first=$or->appendChild($child);
>   
>   $child2 = $dom->createElement('PropertyName');
>   $first->appendChild($child2);
>   
>   $child3 = $dom->createElement('Literal');
>   $first->appendChild($child3);
> 
>   //inserting the array data
>   $values = $dom->createTextNode($value);
>   $values = $child3->appendChild($values);
>  }
> 
> echo $dom->save(nou_iberia);
> ?> 
> -- 
> View this message in context: 
> http://www.nabble.com/manipulating-XML-via-php-DOM-tf4845510.html#a13862945
> Sent from the PHP - General mailing list archive at Nabble.com.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php