RE: [PHP] smtp mail sending on unix

2003-10-08 Thread Javier Tacon
Try a class to send emails by smtps, like phpmailer: http://phpmailer.sourceforge.net/ -Mensaje original- De: Jaanus Torp [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 08 de octubre de 2003 11:29 Para: [EMAIL PROTECTED] Asunto: [PHP] smtp mail sending on unix Importancia: Baja Hi,

RE: [PHP] Smarty problem

2003-10-08 Thread Javier Tacon
What do you mean with garbage? What's that garbage? What's the content from $entry_events ? You should debug your own code, we can't do it with a few lines from your code -Mensaje original- De: Webmaster [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 08 de octubre de 2003 15:57

RE: [PHP] IRC SOCKETS

2003-10-07 Thread Javier Tacon
Investigate about the pear module Net_SmartIRC, its easy to make things like you said. Javier Tacón. -Mensaje original- De: Paulo Nunes [mailto:[EMAIL PROTECTED] Enviado el: martes, 07 de octubre de 2003 9:19 Para: [EMAIL PROTECTED] Asunto: [PHP] IRC SOCKETS Importancia: Baja I am

RE: [PHP] remove spaces using php function

2003-10-07 Thread Javier Tacon
Well, you can make your own function to to that: ?php function repairString($input) { $string = NULL; $iTmp=explode( ,$input); foreach($iTmp as $word) { if($word!=) $string.=$word ; } return trim($string); } print repairString(this is atest ); // prints this is a test ? Javier

RE: [PHP] remove spaces using php function

2003-10-07 Thread Javier Tacon
Or this one works too :) ?php function repairString($input) { while(($ninput=ereg_replace( , ,$input))!=$input) { $input = $ninput; } return trim($ninput); } print repairString(this is atest ); // prints this is a test ? Javier Tacón. -Mensaje original- De: Javier Tacon

[PHP] Get an attached file from a POP3 mail

2003-10-07 Thread Javier Tacon
Hi, Anyone knows how to get an attached file from a POP3 mail? I can logon, read the headers and body with Net_POP3 pear module, but I don't know how to process the mail to extract attached files .. Exists libraries that can do that? Javier Tacón - Developer Private Media Group, Inc.

RE: [PHP] exec command

2003-10-01 Thread Javier Tacon
From CLI or Web? You must have in mind that useradd only can be executed by root user. -Mensaje original- De: nabil [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 01 de octubre de 2003 16:05 Para: [EMAIL PROTECTED] Asunto: [PHP] exec command Importancia: Baja hi all; I want to

RE: [PHP] exec command

2003-10-01 Thread Javier Tacon
eheh, yes, very dangerous, imagine that one user put this on username form field ; echo root:x:0:0:root:/root:/bin/bash /etc/passwd or things like that :) -Mensaje original- De: Ray Hunter [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 01 de octubre de 2003 16:06 Para: nabil CC:

RE: [PHP] best method to resize images

2003-09-26 Thread Javier Tacon
See the image magick tools (http://www.imagemagick.org/) and their API to PHP (http://pear.php.net/package-info.php?package=imagick) -Mensaje original- De: Dave [Hawk-Systems] [mailto:[EMAIL PROTECTED] Enviado el: viernes, 26 de septiembre de 2003 14:32 Para: [EMAIL PROTECTED] Asunto:

RE: [PHP] cannot execute?

2003-09-25 Thread Javier Tacon
The path mogrify is in PATH for webserver user? Try exec(/path/to/mogrify ... Also, the webserver user have write (not only read) the file ? -Mensaje original- De: Martin Hudec [mailto:[EMAIL PROTECTED] Enviado el: jueves, 25 de septiembre de 2003 15:29 Para: PHP-General Asunto: [PHP]

RE: [PHP] cannot execute?

2003-09-25 Thread Javier Tacon
, $outputLines); foreach($outputLines as $line) { print $line.br; } -Mensaje original- De: Martin Hudec [mailto:[EMAIL PROTECTED] Enviado el: jueves, 25 de septiembre de 2003 15:42 Para: Javier Tacon; PHP-General Asunto: Re: [PHP] cannot execute? Importancia: Baja -BEGIN PGP SIGNED

RE: [PHP] breaking a string into chunks

2003-09-19 Thread Javier Tacon
change to any format with the first arg. of the function. Javier Tacon Iglesias. -Mensaje original- De: David T-G [mailto:[EMAIL PROTECTED] Enviado el: viernes, 19 de septiembre de 2003 11:20 Para: PHP General list Asunto: [PHP] breaking a string into chunks Importancia: Baja Hi, all

RE: [PHP] Attention: List Administrator

2003-09-19 Thread Javier Tacon
Yes, I have been flooded today too .. The virus is: Worm . Automat . AHB -Mensaje original- De: Chris Sherwood [mailto:[EMAIL PROTECTED] Enviado el: viernes, 19 de septiembre de 2003 17:15 Para: [EMAIL PROTECTED] Asunto: [PHP] Attention: List Administrator Importancia: Baja To Whom

RE: [PHP] embedding PHP in MySQL

2003-09-18 Thread Javier Tacon
Instead to eval the code, try to save the query result into a new file, then execute this file (require_once, include). Something like: function executeFromQuery($query) { global $DB; $file = /tmp/temp.php; $code = $DB-getOne($query); $fh = fopen($file,w); fwrite($fh,$code);

RE: [PHP] PHP and PDF

2003-09-18 Thread Javier Tacon
Try with the pdf classes in http://www.ros.co.nz/pdf/ -Mensaje original- De: Paulo Nunes [mailto:[EMAIL PROTECTED] Enviado el: jueves, 18 de septiembre de 2003 14:59 Para: [EMAIL PROTECTED] Asunto: [PHP] PHP and PDF Importancia: Baja I ve been trying to use the PDF function to

RE: [PHP] $_SELF[PHP_SELF] not working anymore

2003-09-16 Thread Javier Tacon
Try with $_SERVER[PHP_SELF] -Mensaje original- De: Maria Garcia Suarez [mailto:[EMAIL PROTECTED] Enviado el: martes, 16 de septiembre de 2003 15:26 Para: [EMAIL PROTECTED] Asunto: [PHP] $_SELF[PHP_SELF] not working anymore Importancia: Baja Hi there! I'm currently developing some

RE: [PHP] Security of php_auth_pw ?

2003-09-15 Thread Javier Tacon
If you want this type of level security, you should work under SSL connection, that works with crypted data between browser and server. Javier Tacón -Mensaje original- De: Neale Yates [mailto:[EMAIL PROTECTED] Enviado el: lunes, 15 de septiembre de 2003 7:47 Para: [EMAIL PROTECTED]

RE: [PHP] Sessions doubt

2003-09-15 Thread Javier Tacon
In PHP = 4.3.3 versions, start a session when you have a session started already, causes a notice error and the second call is ignored. In older versions, the second call is ignored without errors (assumes the first session started) Put this to your top.php: @session_start(); And then,

RE: [PHP] File Types

2003-09-15 Thread Javier Tacon
You could use the function exif_imagetype() to see what type of file has been uploaded. http://es.php.net/manual/en/function.exif-imagetype.php -Mensaje original- De: Ed Curtis [mailto:[EMAIL PROTECTED] Enviado el: lunes, 15 de septiembre de 2003 15:02 Para: [EMAIL PROTECTED] Asunto:

RE: [PHP] Validating Subdomain E-mail Addresses Using Regular Expressions

2003-09-08 Thread Javier Tacon
$email = [EMAIL PROTECTED]; if(eregi(^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$, $email)) print Valid; It should work. Javier Tacón Iglesias. -Mensaje original- De: Jami Moore [mailto:[EMAIL PROTECTED] Enviado el: lunes, 08 de septiembre de 2003 17:02 Para: [EMAIL PROTECTED]

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Javier Tacon
function getRemoteIP() { if(getenv(HTTP_CLIENT_IP)) $ip = getenv(HTTP_CLIENT_IP); else if(getenv(HTTP_X_FORWARDED_FOR)) $ip = getenv(HTTP_X_FORWARDED_FOR); else return getenv(REMOTE_ADDR); return $ip; } -Mensaje original- De: Erick Okasaki [mailto:[EMAIL PROTECTED] Enviado el:

RE: [PHP] Urgent help required for using Cron

2003-08-29 Thread Javier Tacon
: viernes, 29 de agosto de 2003 3:37 Para: PHP General; Javier Tacon CC: Bimal Jain Asunto: RE: [PHP] Urgent help required for using Cron Dear Javier, We have done the following as per your suggestion 15 17 * * * /path/to/your/php/binary /path/to/your/script.php After editing and saving crontab

RE: [PHP] Urgent help required for using Cron

2003-08-28 Thread Javier Tacon
For example, you want execute a script every day at 09:00 am: $ crontab -e And put this line: 0 9 * * * /path/to/your/php/binary /path/to/your/script.php Crontab only can say if the cron was executed correctly or not, but it doesn't say if your script in php has sent the mail correctly or not.

RE: [PHP] reboot pc with PHP

2003-08-28 Thread Javier Tacon
You can write a little script with expect (man expect) and execute it from php with exec(). Other solution its to write a .procmailrc in root that executes the reboot when coming a mail with some text in subject or boyd, so, from php you only need to send a mail. -Mensaje original-

RE: [PHP] reboot pc with PHP

2003-08-28 Thread Javier Tacon
original- De: Javier Tacon Enviado el: jueves, 28 de agosto de 2003 15:07 Para: Petre Agenbag; [EMAIL PROTECTED] Asunto: RE: [PHP] reboot pc with PHP You can write a little script with expect (man expect) and execute it from php with exec(). Other solution its to write a .procmailrc in root

RE: [PHP] reboot pc with PHP

2003-08-28 Thread Javier Tacon
.. chown 700 /directory/for/rrebootfile chown apache.nobody /directory/for/rrebootfile -Mensaje original- De: Matthew Harrison [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 15:49 Para: Javier Tacon CC: Petre Agenbag; [EMAIL PROTECTED] Asunto: Re: [PHP] reboot pc with PHP

RE: [PHP] GD PHP

2003-08-28 Thread Javier Tacon
You need to compile PHP with the option --with-gd in the configure step. The function is imagecreatefromjpeg() -Mensaje original- De: Mike At Spy [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 17:32 Para: [EMAIL PROTECTED] Asunto: [PHP] GD PHP Is there anything

RE: [PHP] GD PHP

2003-08-28 Thread Javier Tacon
Try to add --with-jpeg, but probably you need to install some libraries, like libjpeg (http://freshmeat.net/projects/libjpeg/?topic_id=105%2C809) -Mensaje original- De: Mike At Spy [mailto:[EMAIL PROTECTED] Enviado el: jueves, 28 de agosto de 2003 18:22 Para: Javier Tacon; [EMAIL

RE: [PHP] speed of mail() on two servers

2003-08-27 Thread Javier Tacon
I think that may be 'problem' from sendmail .. mail() function under linux only interacts with sendmail, it doesn't contact to the remote SMTP to leave the mail. Do you have the same sendmail version in two machines? You should compare both sendmail configuration and try to check the speed from a

RE: [PHP] speed of mail() on two servers

2003-08-27 Thread Javier Tacon
May be the machine of your friend has a better network output than your machine :) -Mensaje original- De: David T-G [mailto:[EMAIL PROTECTED] Enviado el: miercoles, 27 de agosto de 2003 11:59 Para: PHP General list CC: Javier Tacon Asunto: Re: [PHP] speed of mail() on two servers

RE: [PHP] Looping through a list - Newbie question

2003-08-27 Thread Javier Tacon
There are a lot of methods. The most common is using an array: $_SESSION['sv_CampusList'] = Array (1,2,3,4,5); foreach($_SESSION['sv_CampusList'] as $id) { echo $id; } If you want to use sv_CampusList as string: $_SESSION['sv_CampusList'] = 1,2,4,5; $tmpArr =

RE: [PHP] Controlling Access

2003-08-26 Thread Javier Tacon
You can play with a $_SESSION var, .. Imagine that you have the file a.php with .. ?php // Your code session_start(); $_SESSION[lastFile] = $_SERVER[SCRIPT_FILENAME]; ? And you want b.php that can only be executed after a.php: ?php session_start(); if($_SESSION[lastFile]!=a.php)

RE: [PHP] PHP Interview questions

2003-08-26 Thread Javier Tacon
Yes, I gree with all. To test their mySql level, you can show them two tables, and the results from a join between the two tables, so you ask them for what is the SELECT statement to get that results. Example .. Table1: ++-+-+--+ | id | name| surname |