Re: [PHP] Best way to start a CRON
I run several PHP scripts via CRON in the following way: put the following in the top of the php script: #!/usr/local/bin/php -q (linux system - location of php bin) and in the CRONTAB I have the following: 10 1 * * * root /usr/local/bin/php -q /script/CRONexport.php the -q supress HTML headers. hope this helps! Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services Barry [EMAIL PROTECTED] wrote: Hello Everyone! What would be the best way to start a PHP Script via CRONJOB? Should i use the 'php' command or use curl or lynx or something to open that URL? The Script does a MySQL query, collects data and sends it via E-Mail every monday morning to the recipient. Any help will be appriciated :) Barry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dynamic array_merge problem
Hi if you just want to sort of concatenate your arrays then why not just loop through the whole thing in order to get the new single array. Need more info for further consideration. Hope this helps! for ($i=0;$icount($z);$i++){ $z1[$i] = $z[$i]; } Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services Ace McKool [EMAIL PROTECTED] wrote: Hi, This is the end result I'm trying to get: $z1 = array_merge($z[0], $z[1], $z[2]); But what if I don't know how many elements are in $z? I tried this (but it breaks if there are more than 2 elements in $z): for ($i=0; $icount($z); $i++) { if ($i(count($z)-1)) { $z1 = array_merge($z[$i], $z[$i+1]); } } Any pointers would be greatly appreciated! TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDFLib or some free solution?
Hi I have used fpdf quite a lot (http://www.fpdf.org) and have been really impressed with its performance. There are plenty of example scripts on their website and i think you can use it comercially for free although you will have to check that one out. Regards Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services [EMAIL PROTECTED] wrote: Hi, I have to create some flyers and invoices (simple stuff) in one my project. On php.net/pdf is mentioned PDFLib, but I know there is a free solution too. It's commercial and can't have PDFLib for free. My questions are: - Is really $450 for PDFLib worth comparing to free solution? (I need for really simple stuff) - Is there a difference (look and programming) and how big it is, between PDFLib and free solution? Could you please give me some directions? Thanks. -afan Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDFLib or some free solution?
Results may well vary Depending on the complexity of the html pages, but have you tried using the example script 'HTML Conversion'? you could modify this/expand it to fit your needs. worth a try i would of thought. Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services [EMAIL PROTECTED] wrote: As I said in prev post, there is a problem with converting HTML to PDF: FAQ 19. Can I convert an HTML page to PDF with FPDF? Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results: http://www.htmldoc.org Does it has anything with building flyer using php and html tags? Hi I have used fpdf quite a lot (http://www.fpdf.org) and have been really impressed with its performance. There are plenty of example scripts on their website and i think you can use it comercially for free although you will have to check that one out. Regards Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services [EMAIL PROTECTED] wrote: Hi, I have to create some flyers and invoices (simple stuff) in one my project. On php.net/pdf is mentioned PDFLib, but I know there is a free solution too. It's commercial and can't have PDFLib for free. My questions are: - Is really $450 for PDFLib worth comparing to free solution? (I need for really simple stuff) - Is there a difference (look and programming) and how big it is, between PDFLib and free solution? Could you please give me some directions? Thanks. -afan Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date Question
Hi How about doing this in the query string you send to mysql: DATE_FORMAT(fieldname, '%d %m %y') this way you wont have to mess around with the array stuff. for more info look here http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Regards Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services Tom Chubb [EMAIL PROTECTED] wrote: Please can you help me. I've created a page where problems are posted into a database and I am using the datetime format in MySQL and trying to find the best way to display it in the 17/03/06 format. I've found a way of doing it (so you don't think I haven't googled, RTFM) but don't think it's the best way. Any help would be appreciated. (Current Code:) ?php $datestr = $row_rsSnags['date']; $arr1 = str_split($datestr, 2); echo $arr1 [2]; echo /; echo $arr1 [1]; echo /; echo $arr1 [0]; // echo $row_rsSnags['date']; ? Pure Web Solution http://www.purewebsolution.co.uk PHP, MYSQL, Web Design Web Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php