Re: [PHP] URGENT! Need help with command line for list all new/modified files within the last 24 hours

2012-10-26 Thread Alan Hoffmeister
2012/10/25  l...@afan.net:
 Hi to all,
 My site with Drupal 7. I contacted tech support and he said he accessed to
 the site with FTP - what I doubt. But if it's truth - it's even worse
 because whole server is then compromised.
 I need help with command line for list all new/modified files within the
 last 24 hours.

 Thanks for any help,
 LAMP


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


Easy one.
1) List all files within a directory recursively:
http://php.net/manual/en/function.readdir.php
2) Now just excract the modification time of each file:
http://php.net/manual/en/function.filemtime.php
3) Print on the screen those with modificication time  than 24 hours
4) Profit!

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



Re: [PHP] Serving an image

2012-10-16 Thread Alan Hoffmeister
2012/10/15 viper recursivepoin...@gmail.com:
 On Mon, Oct 15, 2012 at 5:48 PM, Rick Dwyer rpdw...@earthlink.net wrote:
 I am sending an email with a logo at the top of the email.  The source of 
 the image for the logo is:

 http://myurl.com/image.php?id=5

 Image.php then calls a function that simply returns the following:



 $image='img src=http://myurl.com/images/logo.jpg; /';
 return $image;



 Calling the page directly via the URL http://myurl.com/image.php?id=5 works 
 fine.
 But when the email is opened, I get the broken link/image icon even though I 
 can see in my source that the URL which works when loaded into a browser.

 What needs to be done to serve that image to a email client when it is 
 opened?

 in image.php you should return an image/xxx file and not an HTML tag.
 try something like this:

 image.php:

 $im = imagecreatefrompng(test.png);
 header('Content-Type: image/png');
 imagepng($im);
 imagedestroy($im);

 then in your email you can put:
 img src=http://myurl.com/image.php?id=5; /


What is the diference between using imagecreatefrompng() and readfile()?
Any performance improvement?

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



[PHP] Good tutorial for compiling last PHP with Apache support from source

2012-10-01 Thread Alan Hoffmeister
Hello fellows,

Does any one know a good guide for noobs to compile last PHP with
Apache support from source code? I was planning to use Ubuntu 11.10.
Already googled it but could only find old references that cannot be
used anymore.

Thanks.

--
Att,
Alan Hoffmeister

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