[PHP] Server Response

2011-01-11 Thread Al
Newsgroup server response is terrible and has a strange behavior. Response for first posting or two is fast, then it acts like it doesn't want to give me any additional postings. You fixed it about about 2 or 3 weeks ago; but issue has returned, Al.. -- PHP General Mailing

Re: [PHP]: permission problem www-data

2011-01-18 Thread Al
On 1/18/2011 4:44 AM, Moses wrote: Hi Everyone, I am creating a file in PHP script which takes a value from a form and writes it to a file. However, i don't have the mode permission for the file instead it is owned by www-data.What can i do to ensure that the file is owned by me. drwxr-xr-x

[PHP] News Server Time Outs

2011-01-19 Thread Al
The newsgroup server seems to have a repeated-visit throttle, or whatever. For the last two weeks at least, I can only open 2 or 3 messages and them I get repeated time-outs. It acts like the DoS or flood prevention is kidding in to aggressively. Al.. -- PHP General Mailing List

[PHP] Newsgroup server time outs

2011-01-26 Thread Al
. Like this message; it required that disconnect, wait for a while, and reconnect to upload it. Al.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: nl2br problem

2011-02-02 Thread Al
nks, Donovan You have an example of a page you'd like to control that we can see? On the surface, it appears you may be able to control the rendering with advanced CSS2/3 selectors. Thus, the browsers will do the work for you. Al.. -- PHP General Mailing List (http://www.php.net

[PHP] Re: First PHP site - thanks - euca_phpmysql function library

2011-02-09 Thread Al
On 2/8/2011 4:58 PM, Donovan Brooke wrote: Hello, Just wanted to say thanks to those that helped me get through my first PHP project (over the last month). As is with much of the work we server-side language people do, the back-end (non-public) side of this site is perhaps the more interestin

[PHP] Question about directory permissions

2011-03-21 Thread Al
I understand dir perms pretty well; but, have a question I can't readily find the answer to. Under a Linux system, scripts can't write, copy, etc. to other dirs unless the perms are set for writable for the script e.g., nobody. But, is there a way a script can write or copy within its own dir

[PHP] Re: echo?

2011-03-22 Thread Al
On 3/22/2011 6:22 PM, Jim Giner wrote: Kinda new to this, but I've been puttering/writing for about 3 weeks now and have some good working screens up. Ran into something new while I was debuggina script today. Tried to echo the $i value within a for loop as part of the list of items I was bui

[PHP] Re: putting variables in a variable

2011-03-26 Thread Al
On 3/25/2011 10:01 PM, David Robley wrote: Hulf wrote: Hi, I am making and HTML email. I have 3 images to put in. Currently I have $body .=" "; ideally I would like to have $myimage1 = "image1.jpg"; $myimage2 = "image2.jpg"; $myimage3 = "image3.jpg"; and

Re: [PHP] Re: putting variables in a variable

2011-03-26 Thread Al
On 3/26/2011 11:57 AM, Daniel Brown wrote: On Sat, Mar 26, 2011 at 11:46, Al wrote: You guys know this thread will be three years old on Monday, right? Interestingly enough, it looks like Ross ('Hulf') had his client, OS, or mailserver improperly configured, because it show

[PHP] Re: Path question

2011-03-29 Thread Al
On 3/28/2011 9:18 PM, Jack wrote: Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in /includes/include_file.php

Re: [PHP] Permission Denied - Help Requested

2011-03-29 Thread Al
On 3/29/2011 3:06 PM, Ethan Rosenberg wrote: At 01:40 PM 3/29/2011, Adam Richardson wrote: On Mon, Mar 28, 2011 at 11:43 PM, Ethan Rosenberg wrote: > At 11:14 PM 3/28/2011, Adam Richardson wrote: > >> On Mon, Mar 28, 2011 at 11:03 PM, Ethan Rosenberg <> eth...@earthlink.net>eth...@earthlink.n

[PHP] Re: If Statements Array and Notice Undefined Index

2011-03-31 Thread Al
On 3/31/2011 10:45 AM, Nicholas Cooper wrote: Good day, I have three arrays A, B and C. Anyone of them might not have the 'id' key set which will give the Notice "Undefined index: id". I just wanted to know what the correct approach to this problem would be; without making the code overly com

[PHP] htaccess question

2011-04-24 Thread Al
I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Order Deny,Allow Deny from all Allow from xx.36.2.215 xx.36.2.215 is actual value IP This file makes a captcha image and is called with in file /dir/control.php makeSco

[PHP] Re: htaccess question

2011-04-24 Thread Al
On 4/24/2011 5:48 PM, Al wrote: I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Order Deny,Allow Deny from all Allow from xx.36.2.215 xx.36.2.215 is actual value IP This file makes a captcha image and is called

[PHP] Re: htaccess question

2011-04-26 Thread Al
On 4/26/2011 5:54 AM, David Robley wrote: Al wrote: I want to restrict access to all files except one on my site and in parent dir. Thought this should work; but it doesn't. Order Deny,Allow Deny from all Allow from xx.36.2.215 xx.36.2.215 is actual value IP This file makes a ca

[PHP] Newsgroup status

2011-04-27 Thread Al
Is this group off the air or just no topics being posted? I've not seen it so quiet in years. Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Script ID?

2011-05-21 Thread Al
On 5/21/2011 10:11 AM, tedd wrote: Hi gang: Okay, so,what's the "best" (i.e., most secure) way for your script to identify itself *IF* you plan on using that information later, such as the value in an action attribute in a form? For example, I was using: $self = basename($_SERVER['SCRIPT_NAM

[PHP] htaccess question

2011-05-23 Thread Al
How can I prevent access to all files in a directory except one with an htaccess file. I've tried several approaches found with Googling; but, none seem to work. e.g., Order Allow,Deny Deny from all This seems to me as it should deny to all except makeScodeImg.php Thanks -- PHP General Ma

[PHP] Re: this newsgroup and OE

2011-06-22 Thread Al
I've reported the issue Bugzilla two times, and others have also. On 6/22/2011 11:27 AM, Shawn McKenzie wrote: On 06/22/2011 09:45 AM, Jim Giner wrote: Perhaps someone can tell me the secret to getting problem-free access to the php newsgroups using OE. I have two other newsgroup servers confi

[PHP] Re: testing

2011-08-03 Thread Al
On 8/2/2011 5:18 PM, Jim Giner wrote: Don't seem to be getting any feeds thru the newsgroup mirror(?). This newsgroup has been a mess for almost a year now. One big problem is that the server only accepts a small number of connections, for just some mail clients, eg Thunderbird; but works

Re: [PHP] Re: testing

2011-08-03 Thread Al
On 8/3/2011 9:16 AM, Ashley Sheridan wrote: Al wrote: On 8/2/2011 5:18 PM, Jim Giner wrote: Don't seem to be getting any feeds thru the newsgroup mirror(?). This newsgroup has been a mess for almost a year now. One big problem is that the server only accepts a small numb

[PHP] Re: Stop PHP execution on client connection closed

2011-09-12 Thread Al
See http://us2.php.net/manual/en/function.connection-aborted.php On 9/12/2011 10:40 AM, Marco Lanzotti wrote: Hi all, I'm new in the list and I already have a question for you. I'm running an heavy query on my DB in a PHP script called by AJAX. Because client often abort AJAX connection to ask a

[PHP] Re: filter_input and $_POST deep array

2011-09-23 Thread Al
On 9/23/2011 5:51 AM, jean-baptiste verrey wrote: Hi, I have using a form that gives me something like $_POST=array( 'login'=>array( 'email'=>'he...@myphp.net', 'password'=>'123456' ) ) is there a way to use filter_input function to filter the values? I tried fil

[PHP] Re: newline and return issues in string

2011-10-11 Thread Al
On 10/11/2011 7:58 AM, ad...@buskirkgraphics.com wrote: I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line explode(“\n”, $ string) This

Re: [PHP] Re: newline and return issues in string

2011-10-11 Thread Al
On 10/11/2011 10:44 AM, ad...@buskirkgraphics.com wrote: Richard L. Buskirk Senior Software Engineer/Systems Administrator You can’t grow your business with systems that are on life support... -Original Message- From: Al [mailto:n...@ridersite.org] Sent: Tuesday, October 11, 2011

Re: [PHP] Parsing the From field

2011-11-19 Thread Al
On 11/19/2011 11:29 AM, Alain Williams wrote: On Sat, Nov 19, 2011 at 11:23:59AM -0500, Ron Piggott wrote: I am unsure of how to parse first name, last name and e-mail address from the 'From:' field of an e-mail. What I am struggling with is if the name has more than two words - Such as the

Re: [PHP] Common way to store db-password of open session?

2011-11-29 Thread Al
On 11/29/2011 7:40 AM, Nilesh Govindarajan wrote: On Tue 29 Nov 2011 01:34:08 PM IST, Andreas wrote: Hi, is threre a most advisble way to store db-passwords of an open user-session? As far as I get it, a common login strategy is to let the user login by name&password, check it, store a login=

[PHP] Re: How to use a variable variable in an array walk?

2011-12-13 Thread Al
On 12/13/2011 5:43 PM, Nils Leideck wrote: Anyone?:-( is my description too unclear? On 11.12.2011, at 11:25, Nils Leideck wrote: this is my first post to the PHP general list. I have an issue with a variable variable (http://php.net/manual/en/language.variables.variable.php) My use c

[PHP] Re: Preferred Syntax

2011-12-14 Thread Al
On 12/14/2011 7:59 AM, Rick Dwyer wrote: Hello all. Can someone tell me which of the following is preferred and why? echo "$page_name"; echo "".$page_name.""; When I come across the above code in line 1, I have been changing it to what you see in line 2 for no other reason than it delineate

[PHP] Re: Question regarding passwords/security

2011-12-22 Thread Al
On 12/22/2011 10:05 AM, Paul M Foster wrote: Not sure how to ask this question... I've always eschewed consulting a database on page loads to determine if a user is logged in, primarily because of latency issues. For example, you could store a nonce like the session ID in a table for a user whe

Re: [PHP] Re: Question regarding passwords/security

2011-12-22 Thread Al
On 12/22/2011 2:54 PM, Stuart Dallas wrote: On 22 Dec 2011, at 19:34, Paul M Foster wrote: I have concerns that the items in a session buffer can be copied and used to spoof legitimate logins. This is harder to do when the info is held in a database. Storing stuff in a database is no more s

[PHP] Re: Continued Problems Accessing *.php.net?

2012-01-24 Thread Al
e very talented folks" fix the severely restricted access to the NNTP server. Rarely can I download more than about 10 topics without a time out. Per your request several times over at least 2 years, I've filed bug reports. The problem still exists. Though until about a week ago, it wa

[PHP] Re: Test

2012-02-20 Thread Al
Doesn't appear to meet DMARC standards. On 2/20/2012 1:57 PM, Jay Blanchard wrote: Does this work? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: $POST and $_SESSION

2012-03-17 Thread Al
On 3/15/2012 11:04 AM, Tedd Sperling wrote: $first_name = $_SESSION['first_name'] ? $_SESSION['first_name'] : null; $first_name = isset($_POST['first_name']) ? $_POST['first_name'] : $first_name; $_SESSION['first_name'] = $first_name; $_SESSION['first_name'] = (isset($_POST['first_name']))?

[PHP] Re: $POST and $_SESSION

2012-03-17 Thread Al
On 3/17/2012 12:52 PM, Al wrote: On 3/15/2012 11:04 AM, Tedd Sperling wrote: $first_name = $_SESSION['first_name'] ? $_SESSION['first_name'] : null; $first_name = isset($_POST['first_name']) ? $_POST['first_name'] : $first_name; $_SESSION[&

Re: [PHP] foreach weirdness

2012-03-24 Thread Al
On 3/23/2012 10:11 PM, Robert Cummings wrote: On 12-03-23 06:30 PM, Simon Schick wrote: 2012/3/23 Robert Cummings On 12-03-23 11:16 AM, Arno Kuhl wrote: it still does not produce the correct result: 0 1 3 6 10 15 21 0 1 3 6 10 15 15 This looks like a bug... the last row should be the s

[PHP] Re: foreach

2012-04-05 Thread Al
On 4/5/2012 4:15 PM, Ethan Rosenberg wrote: Dear Lists - I know I am missing something fundamental - but I have no idea where to start to look. Here are code snippets: I have truncated the allowed_fields to make it easier to debug. $allowed_fields = array( 'Site' =>'POST[Site]', 'MedRec' =>

[PHP] stream_set_timeout() stream_get_meta_data() etc...

2005-02-08 Thread Al
e ref I found said there is no way to do this. Anyone have a suggestion? Al. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: stream_set_timeout() stream_get_meta_data() etc...

2005-02-08 Thread Al
] {do something}; It appears to me there is a basic logic problem. The script must get past the fread() function before it gets to the stream_get_meta_data($fp). But, it hangs up on fread() and the script times out. Al Al wrote: How can I detect that a remote server is hung up on tran

Re: [PHP] stream_set_timeout() stream_get_meta_data() etc...

2005-02-08 Thread Al
Richard Lynch wrote: Al wrote: How can I detect that a remote server is hung up on transmitting a http page and gracefully handle it? The connect is made OK, all I want to do is to make certain that I receive the data stream in a given amount of time. For example, if the remote server is

Re: [PHP] Re: stream_set_timeout() stream_get_meta_data() etc...

2005-02-09 Thread Al
tter. Seems as if fread() needs a little time after fopen(). ob_flush() is neat. It forces the client browser to render progress. I've always been told you can't make a progress bar or list with php. Well here it is, at least it works with IE6 and Mozilla. Skippy wrote

[PHP] How can I read the output from a local php file [fopen()]?

2005-02-11 Thread Al
I have a script that needs to read the output, not the file itself, from a local php file using its absolute address. Normally I'd simply use $handle= fopen(http://www.whatever.com, 'rb') However, the webhost [Powweb] just changed their system to use "load balancing" servers. Now, my script mu

[PHP] Re: FOPEN

2005-02-19 Thread Al
Diana Castillo wrote: How can I read the contents of a web page that uses basic authentication? I want to use fopen() but dont know how to do this and also send the username and password If the webpage is your script and it is going to check the authentication stuff, then simply use GET argu

[PHP] Document root, preferred way to find it???

2005-03-02 Thread Al
I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path for includes, etc. We just moved the site to a new virtual host and it doesn't work. print_r() gives me: $_SERVER['document_root']= /usr/local/apache/htdocs $_SERVER['path_translated']= /home/user/public_html/ What d

Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Al
Tom Rogers wrote: Hi, Thursday, March 3, 2005, 5:21:58 AM, you wrote: A> I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path A> for includes, etc. A> We just moved the site to a new virtual host and it doesn't work. print_r() A> gives me: $_SERVER['document_root']= /usr/

[PHP] orphan functions, how can I find them?

2005-03-09 Thread Al
I'm cleaning up some old php scripts and find I'm creating some orphans. Anyone know of a tool, or a simple way, to identify all the unused functions in a script's functions include file? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Directory and file permissions on a virtual host

2005-03-14 Thread Al
Would some please provide me some simple rules for dealing with php scripts to fopen(), copy() and move_uploaded_file(). Environment is Linux, Apache on a virtual host I've spent a lot of time goggling, etc. and can find lot's of explanations for owner, group and world. They sound great; but do

[PHP] session.use_trans_sid Question

2005-03-16 Thread Al
What are the pros and cons of session.use_trans_sid ON and OFF Just moved our site from one which had the php.ini, session.use_trans_sid=OFF to one with it ON Sure looks ugly having the PHPSESSID showing up for visitors. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] strtotime() bug?

2005-04-04 Thread Al
Suddenly my strtotime() are goofy, anyone have any ideas? echo date('Y/m/d/H', time()). ""; //2005/04/04/18 echo date('Y/m/d/H', strtotime("-1 day")). ""; //2005/04/03/18 echo date('Y/m/d/H', strtotime("last Sunday")). ""; //2005/04/02/23

[PHP] Re: strtotime() bug?

2005-04-04 Thread Al
Al wrote: Suddenly my strtotime() are goofy, anyone have any ideas? echo date('Y/m/d/H', time()). "";//2005/04/04/18 echo date('Y/m/d/H', strtotime("-1 day")). ""; //2005/04/03/18 echo date('Y/m/d/H', strtotim

[PHP] Re: Matching Number of Times a Word Occurs...

2005-04-19 Thread Al
Russell P Jones wrote: Im trying to count the number of times a word occurs in a string - is the only way to do this preg_match_all? Russ Jones No, there are hundreds of other ways; but, preg_match_all() is probably the easiest. $number= preg_match_all("%$word%sm", $string, $matches); -- PHP Gen

[PHP] regex question

2005-05-16 Thread Al
What pattern can I use to match ONLY single occurrences of a character in a string. e.g., "Some text @ and some mo@@re and [EMAIL PROTECTED], etc @@@. I only want the two occurrences with a single occurrence of "@". @{1} doesn't work; there are 4 matches. Thanks -- PHP General Mailing List (ht

Re: [PHP] regex question

2005-05-17 Thread Al
Murry's solution here is ideal since it only captures the single occurrence. Since I want to use it for a preg_replace(), it is perfect. A couple of folks sent this pattern [EMAIL PROTECTED]@[EMAIL PROTECTED]; but, it doesn't work because I then have to remove the unwanted caracters on either si

[PHP] SQLite /how can I install on an Apache virtual host?

2004-04-12 Thread Al
I've got a website on an Apache virtual host and would like to install the SQLite library. Can someone give me a brief outline of what I need to do or point me to a good writeup? My host makes it tough to run command line code to make files, etc. I've found a a Linux binary [sqlite.so]. And,

Re: [PHP] SQLite /how can I install on an Apache virtual host?

2004-04-13 Thread Al
ere. I've had some success using phpshell. Curt Zirzow wrote: * Thus wrote Al ([EMAIL PROTECTED]): I've got a website on an Apache virtual host and would like to install the SQLite library. Can someone give me a brief outline of what I need to do or point me to a good writeu

[PHP] Re: accessing $_POST from another page.

2004-05-15 Thread Al
Save the POST variables in $_SESSION buffers. Don't forget to 'start_session" first thing on the page. Edward Peloke wrote: I have a page class which controls what happens within a given page. For example, the code in my index page is this: $page=new AdminPage(); $page->action($action); $page->p

[PHP] newbie question about preg_match

2004-05-20 Thread Al
I'm trying to compose a general purpose text snip expression to extract a text segment from a string. Should this work for all reasonable cases? It seems to work for several test strings. $start= "str1"; $end= "str2"; preg_match ("|$start (.*) ? $end |i", $contents, $text); $segment= $text

Re: [PHP] newbie question about preg_match

2004-05-20 Thread Al
); Alternatively, I could use preg_match_all and use $text [1]. Thanks John W. Holmes wrote: From: "Al" <[EMAIL PROTECTED]> I'm trying to compose a general purpose text snip expression to extract a text segment from a string. Should this work for all reasonable cas

[PHP] CONSTANTS and good coding practice

2004-05-21 Thread Al
Can someone explain to me the value of using defined custom constants, in the context of good coding practice. I don't recall ever seeing define() used in the scripts I've seen and only the characteristics are described in the my php book and the php manual; but, not the use. Thanks. -- PH

[PHP] Re: CONSTANTS and good coding practice

2004-05-21 Thread Al
Many thanks everyone. Seems like I should be using constants a lot of places where I've been using globals. Al wrote: Can someone explain to me the value of using defined custom constants, in the context of good coding practice. I don't recall ever seeing define() used in the sc

[PHP] Newbie question about good coding practice [isset]

2004-06-05 Thread Al
if($var) do something; verses if(isset($var)) do something; The simple form if($var) seems to work fine and I see it in code often. Is there a good reason for using isset? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] A follow up on my question about good coding practice [isset]

2004-06-06 Thread Al
I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable. Use isset($var) for variables and be careful with $var= ' '; etc. because $var is assi

[PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
I posted this previously; but the subject was misleading. I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable and I assume good practice. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable.

[PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
I posted this previously; but the subject was misleading. I could use one additional clarification regarding good practice. As I understand the php manual the following is acceptable and I assume good practice. $foo= TRUE; if($foo) do.. ; where $foo is a binary; but not a variable.

Re: [PHP] Newbie question about isset and binary conditionals

2004-06-07 Thread Al
That's a big help Mike. My server has the error level set such that my incorrect use of if($var) did not show undefined variables. Though everything seemed to work OK. I'm going my code and using if( TRUE or FALSE) isset() and empty() as appropriate. Al.. Mike Ford wrote:

[PHP] Regular Expressions Tester/designer

2004-06-19 Thread Al
Anyone know of a good regular expressions tester/designer for php coding running windows. I've looked at the Rad Software Regular Expressions Designer and it looks pretty good except that it is intended for .net and it really doesn't seem to be entirely PCRE compatible. Thanks -- PHP Gene

[PHP] Re: Determine whether $_GET has a value

2004-06-24 Thread Al
You need to be specific about what you consider to be a legitimate value for your application. consider: $var= $_GET['myname']; if((preg_match("/([0-9]|[a-z]|[A-Z]/", $var) { Do something } No spaces and watch the "|" between the ] and the [ If $myname has at least one number or character, there

[PHP] Re: silly question: an IDE for php?

2004-07-18 Thread Al
A terrific IDE editor. Is a low cost shareware. http://www.waterproof.fr/ Zhang Weiwu wrote: Not to start flame. I have been writing php using just vim for some time, it is a waste of time to put 'echo' statement everywhere to track variable values. I wonder what do the experienced users on php

[PHP] XML editors

2007-08-15 Thread Al
What do you guys use for casual XML editing, besides plain text editors? Ones that'll error check and allow fixing files with errors? Thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: XML editors

2007-08-16 Thread Al
Since posting this, I found what appears to be an excellent choice. http://xml-copy-editor.sourceforge.net/ Al wrote: What do you guys use for casual XML editing, besides plain text editors? Ones that'll error check and allow fixing files with errors? Thanks... -- PHP General Mailing

[PHP] Re: Which CAPTCHA is the besta?

2007-08-17 Thread Al
Here's a simple one you can hack to fit your needs. This a file for generating the captcha image. $src = @imagecreate($width, $height) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($src, 200, 200, 200); $text_color = imagecolorallocate

[PHP] Re: html to jpeg conversion.

2007-08-18 Thread Al
I didn't check; but seem to recall that Imagemagick will do it. If it does, then I'd suggest using the new php Imagick API for it. Works great. Don't be put off by the CVS status. Thats' most because of the lac of documentation so far. http://us3.php.net/manual/en/ref.imagick. Bindu Walia w

[PHP] Re: Render fonts

2007-08-19 Thread Al
Take a look at the PHP Imagick library API for Imagemagick. Imagemagick will create as good quality fonts as you like. Here is an example of one I've done in a test file. http://www.ridersite.org/imagemagick/Imagick.php Emil Edeholt wrote: Hi I would like to render some fonts into images,

[PHP] Re: Upload and resize file

2007-08-23 Thread Al
Suggest you find another script. That one is weird and not simple PHP code, which will do your task easily. Beauford wrote: I downloaded this 'upload and resize image' script, and since I have no idea what I am looking at as this is something I have never done, could someone have a look and

[PHP] Re: Outputting a PDF.

2007-08-23 Thread Al
Do you want the pdf to automatically render or to be an attachment? Which or both IEs, IE6 and/or IE7? Try Goggling "IE pdf". You'll see several discussions of your problem. Rob Adams wrote: I have a pdfs saved in a database (created with pdflib). When I output them in firefox, it works ju

[PHP] Re: Background Image

2007-08-28 Thread Al
You are in the wrong newsgroup. Try the HTML newsgroup Jeff wrote: vlink="#00" alink="#00"> is how I am displaying my background image. This is creating problems for different screen resolutions. What would be the appropriate way to display this code so the image would not scroll,

[PHP] Re: Heredocs

2007-08-29 Thread Al
Suggestion Write your code like this and you'll be less likely to err and your code will be more readable. You can even put variables inside the heredoc. string init method 3: heredocs Your test text txt; print $str; ?> RodgerW wrote: Are heredocs supported by PP 5.2.3 running in W

[PHP] Re: html2png

2007-09-08 Thread Al
Imagick PHP extension, easiest, or Imagemagick command line using exec(). Imagick to read a pdf and output it as a jpeg: header('Content-type: image/jpeg'); $obj = new Imagick('x.pdf'); $obj->SetImageFormat('jpeg'); echo $obj; Your want to use montage, resizing and write the result to a fil

Re: [PHP] Re: html2png

2007-09-10 Thread Al
Like I said "... or Imagemagick command line using exec()." It's been a stable release for years. Kevin Waterson wrote: This one time, at band camp, Al <[EMAIL PROTECTED]> wrote: The Imagick php extension is at RC2 and like all beta ware, should not be considered for a p

[PHP] Re: PHP "preg_replace" help

2007-09-18 Thread Al
Just use stripslashes() on your submitted data and forget about testing for magic_quotes. It's good practice anyhow. \" is not legit text regardless. haim Chaikin wrote: Hello, I am a beginner in PHP. I need help with the function preg_replace. I am trying to remove the backslashes (

[PHP] Re: back-button question

2007-09-18 Thread Al
The general rule is to create or maintain every page on your server of what you what the client to see. Then send it for every submit. That way you don't have to worry about satisfying every browser and configuration there is. Πρεκατές Αλέξανδρος wrote: I'a writing first time so sorry if i re

[PHP] Re: Newbie: special characters in regex?

2007-09-25 Thread Al
Suggest using the hex or oct codes for the special characters. It will save you much heart ache. Here is a great utility http://www.dextronet.com/charprobe.php Zembower, Kevin wrote: I'm trying to modify a string so that it can be used as a Distinguished Name in an LDAP operation. Distinguish

[PHP] Re: strpos error (I'm missing something obvious)

2007-10-02 Thread Al
Frankly, I use preg_match() for this type of thing. It's simpler and foolproof. The difference in speed is negligible. Kevin Murphy wrote: Overly simplified version of my code. $site = "http://www.wnc.edu";; $referer = $_SERVER["HTTP_REFERER"]; echo $referer;// the output is correct

Re: [PHP] Re: strpos error (I'm missing something obvious)

2007-10-02 Thread Al
I didn't mean that the function was foolproof, only the match function itself. However, your suggestion to add the line start is simple and effective. Andrew Ballard wrote: I'd suggest the following *slight* enhancement to make sure that the HTTP_REFERER actually *begins* with the site name, no

[PHP] Re: Optimized PHP

2007-10-03 Thread Al
Advanced PHP Programming, Geo. Schlossnagle Discusses large-scale, optimized websites in great detail ashish.sharma wrote: Hello All, I am working on PHP from quite some time. I am pretty much comfortable in writing PHP code but I always want that I should write good, quality code. For this I

Re: [PHP] preg_match_all Help

2007-10-12 Thread Al
Assuming you know all the permissible div tag classes you want to capture the contents of I'd make an array list of them and the use a foreach() loop and capture the contents you want and not try to capture the contents between the channel divs. Assemble the output array inside the loop.

[PHP] Re: Screenshot from web page

2007-10-12 Thread Al
Check the Imagick php-extension API for the Imagemagick commands. I recall there is a an html=> jpg or any image format. Gevorg Harutyunyan wrote: Hi, I would like to make web page screenshot and generate an image for example .jpg or .png using PHP,Apache. If any one has experiance in doing t

[PHP] Re: Regex for Advanced search feature

2007-10-19 Thread Al
Go here and get charprobe http://www.dextronet.com/charprobe.php It's a super utility to have. Look up the hex code for a space, "/x20" as I recall. Then pick a non-printable code that you like e.g., /x83 or a printable one that users cannot enter. Then simply preg_replace("%/x20+%", "/83",

[PHP] Re: Help with preg_replace

2007-11-07 Thread Al
Delimiters needed. Can use about anything not already in your pattern. "/" is very commonly used; but I like "#" or "%" generally; but, you can't use "%" because your pattern has it. $html = preg_replace("#%ResID#",$bookid,$html); Richard Luckhurst wrote: Hi I am in the process of portin

Re: [PHP] Which is the best windows IDE for PHP ?

2007-11-13 Thread Al
phpEdit mvh wrote: I am using crimson editor for editing now It is the best editor i found. But is it not an IDE. - Hemanth http://www.ValueAds.co.in http://www.ValueAds.co.in http://www.PaidAds.co.in http://www.PaidAds.co.in Bangalore, India Ph: +919844125556 -- PHP General Mailing L

[PHP] Re: Need a hint how to track an error

2007-11-13 Thread Al
Install the Firefox extension "HTML Validator". It does a real time Tidy check for every page. Make your code W3C compatible and it'll work on all modern browsers. Ronald Wiplinger wrote: My php program is working with Firefox, but not with Internet Explorer. I cannot see anything I did wrong

[PHP] Re: Simple reading a file and extract fields

2007-11-13 Thread Al
Use myFile= file() which puts all your lines in a nice simple array. The use foreach()on the array to exact your sub-strings. Personally, I'd assemble the results in a big string. Then, echo the string. $fields= NULL; foreach(myFile as $line){ $fields .= "substr($line, 0, 5)" . "  nbsp;"

[PHP] Re: Basic question - PHP usage of SVG files

2007-11-24 Thread Al
Imagemagick php extension http://www.php.net/manual/en/ref.imagick.php Works great. Dave M G wrote: PHP list, I have some images that are in SVG format. What I want to do with them is manipulate them by resizing and overlaying one on top of the other. I do this frequently with PNG images, a

[PHP] Couple of IMAP questions

2007-11-27 Thread Al
I writing a script to fetch bounced emails from a dedicated mailbox. $mbox = imap_open($addr, $user, $pw); I've got a simple foreach(){ $bodyStr = imap_body($mbox, $num); ... $hdrStr = imap_fetchheader($mbox, $num); > Using 110/pop3 is incredibly slow. The php documentation implies that

[PHP] Re: Multiple File Downloads

2007-12-15 Thread Al
What are the files and what are you going to do with them at the client? If they are to be an image mosaic, then compose it first and then send it. If text docs, compose as a pdf and send it. if just files, bundle them in a compressed file and let the user click on it to open the file. David

[PHP] Re: Writing text into images, and setting text size

2007-12-17 Thread Al
http://www.imagemagick.org/Usage/text/ You can use http://docs.php.net/manual/en/intro.imagick.php Or exec() with Imagemagick commands directly http://www.imagemagick.org Dave M G wrote: PHP List, I've been able to write text into an image using the default fonts available, with this command:

[PHP] Try{} Catch()

2007-12-23 Thread Al
Try() and Catch() seems neat; but, I've not found it to be very practical. Anyone using it? How? Al... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Try{} Catch()

2007-12-23 Thread Al
n, and/or sending an error message to the user. 2007/12/23, Al <[EMAIL PROTECTED]>: Try() and Catch() seems neat; but, I've not found it to be very practical. Anyone using it? How? Al... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.p

[PHP] Re: Unix date

2007-12-28 Thread Al
date_default_timezone_set ( string $timezone_identifier ) tedd wrote: Hi gang: Using: $unix_in = 1255845600; echo(date("M d, Y h:i:s a",$unix_in)); On one sever, produces: Oct 18, 2009 02:00:00 am But on another sever, produces: Oct 18, 2009 12:00:00 am This difference appears to be a com

<    1   2   3   4   5   6   7   8   >