RE: [PHP] Simple preg I think [SOLVED]
Thanks to everyone who answered my request for help with this. Yes, as some of you have pointed out, the pattern was correct but my logic was wrong. So once again thank you to all that helped. Dave C :-) -Original Message- From: Liu Jihua [mailto:[EMAIL PROTECTED] Sent: 31 May 2004 01:53 To: Dave Carrera Subject: Re: [PHP] Simple preg I think Dave Carrera You are right! $str= asdf./test; echo preg_match(/\.\//, $str ,$arr); //print 1 print_r($arr); === 2004-05-30 11:55:00 === Hi List, How do I match an accordance of ./ in a string (without the quotes) ? I have tried preg_match(/\.\//i, $str); Which I thought would work , as per the manual, but no joy. Any help or guidance is appreciated Thank you in advance Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = = = = = = = = = = = = = = = = = = = = Liu Jihua [EMAIL PROTECTED] 2004-05-31 --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send HTML/plain text email using PHP
Just as an FYI, the following line will get your email a lot of spam points in SpamAssassin: $headers .= X-MSMail-Priority: High\r\n; Also, I don't know if this has already been suggested, but there is an awesome class named htmlMimeMail which will handle your needs perfectly. Google it and you will have everything you need. -JEremy On Friday 28 May 2004 05:49 am, Matt MacLeod wrote: I've been having a little trouble configuring a script to send a multipart email using PHP. The script send the message, but when I recieve the email it doesn't display the HTML version and I have to tell my mail client to displlay the plain text version (Mail on OS X 10.3.3). Here's the script: $headers .= FROM: [EMAIL PROTECTED]; $headers .= Reply-To: [EMAIL PROTECTED]; $nonhtml = strip_tags($emailsend); // This is the important part! // This content type identifies the content of the message. // The boundary delimits the plain text and html sections. // The value of the boundary can be anything - you can even use the same one we used here $headers .= Content-Type: multipart/alternative; boundary=\=_NextPart_000_002C_01BFABBF.4A7D6BA0\\n\n; $headers .= X-Priority: 1\r\n; $headers .= X-MSMail-Priority: High\r\n; $headers .= X-Mailer: PHP/ . phpversion().\r\n; $headers .= X-Sender: [EMAIL PROTECTED]; $headers .= Return-Path: [EMAIL PROTECTED]; // Now begin your message, starting with the delimiter we specified in the boundary // Notice that two extra dashes (--) are added to the delimiters when // They are actually being used. $message = '--=_NextPart_000_002C_01BFABBF.4A7D6BA0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit '; $message .= $nonhtml; $message .=' '; // Now begin your HTML message, starting with the delimiter // Also notice that we add another content-type line which // lets the mail client know to render it in HTML $message .= '--=_NextPart_000_002C_01BFABBF.4A7D6BA0 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit '; $message .= $emailsend.' --=_NextPart_000_002C_01BFABBF.4A7D6BA0--'; // Now send the mail. // The additional header, -f [EMAIL PROTECTED] is only required by // some configurations. echo $message; $v = '[EMAIL PROTECTED]'; mail($v, Test, $message ,$headers,-f [EMAIL PROTECTED]); Any ideas would be gratefully received! Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CVS web front end
Although I have never seen a full app, I have seen PHP code which handles checkin/checkout of files as a class. I don't know if that will help you, but if it will then please let me know and I will dig it up. -Jeremy On Saturday 29 May 2004 09:50 pm, Brian V Bonini wrote: On Sat, 2004-05-29 at 15:01, Johan Holst Nielsen wrote: Lists wrote: As far as I can see, it have nothing to do with an web frontend? you're so right. I meant to send the link for horde http://www.horde.org/chora/ Are you able to check out files? check in etc.? As far as I can see - it is just a web cvs viewer? The request was Not just a file/project browser... Anyway - thanks for the link to tcvs :D I have downloaded it and I like it :D Since a web based CVS front-end is looking slim how about a recommendation on a web based file sharing app.? (possibly with some sort of primitive version control.) -- s/:-[(/]/:-)/g BrianGnuPG - KeyID: 0x04A4F0DC | Key Server: pgp.mit.edu == gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC Key Info: http://gfx-design.com/keys Linux Registered User #339825 at http://counter.li.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simple calender
Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey, been looking at a lot of calenders most of them are either too big for my use (whole page), not free, in javascript or too complicated. I require a calender that is simple, loads fast,small and not javascript, the closest I found is at: http://scripts.franciscocharrua.com/calendar.php just two problems with it, 1. It does not have the days on top (eg: s,m,t,w,t,f,s - sunday, mondayetc) 2. (not required but would be nice if it would) allow me to link from the days of the calender to some page/s I guess I could modify the above calender as it pretty good + open source...but if anybody is using a calender already which is like the above + the 1 or two points I wroteyour response would be appreciated. ;-) Hi Ryan, there is an excellent calendar package in PEAR with good documentation: http://pear.php.net/package/Calendar Here is a simple sample script to build a calendar that can easily be modified: http://pear.php.net/manual/en/package.datetime.calendar.intro-inahurry.php Hope this helps. regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Coding Standards
Travis Low [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have to say I like everything about the PEAR coding standards except for the KR bracing style. I much prefer: if( foo ) { blah; } to if( foo ) { blah; } The latter form (KR) conserves vertical space, but I find it a lot harder to follow. Harder to move blocks of code around too. I'm sure plenty of people disagree, so of course this is IMHO. Hi Travis, I totally agree with you. I'm coding this way: if (foo) { // code } elseif (bar) { // code } else { // code } This makes it very easy to follow if/elseif/else structures in code. But the PEAR style is the one usually used in Java as well so I guess it's the style most people use. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PEAR Mail/smtp sending problem
Christopher J. Mackie wrote: I'm following the PEAR docs to use Mail/SMTP. Below is the code I use, swiped directly from the docs--I've changed the authorization data to protect privacy, but otherwise it's identical (and email sent from a client on this same machine using the same settings works fine). I'm running PHP 4.3.6 ISAPI on Win2k3 Server, IIS6.0. No errors are generated back to me, but the messages aren't going through. I can't see the smtp server logs, so I don't know what's failing. Well, there might be errors that you aren't seeing. I have modified your code, run it and see if you get any new information : ?php error_reporting(E_ALL); require_once('Mail.php'); $recipients = '[EMAIL PROTECTED]'; $headers['From'] = '[EMAIL PROTECTED]'; $headers['To'] = '[EMAIL PROTECTED]'; $headers['Subject'] = 'Test message'; $body = 'Test message'; $params['host'] = 'smtpserver.princeton.edu'; $params['auth'] = TRUE; $params['username'] = 'cjm'; $params['password'] = 'mypass'; $params['port'] = '25'; $mail_object = Mail::factory('smtp', $params); if (PEAR::isError($mail_object)) { die($mail_object-getMessage()); } $mail_object-send($recipients, $headers, $body); if (PEAR::isError($mail_object)) { die($mail_object-getMessage()); } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Simple calender
Ryan, with a bit of tweaking you can edit that script to what you want. heres an example = ?php function calendar($date) { //If no parameter is passed use the current date. if($date == null) $date = getDate(); $day = $date[mday]; $month = $date[mon]; $month_name = $date[month]; $year = $date[year]; $this_month = getDate(mktime(0, 0, 0, $month, 1, $year)); $next_month = getDate(mktime(0, 0, 0, $month + 1, 1, $year)); //Find out when this month starts and ends. $first_week_day = $this_month[wday]; $days_in_this_month = floor(($next_month[0] - $this_month[0]) / (60 * 60 * 24)); $calendar_html = table style=\background-color:99; color:ff;\; $calendar_html .= trtd colspan=\7\ align=\center\ style=\background-color:cc; color:00;\ . $month_name . . $year . /td/tr; $calendar_html .= tr; $calendar_html .= tdS/td; $calendar_html .= tdM/td; $calendar_html .= tdT/td; $calendar_html .= tdW/td; $calendar_html .= tdT/td; $calendar_html .= tdF/td; $calendar_html .= tdS/td; $calendar_html .= /tr; $calendar_html .= tr; //Fill the first week of the month with the appropriate number of blanks. for($week_day = 0; $week_day $first_week_day; $week_day++) { $calendar_html .= td style=\background-color:cc; color:00;\ /td; } $week_day = $first_week_day; for($day_counter = 1; $day_counter = $days_in_this_month; $day_counter++) { $week_day %= 7; if($week_day == 0) $calendar_html .= /trtr; $dispDate = $day_counter . . $month_name . . $year; //Do something different for the current day. if($day == $day_counter) $calendar_html .= td bgcolor=\#FF\ align=\center\ba href=\show.php?date= . urlencode($dispDate) . isToday=1\ . $day_counter . /a/b/td; else $calendar_html .= td align=\center\ style=\background-color:cc; color:00;\a href=\show.php?date= . urlencode($dispDate) . isToday=0\ . $day_counter . /a/td; $week_day++; } $calendar_html .= /tr; $calendar_html .= /table; return($calendar_html); } echo calendar(NULL); ? = Ryan A [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hey, been looking at a lot of calenders most of them are either too big for my use (whole page), not free, in javascript or too complicated. I require a calender that is simple, loads fast,small and not javascript, the closest I found is at: http://scripts.franciscocharrua.com/calendar.php just two problems with it, 1. It does not have the days on top (eg: s,m,t,w,t,f,s - sunday, mondayetc) 2. (not required but would be nice if it would) allow me to link from the days of the calender to some page/s I guess I could modify the above calender as it pretty good + open source...but if anybody is using a calender already which is like the above + the 1 or two points I wroteyour response would be appreciated. ;-) Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] installing php4 in windows 2000
i have configured apache 2.0.49 in my system and included the following lines of code in my http:conf file LoadModule php4_module c:/php/sapi/php4apache2.dll AddType application/x-httpd-php .php i have also configured the php.ini file and created a test script(phpinfo.php,placed it in my htdocs directory) to check whether php has been properly installed or not but when i run the testscript by entering the follwoing line in the address bar of internet explorer localhost/phpinfo.php i get the following error message HTTP 404 - File not found Internet Explorer can somebody please help me to know where am i going wrong
[PHP] Re: installing php4 in windows 2000
Rohit Mohta wrote: i have configured apache 2.0.49 in my system and included the following lines of code in my http:conf file LoadModule php4_module c:/php/sapi/php4apache2.dll AddType application/x-httpd-php .php i have also configured the php.ini file and created a test script(phpinfo.php,placed it in my htdocs directory) to check whether php has been properly installed or not but when i run the testscript by entering the follwoing line in the address bar of internet explorer localhost/phpinfo.php i get the following error message HTTP 404 - File not found Internet Explorer Check if the DocumentRoot is right in your httpd.conf - it should be the same as the location where phpinfo.php is located. -- Johan Holst Nielsen Freelance PHP Developer http://phpgeek.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anyone interested in freelance/part time job?
Hi, we have a few projects which requires suitable people to provide coding work for PHP/MySQL and HTML. If you are interested, please email me so that I can provide you with more info. FYI, system analysis and design is completed. Only require development work. Thanks! Davis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Socket w/SSL Issues
PHP is installed without openssl here at pair. I want to make a socket call to port 443 on a server and I'm getting an error from fsocketopen() that no ssl support is built in, of course. I thought that using ssl:// might work around this, but I guess not. Any ideas for me? $host = my.host.com; $port = 443; $path = /my/app/path; $request = urlencode('my xml request'); $fp = fsockopen(ssl://.$host, $port, $errno, $errstr, $timeout = 30); if(!$fp){ //error tell us echo $errstr ($errno)\n; }else{ //send the server request fputs($fp, POST $path HTTP/1.1\r\n); fputs($fp, Host: $host\r\n); fputs($fp, Content-type: application/x-www-form-urlencoded\r\n); fputs($fp, Content-length: .strlen($request).\r\n); fputs($fp, Connection: close\r\n\r\n); fputs($fp, $request . \r\n\r\n); //loop through the response from the server while(!feof($fp)) { echo fgets($fp, 4096); } //close fp - we are done with it fclose($fp); } Thanks in advance. Steve
Re: [PHP] installing php4 in windows 2000
Is your php.ini in the windows or winnt directory? i have configured apache 2.0.49 in my system and included the following lines of code in my http:conf file LoadModule php4_module c:/php/sapi/php4apache2.dll AddType application/x-httpd-php .php i have also configured the php.ini file and created a test script(phpinfo.php,placed it in my htdocs directory) to check whether php has been properly installed or not but when i run the testscript by entering the follwoing line in the address bar of internet explorer localhost/phpinfo.php i get the following error message HTTP 404 - File not found Internet Explorer can somebody please help me to know where am i going wrong -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] BUTTONS
Hi all I came across this on freshmeat, I thought I must share it http://phpbutton.sourceforge.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multiple checkbox help
I tried this HTML: input name=deleteID value=1 type=checkbox input name=deleteID value=2 type=checkbox $_REQUEST['deleteID'] === the last box checked. so I did a google search and changed my HTML to: input name=deleteID[] value=1 type=checkbox input name=deleteID[] value=2 type=checkbox Now the code: for ($i = 0; $i count($_REQUEST['deleteID']); $i++){ echo deleting ' . $value . '; } has the right count but how do I get the values out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: multiple checkbox help
On Mon, 31 May 2004 10:50:52 -0400 [EMAIL PROTECTED] (Bob Lockie) wrote: I tried this HTML: input name=deleteID value=1 type=checkbox input name=deleteID value=2 type=checkbox $_REQUEST['deleteID'] === the last box checked. so I did a google search and changed my HTML to: input name=deleteID[] value=1 type=checkbox input name=deleteID[] value=2 type=checkbox Now the code: for ($i = 0; $i count($_REQUEST['deleteID']); $i++){ echo deleting ' . $value . '; } has the right count but how do I get the values out? echo deleting ' . $_REQUEST['deleteID'][$i] . '; regards, thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multiple checkbox help
Change $_REQUEST to $_POST (a little more secure). foreach( $deleteID as $key = $value) { echo 'deleting ' . $value . 'br /' ; } I tried this HTML: input name=deleteID value=1 type=checkbox input name=deleteID value=2 type=checkbox $_REQUEST['deleteID'] === the last box checked. so I did a google search and changed my HTML to: input name=deleteID[] value=1 type=checkbox input name=deleteID[] value=2 type=checkbox Now the code: for ($i = 0; $i count($_REQUEST['deleteID']); $i++){ echo deleting ' . $value . '; } has the right count but how do I get the values out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multiple checkbox help
Thanks to all those who responded. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] R: [PHP] multiple checkbox help
I usually use this approach: INPUT NAME=myName[1] VALUE=CHECKED TYPE=CHECKBOX . . INPUT NAME=myName[N] VALUE=CHECKED TYPE=CHECKBOX --- foreach($_REQUEST['myName'] as $id = $value) { if($value == CHECKED) array_push($idArray, $id); } if something is not clear, let me know cheers, A. -Messaggio originale- Da: Bob Lockie [mailto:[EMAIL PROTECTED] Inviato: lunedi 31 maggio 2004 16.51 A: php-general Mailing List Oggetto: [PHP] multiple checkbox help I tried this HTML: input name=deleteID value=1 type=checkbox input name=deleteID value=2 type=checkbox $_REQUEST['deleteID'] === the last box checked. so I did a google search and changed my HTML to: input name=deleteID[] value=1 type=checkbox input name=deleteID[] value=2 type=checkbox Now the code: for ($i = 0; $i count($_REQUEST['deleteID']); $i++){ echo deleting ' . $value . '; } has the right count but how do I get the values out? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] duplicating a row
I want to duplicate a row (back it up - copy to a table with the same schema) regardless of the table schema. This in MySQL but I need a solution that can be made easily portable to other databases. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: duplicating a row
http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html Bob Lockie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to duplicate a row (back it up - copy to a table with the same schema) regardless of the table schema. This in MySQL but I need a solution that can be made easily portable to other databases. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] duplicating a row
INSERT INTO new_table (column1, column2, ...) SELECT column1, column2, ... FROM original_table I want to duplicate a row (back it up - copy to a table with the same schema) regardless of the table schema. This in MySQL but I need a solution that can be made easily portable to other databases. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: duplicating a row
On 05/31/04 11:42 Craig spoke: http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html Bob Lockie [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to duplicate a row (back it up - copy to a table with the same schema) regardless of the table schema. This in MySQL but I need a solution that can be made easily portable to other databases. Perfect. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] multiple checkbox help
Bob Lockie wrote: I tried this HTML: input name=deleteID value=1 type=checkbox input name=deleteID value=2 type=checkbox $_REQUEST['deleteID'] === the last box checked. so I did a google search and changed my HTML to: input name=deleteID[] value=1 type=checkbox input name=deleteID[] value=2 type=checkbox Now the code: for ($i = 0; $i count($_REQUEST['deleteID']); $i++){ echo deleting ' . $value . '; } has the right count but how do I get the values out? $_POST['deleteID'][0] will be the first checked checkbox value, $_POST['deleteID'][1] will be the second, etc. count($_POST['deleteID']) will tell you how many were checked, implode(',',$_POST['deleteID']) will give you a comma separated list, etc, etc... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD Library Upgrade
I'm working with a host on a Linux box with PHP 4.2.2. The version of GD Library they have is 1.8.4. I was uploading some pictures using a script that leveraged GD Library 2+. Using the php version with the newer GD library seemed to produce a better quality image. I have two questions: 1 - Can a newer version of GD Library (1.8.4 vs 2+) make a difference in image quality? 2 - I'd like to upgrade the Linux box that has PHP 4.2.2 and GD Library 1.8.4 to the most recent version. Is this easy? Any guidance? Do I need a patch? PS - I've been working off of this site: http://www.boutell.com/gd but wanted to bounce this around with some experts first.
[PHP] Re: Re: drop down menu populated from a directory
I gave it a go, and I got the error: Parse error: parse error, unexpected '}' This was on the last }. Now I am brand new at php, but should there not be an opening and closing curly bracket? in this code there are one { and three } So I made my code: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; closedir($handle); } ? And it does display the name in the menu... so that is a good start, but the link doesn't work when selected. So I am assuming hte code does need those brackets, and I rather need to open the opening one... d On 31-May-04, at 2:39 AM, [EMAIL PROTECTED] wrote: From: Torsten Roehr [EMAIL PROTECTED] Date: May 30, 2004 5:14:28 PM PDT To: [EMAIL PROTECTED] Subject: Re: drop down menu populated from a directory Dustin Krysak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there What I am hoping to do is have a drop down menu that would be populated from the contents of a directory via php. Now The link names would be generated by the file name minus the file extension. Has anyone seen a tutorial on accomplishing something like this? All of the links would be to quicktime movies, but I am hoping to have them embedded in HTML (or PHP). So the movie is displayed in a browser thanks in advance! This should do the trick: // opening select tag goes here... if ($handle = opendir('/path/to/files')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; } } closedir($handle); } // closing select tag goes here Haven't tested it. Hope it works and helps ;) Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Referer problem
Hi there, I am trying to prevent hotlinking of images by other servers. Pictures are generated on the fly by a php script, where I have included this code to prevent hot linking: $haystack = $_SERVER['HTTP_REFERER']; $needle = 'globosapiens'; $pos = strpos($haystack, $needle); if ($pos === false) { // not from globosapiens HEADER(Location:/g/p/2/hotlink_banner.gif); exit; } It workes, but not for everybody. Some user tell me that they see the hotlink_banner.gif on my website as well. How is this possible? Has anybody an idea on where the error is, and how to fix it?` Thank you in advance, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Re: drop down menu populated from a directory
With the SELECT drop down, you'd need a submit button, and then the value of $file would be passed to the next page and read. There you could open that file. So I made my code: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; closedir($handle); } ? And it does display the name in the menu... so that is a good start, but the link doesn't work when selected. So I am assuming hte code does need those brackets, and I rather need to open the opening one... d -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Re: drop down menu populated from a directory
Dustin Krysak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I gave it a go, and I got the error: Parse error: parse error, unexpected '}' Sorry there are some braces missing. Please try this: if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) { if ($file != '.' $file != '..') { $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; } } closedir($handle); } Regards, Torsten This was on the last }. Now I am brand new at php, but should there not be an opening and closing curly bracket? in this code there are one { and three } So I made my code: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; closedir($handle); } ? And it does display the name in the menu... so that is a good start, but the link doesn't work when selected. So I am assuming hte code does need those brackets, and I rather need to open the opening one... d On 31-May-04, at 2:39 AM, [EMAIL PROTECTED] wrote: From: Torsten Roehr [EMAIL PROTECTED] Date: May 30, 2004 5:14:28 PM PDT To: [EMAIL PROTECTED] Subject: Re: drop down menu populated from a directory Dustin Krysak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there What I am hoping to do is have a drop down menu that would be populated from the contents of a directory via php. Now The link names would be generated by the file name minus the file extension. Has anyone seen a tutorial on accomplishing something like this? All of the links would be to quicktime movies, but I am hoping to have them embedded in HTML (or PHP). So the movie is displayed in a browser thanks in advance! This should do the trick: // opening select tag goes here... if ($handle = opendir('/path/to/files')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; } } closedir($handle); } // closing select tag goes here Haven't tested it. Hope it works and helps ;) Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referer problem
Merlin wrote: Hi there, I am trying to prevent hotlinking of images by other servers. Pictures are generated on the fly by a php script, where I have included this code to prevent hot linking: $haystack = $_SERVER['HTTP_REFERER']; $needle = 'globosapiens'; $pos = strpos($haystack, $needle); if ($pos === false) { // not from globosapiens HEADER(Location:/g/p/2/hotlink_banner.gif); exit; } It workes, but not for everybody. Some user tell me that they see the hotlink_banner.gif on my website as well. How is this possible? Has anybody an idea on where the error is, and how to fix it?` Thank you in advance, Merlin Many personal firewall softwares remove the referer header. The solution is simple, don't check the referer if it's blank. HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: drop down menu populated from a directory
ok, I added brackets and made my code to: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) { if ($file != '.' $file != '..') { $fileName = str_replace('.mov', '', $file); echo 'option value=../../../mov/' . $file . '' . $fileName . '/option'; } } closedir($handle); } ? when viewing my page in a browser, it worked! Now what I am hoping to do is put this menu on a PHP page, and have a qt movie placeholder and when this menu is used - replace the placeholder with the selected qt movie... I am just not sure how to do this. Thanks in advance! d On 31-May-04, at 10:26 AM, Dustin Krysak wrote: I gave it a go, and I got the error: Parse error: parse error, unexpected '}' This was on the last }. Now I am brand new at php, but should there not be an opening and closing curly bracket? in this code there are one { and three } So I made my code: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; closedir($handle); } ? And it does display the name in the menu... so that is a good start, but the link doesn't work when selected. So I am assuming hte code does need those brackets, and I rather need to open the opening one... d On 31-May-04, at 2:39 AM, [EMAIL PROTECTED] wrote: From: Torsten Roehr [EMAIL PROTECTED] Date: May 30, 2004 5:14:28 PM PDT To: [EMAIL PROTECTED] Subject: Re: drop down menu populated from a directory Dustin Krysak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there What I am hoping to do is have a drop down menu that would be populated from the contents of a directory via php. Now The link names would be generated by the file name minus the file extension. Has anyone seen a tutorial on accomplishing something like this? All of the links would be to quicktime movies, but I am hoping to have them embedded in HTML (or PHP). So the movie is displayed in a browser thanks in advance! This should do the trick: // opening select tag goes here... if ($handle = opendir('/path/to/files')) { while (false !== ($file = readdir($handle))) if ($file != '.' $file != '..') $fileName = str_replace('.mov', '', $file); echo 'option value=' . $file . '' . $fileName . '/option'; } } closedir($handle); } // closing select tag goes here Haven't tested it. Hope it works and helps ;) Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: drop down menu populated from a directory
Dustin Krysak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ok, I added brackets and made my code to: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) { if ($file != '.' $file != '..') { $fileName = str_replace('.mov', '', $file); echo 'option value=../../../mov/' . $file . '' . $fileName . '/option'; } } closedir($handle); } ? when viewing my page in a browser, it worked! Now what I am hoping to do is put this menu on a PHP page, and have a qt movie placeholder and when this menu is used - replace the placeholder with the selected qt movie... I am just not sure how to do this. This should be easy. Please post your QT placeholder (HTML) code. Then we can help. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Text file
What would be the easiest way to open a text file, remove a line if the line begins with a word from an array of words (there are 5 words I will be looking for) then write that back to the text file with everything removed Thanks Alan
[PHP] Test Files
What would be the easiest way to open a text file, remove a line if the line begins with a word from an array of words (there are 5 words I will be looking for) then write that back to the text file with everything removed Thanks Alan
Re: [PHP] triggering php scripts...
At 10:19 PM 5/30/2004, you wrote: Chris Wagner wrote: i am wondering if there is a good way to trigger a php script from a web page *without* sending the user to a new page or opening a new browser windows. for instance, suppose you wanted to make a button/link on a web page that, when clicked, would cause a database entry to be decremented. however, you do not want to refresh the page or open a popup window or any stinky little tricks like that. Use a virtual include to call the php script. I like to use dummy image files for this purpose and a little bit of javascript to change the image src. On page load, a simple spacer.gif is loaded. If a particular link or button is clicked, I'll replace the image src with, for example, dosomething.php?action=changeitvalue=newvalue. dosomething.php performs the required functions and simply returns a blank gif image as output. The result is that your script is executed and the page doesn't have to reload. This method can also be used with real images. I use it with a file cart on my site as well, only this time, the first image loaded is cart_add.gif and when they click it, it calls the script to add the file to their cart and that script returns cart_remove.gif I wouldn't suggest using this in mission critical settings, unless you plan on making sure the user has javascript turned on, but on a hobby site it works well. or, if this is not possible, does anyone know how to trigger a php script when someone accesses a particular file from an apache server? or if a file from a particular directory is downloaded... I don't think you can do that unless the php script is used to access the file or perform the download you speak of. I also use this method to count downloads. php script fetches the actual file and serves it up, at the same time incrementing the download count. This is also handy, as you can prevent people from getting to the actual files by placing them in a directory outside the webroot. cheers, Travis -- Travis Low mailto:[EMAIL PROTECTED] http://www.dawnstar.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Referer problem
Merlin wrote: I am trying to prevent hotlinking of images by other servers. Pictures are generated on the fly by a php script, where I have included this code to prevent hot linking: $haystack = $_SERVER['HTTP_REFERER']; $needle = 'globosapiens'; $pos = strpos($haystack, $needle); if ($pos === false) { // not from globosapiens HEADER(Location:/g/p/2/hotlink_banner.gif); exit; } It workes, but not for everybody. Some user tell me that they see the hotlink_banner.gif on my website as well. How is this possible? HTTP_REFERER is not a reliable value. It is set by the client and some clients and/or proxies will either not set it or clear it's value. You'd be best to handle this at the web server level. You could use sessions, too, and set a session variable on one of the pages leading into your gallery and then check for that variable when they request images. It can be spoofed (like any other solution), but it would take some work. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Text Streaming in PHP
Hey All, I know I asked this before a couple of weeks ago, but I need a good swift kick in the right direction :D I need to know how to do a text stream in PHP. I have tried the following: while loop with flush and sleep functions HTTP/1.1 Connection: Stream (seems to work in the above while loop until you post something then its like it stalls completely) Are there any other ways? I was looking at GTChat lastnight and it mentioned about sending a file line by line to achieve a server push like effectanyone know how to do this? Only way I will consider Java is if it will stream a HTML page and someone can point me in a direction to grab one Any help in the above questions would be greatly appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to verify that data is in a blob?
I want to verify that there is data (doesn't matter whether it's valid data or not) inside a MySQL blob using a PHP function. How do I do this? Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text Streaming in PHP
On Mon, 2004-05-31 at 15:28, Stephen Lake wrote: Hey All, I know I asked this before a couple of weeks ago, but I need a good swift kick in the right direction :D I need to know how to do a text stream in PHP. I have tried the following: while loop with flush and sleep functions HTTP/1.1 Connection: Stream (seems to work in the above while loop until you post something then its like it stalls completely) Make sure output buffering is off... you may also need to pad output since if I remember correctly some browsers do their own buffering (IE I think). Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Slightly OT Mysql question
Hi List, Sorry for this question being slightly OT but its is to due with my Php script in a way. MySql has stopped adding rows since the db table hit 1mb... Anyone know why ? I have search mysql.com docs and other web resources but can not figure it out. Running FreeBSD 4.7 and MySql 3.23.58 if that helps Thank you in advance for any help or guidance and once again sorry for being a bit OT. Dave C --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.692 / Virus Database: 453 - Release Date: 28/05/2004 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Receiving an associative array from Flash
Hey what would the syntax look like if I was receiving an array from flash. Assume that it is inside a class with a proper contructor class receiveRemoting{ function receiveRemoting{ //ALL THE CONFIG STUFF } function receiveArrayFromFlash($arrayFromFlash){ //THIS IS WHERE I NEED HELP } } I am not sure that whould got inside receiveArrayFromFlash() so I cound manipulate the array values. You can assume that they all will be strings integer ordered TIA R - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text file
alantodd wrote: What would be the easiest way to open a text file, remove a line if the line begins with a word from an array of words (there are 5 words I will be looking for) then write that back to the text file with everything removed ?php $lookfor = array('one','two','three','four','five'); $pattern = implode('|',$lookfor); $filedata = file('yourfile.txt'); foreach($filedata as $key = $line) { if(preg_match(/^($pattern)/i,$line)) { unset($filedata[$key]); } } $newfiledata = implode(\n,$filedata); $fp = fopen('yourfile.txt','w'); fwrite($fp,$newfiledata); fclose($fp); ? Untested, but something like that. Read file into an array, loop through each line trying to match word at beginning. If there's a match, remove line, then write new data at the end. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP]
What's the difference between function myfunction() { } and function myfunction() { } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]
Oops... I mean, what's the difference between function myfunction() { } and function myfunction() { } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]
The ampersand indicates that the function is returning by reference: http://www.php.net/references.return Chris René Fournier wrote: Oops... I mean, what's the difference between function myfunction() { } and function myfunction() { } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP login script
I'm looking for some good, secure login code, and found the following article: http://www.devshed.com/c/a/PHP/Creating-a-Secure-PHP-Login-Script/ Not being much of a security expert, I was wondering if anyone here could say whether this code is any good? Or if there's a better one elsewhere? (I'm developing with MySQL, and do not know object-oriented PHP or PEARwhich this samplel uses.) ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] shortcut if
No syntax error but this always returns 's'. $add = $delete_count 0 ? s : x; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Secure login script
The link I posted previously is causing me some grief, apparently because I don't know the first thing about object-oriented PHP or PEAR. Here's the thing: If I MUST learn these two things in order to copy the security of the sample script, I will, but is it really necessary in your opinion? ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shortcut if
Bob Lockie wrote: No syntax error but this always returns 's'. $add = $delete_count 0 ? s : x; That means $delete_count is always greater than 0 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shortcut if
Bob Lockie wrote: No syntax error but this always returns 's'. $add = $delete_count 0 ? s : x; Hmm.. that's odd because if(false) { return false; } always returns false for me... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] compiling php with mysql ver3 or 4
Hello , How can I compile PHP so that it does not mater what version of mysql is installed. If I compile it for mysql 3.X and then upgrade mysql to ver 4 PHP will not install. I get error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file this is how I am compiling php It is being compiled into Apache not as a DSO ./configure --prefix=/usr/php --with-mysql=/usr/ --with-config-file-path=/usr/conf --with-exec-dir=/usr/apache/bin --disable-debug --enable-safe-mode --enable-magic-quotes --enable-debugger --enable-track-vars --with-ftp --enable-sockets --enable-ftp --with-apache=../apache make make install -- Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] compiling php with mysql ver3 or 4
--- Richard Kurth [EMAIL PROTECTED] wrote: Hello , How can I compile PHP so that it does not mater what version of mysql is installed. If I compile it for mysql 3.X and then upgrade mysql to ver 4 PHP will not install. I get error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file this is how I am compiling php It is being compiled into Apache not as a DSO ./configure --prefix=/usr/php --with-mysql=/usr/ --with-config-file-path=/usr/conf --with-exec-dir=/usr/apache/bin --disable-debug --enable-safe-mode --enable-magic-quotes --enable-debugger --enable-track-vars --with-ftp --enable-sockets --enable-ftp --with-apache=../apache make make install I don't have a Linux box where I can test out my suggestion to you, but here is what you can try: 1. from your php directory: rm config.cache 2. after that command, run: make clean That should take care of the previous PHP installation. Now try running your ./configure, make, and make install as you have listed above. By the way, your --with-mysql=/usr/ does not look like a complete path to your MySQL installation. Of course, I cannot say for sure... you know better than I do where it is installed and what the directory is called. = ~Rachel __ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Socket w/SSL Issues
Hello, On 05/31/2004 10:14 AM, Steve Douville wrote: PHP is installed without openssl here at pair. I want to make a socket call to port 443 on a server and I'm getting an error from fsocketopen() that no ssl support is built in, of course. I thought that using ssl:// might work around this, but I guess not. Any ideas for me? You can try using the support for CURL library or in the worst case try using a trusted HTTP proxy that forwards SSL HTTP connections. You may want to try this class that can be used for what you and uses whatever support is available in your PHP environment to establish SSL connections: http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Text Streaming in PHP
On 05/31/2004 04:28 PM, Stephen Lake wrote: I know I asked this before a couple of weeks ago, but I need a good swift kick in the right direction :D I need to know how to do a text stream in PHP. I have tried the following: while loop with flush and sleep functions HTTP/1.1 Connection: Stream (seems to work in the above while loop until you post something then its like it stalls completely) Are there any other ways? I was looking at GTChat lastnight and it mentioned about sending a file line by line to achieve a server push like effectanyone know how to do this? Only way I will consider Java is if it will stream a HTML page and someone can point me in a direction to grab one Any help in the above questions would be greatly appreciated. I think you just need to use Keep Alive connections and use PHP flush command to stream the text. You may also want to try this class to create chat channels: Class: Chat http://www.phpclasses.org/mydbchat -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Secure login script
On Mon, 31 May 2004 16:11:07 -0600, René Fournier [EMAIL PROTECTED] wrote: If I MUST learn these two things in order to copy the security of the sample script, I will, but is it really necessary in your opinion? Let me see. Will you let a surgeon who does not know how to handle a scalpel to operate upon you ? It is good to know the tools you are going to use . You can simply copy paste the code and it might or might not work. However when some trouble crops up and you have no idea where to look, you will be in real trouble. Regards Raj Shekhar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] kill a script...plz help
sorry for asking such questions , ... If u all don't have codings for such cases , could u plz direct me with some steps ? Thank u # i used this script to run that abc.pl in command prompt. It is perfectly running. ?php //$ExhibitA = shell_exec('/root/whole/abc.pl'); // Perfect.$ExhibitB = shell_exec('env -i /root/whole/abc.pl'); ? * Actually i need to stop that as well , i got this result by ps -e 1182 pts/0 00:00:00 abc.pl so , plz help for that , thank u curlys -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: drop down menu populated from a directory
Ok - here is the relevant Quicktime code: !-- START QUICKTIME CONTENT -- object classid=clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B width=320 height=256 codebase=http://www.apple.com/qtactivex/qtplugin.cab; param name=autoplay value=true param name=controller value=true param name=pluginspage value=http://www.apple.com/quicktime/download/indext.html; param name=target value=myself param name=type value=video/quicktime param name=src value=../../../mov/THElostART.mov embed src=../../../mov/THElostART.mov width=320 height=256 autoplay=true controller=true border=0 pluginspage=http://www.apple.com/quicktime/download/indext.html; target=myself/embed /object !-- END QUICKTIME CONTENT -- Now I figure - getting the file name in there would be pretty easy (for the most part), but the thing is getting the dimensions of the movie in there... as it is possible that not all movies are the same dimensions. I am hoping to have just the one PHP that will change dynamically for the QT content - I would like to avoid having a php or html file for each QT movie. d PS - please CC me directly as I am subscribed in digest mode.. thanks much! On 31-May-04, at 3:08 PM, [EMAIL PROTECTED] wrote: Dustin Krysak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ok, I added brackets and made my code to: ?php if ($handle = opendir('../../../mov')) { while (false !== ($file = readdir($handle))) { if ($file != '.' $file != '..') { $fileName = str_replace('.mov', '', $file); echo 'option value=../../../mov/' . $file . '' . $fileName . '/option'; } } closedir($handle); } ? when viewing my page in a browser, it worked! Now what I am hoping to do is put this menu on a PHP page, and have a qt movie placeholder and when this menu is used - replace the placeholder with the selected qt movie... I am just not sure how to do this. This should be easy. Please post your QT placeholder (HTML) code. Then we can help. Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calender code help
Hey, Thanks to you guys on the list I have started to tweak the simple calender which I posted earlier...but have run into problems ;-) (I didnt go with the PEAR one coz we don't have PEAR installed on all our shared hosting accounts) What I am trying to do is, have some dates be clickable (linked) while the others be normal. The clickable days will be passed as an array to the function, so far its working but unfortunatly only the last part of the array is being taken and all the ones before ignored. eg: $linkArray[0] = 3; $linkArray[1] = 23; in which case only 23 is being taken in the for loop...which is correct as its overwring the one before... (its a bit easier to understand when you see the code, the part enclosed within the //Ryan and //Ryan is where I added my code...which is not working ;-D ) You can download the file (around 3kb) from http://php-php.com/test/cal2.txt and you can see it in action here: http://www.php-php.com/test/cal2.php Any help appreciated. Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: GD Library Upgrade
Any thoughts on this? I'm working with a host on a Linux box with PHP 4.2.2. The version of GD Library they have is 1.8.4. I was uploading some pictures using a script that leveraged GD Library 2+. Using the php version with the newer GD library seemed to produce a better quality image. I have two questions: 1 - Can a newer version of GD Library (1.8.4 vs 2+) make a difference in image quality? 2 - I'd like to upgrade the Linux box that has PHP 4.2.2 and GD Library 1.8.4 to the most recent version. Is this easy? Any guidance? Do I need a patch? PS - I've been working off of this site: http://www.boutell.com/gd but wanted to bounce this around with some experts first.
[PHP] Cannot find MySQL header files under
Greetings, when compiling PHP with the 'with-mysql' option I get an warning against using the built-in mysql support. So, I tried '--with-mysql=/path/to/mysql.so and got the following error: Cannot find MySQL header files under... What are the names of the mysql header files this message is talking about? If PHP warns against using the built-in support I'd rather use these header files. Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php