php-general Digest 29 May 2008 07:05:37 -0000 Issue 5485

2008-05-29 Thread php-general-digest-help
php-general Digest 29 May 2008 07:05:37 - Issue 5485 Topics (messages 274780 through 274798): Re: Calendar Date Help 274780 by: Robert Cummings 274782 by: Mark Weaver Re: looking a regular expresion 274781 by: Boyd, Todd M. Re: In case this helps... (Calendar Date

[PHP] Help mms (Get audio Stream)

2008-05-29 Thread Shelley
1. URL http://pub.qmoon.net/WMSStatus/WMS.asmx/IRadioGetCurrentPublishPoint 2. Call method HTTP GET: GET / WMSStatus/WMS.asmx/IRadioGetCurrentPublishPoint HTTP/1.1 Host: pub.qmoon.net 3. return (string) ?xml version=1.0 encoding=utf-8 ? string

Re: [PHP] Reloading changes JS files?

2008-05-29 Thread Richard Heyes
img src='/image/bulk.jpg?112344324' / anything after the question mark will get ignored by the browser. Except that the browser will think that it is a new URL that it has never seen before and it will call to the server for a fresh copy of the file. Another options is instead of a question

Re: [PHP] Reloading changes JS files?

2008-05-29 Thread Per Jessen
Skip Evans wrote: Hey all, I have an HTML template file I read into a PHP script and then after supplying dynamic data I send the template to the browser with echo $html; The HTML template contains many JS files in the head.../head section referenced like this: script

[PHP] Embed images in emails

2008-05-29 Thread Iñigo Medina García
Hi, I'm trying to send emails with embed and dynamic images: a normal tell a friend feature which sends the email with item's data: author, title, image-cover, etc. Ideas PEAR and mime classes apart? thanks iñigo -- Iñigo Medina García Librería Díaz de Santos

[PHP] Escaping JavaScript strings

2008-05-29 Thread Edward Kay
Hello, I'm adding functionality to allow a user to copy data on a page to the clipboard using JS. This can be done simply with: window.clipboardData.setData('Text','String to copy to clipboard'); The string from PHP needs to contain line breaks when copied into the clipboard. This works when

Re: [PHP] Reloading changes JS files?

2008-05-29 Thread Per Jessen
Richard Heyes wrote: When you do an explicit refresh or reload in your browser, it should ignore whatever it's got cached and refetch your javascript files regardless. With Interweb Explorer you need to hold down CTRL and CLICK on refresh (as opposed to pressing CTRL+R say) to get a fresh

Re: [PHP] Escaping JavaScript strings

2008-05-29 Thread Richard Heyes
... This is a PHP function that escapes strings so you can output them as a JS string. IIRC it assumes you're using single quotes to enclose your strings. /** * Function to appropriately escape a string so it can be output * into javascript code. * * @param string

Re: [PHP] Reloading changes JS files?

2008-05-29 Thread Richard Heyes
When you do an explicit refresh or reload in your browser, it should ignore whatever it's got cached and refetch your javascript files regardless. With Interweb Explorer you need to hold down CTRL and CLICK on refresh (as opposed to pressing CTRL+R say) to get a fresh copy. I guess it

Re: [PHP] SOLVED: Calendar Date Help

2008-05-29 Thread Mark Weaver
Mark Weaver wrote: Hi all, I've put this off as long as possible, however I think I've reached an impasse. I've got an application that I've been writing. One of the modules for this app is an event calendar. I've got the calendar to the place where it displays the current month as well as

RE: [PHP] Escaping JavaScript strings

2008-05-29 Thread Edward Kay
This is a PHP function that escapes strings so you can output them as a JS string. IIRC it assumes you're using single quotes to enclose your strings. /** * Function to appropriately escape a string so it can be output * into javascript code. * * @param

[PHP] IMAP connection to specific directory

2008-05-29 Thread Niall Jackson
Hi, I am attempting to set up a group webmail client wherein certain emails can be stored separately from the normal mailbox system and retrieved for viewing by any user via a separate mechanism to the normal client. According to the documentation, I should be able to connect to this store

[PHP] How to Using xsl with .odt files

2008-05-29 Thread Priyanka
How to import the stylesheet from a .odt file and modify it and use it for creating a document. Can we use xsl functions for this process. If yes, then what are the required xsl functions?

Re: [PHP] Help mms (Get audio Stream)

2008-05-29 Thread Gabriel Sosa
what do you wanna do ?? just a bridge? or try to play it?? in that case you can't. i think you should get the streamming and try to play it with flash saludos On Thu, May 29, 2008 at 4:05 AM, Shelley [EMAIL PROTECTED] wrote: 1. URL

Re: [PHP] How to Using xsl with .odt files

2008-05-29 Thread Per Jessen
Priyanka wrote: How to import the stylesheet from a .odt file and modify it and use it for creating a document. Can we use xsl functions for this process. If yes, then what are the required xsl functions? Doesn't really sound like a PHP-related question, but yes it is all possible. The

[PHP] Re: A Little Something.

2008-05-29 Thread Michelle Konzack
Am 2008-05-28 08:40:09, schrieb Philip Thompson: It's amazing how someone so involved in security would provide any of this information. Name, job, location, phone numbers, Internet contact. You might as well have given the name of your children as well. Nevermind, I'll go find that out

Re: [PHP] How to Using xsl with .odt files

2008-05-29 Thread Wolf
Priyanka [EMAIL PROTECTED] wrote: How to import the stylesheet from a .odt file and modify it and use it for creating a document. Can we use xsl functions for this process. If yes, then what are the required xsl functions? EASY!!! Just STFW for XSL and ODT This might help:

Re: [PHP] Re: A Little Something.

2008-05-29 Thread Wolf
Michelle Konzack [EMAIL PROTECTED] wrote: Am 2008-05-28 08:40:09, schrieb Philip Thompson: It's amazing how someone so involved in security would provide any of this information. Name, job, location, phone numbers, Internet contact. You might as well have given the name of your

Re: [PHP] SOLVED: Calendar Date Help

2008-05-29 Thread Robert Cummings
On Thu, 2008-05-29 at 07:37 -0400, Mark Weaver wrote: Mark Weaver wrote: Hi all, I've put this off as long as possible, however I think I've reached an impasse. I've got an application that I've been writing. One of the modules for this app is an event calendar. I've got the

Re: [PHP] Embed images in emails

2008-05-29 Thread Bastien Koert
On Thu, May 29, 2008 at 6:11 AM, Iñigo Medina García [EMAIL PROTECTED] wrote: Hi, I'm trying to send emails with embed and dynamic images: a normal tell a friend feature which sends the email with item's data: author, title, image-cover, etc. Ideas PEAR and mime classes apart? thanks

Re: [PHP] Embed images in emails

2008-05-29 Thread Per Jessen
Bastien Koert wrote: You'll need to create a HTML email, and then embed the image with the img tag, using the entire path to the image as the source attribute Not necessarily, images may simply be sent as an attachment with type image/jpeg etc. /Per Jessen, Zürich -- PHP General Mailing

Re: [PHP] Embed images in emails

2008-05-29 Thread Shawn McKenzie
Per Jessen wrote: Bastien Koert wrote: You'll need to create a HTML email, and then embed the image with the img tag, using the entire path to the image as the source attribute Not necessarily, images may simply be sent as an attachment with type image/jpeg etc. /Per Jessen, Zürich I

Re: [PHP] Embed images in emails

2008-05-29 Thread Richard Heyes
You'll need to create a HTML email, and then embed the image with the img tag, using the entire path to the image as the source attribute Not necessarily, images may simply be sent as an attachment with type image/jpeg etc. /Per Jessen, Zürich I haven't done it in a while but I believe you

Re: [PHP] SOLVED: Calendar Date Help

2008-05-29 Thread Mark Weaver
Robert Cummings wrote: function setCal($h=0,$m=0,$s=0,$offset,$dayVal=1){ $stamp = date('U',mktime($h,$m,$s, $offset,$dayVal,date('Y'))); I don't really want to say I told you so, but that's one of the two lines I denoted as

[PHP] Problem with Object references in an array via for loop

2008-05-29 Thread David Moylan
I have a snippet of code like this which works fine in PHP4. $secs = array(); foreach($_GET['sids'] as $sid){ $secs[$sid] = new CustomSecurity(); $secs[$sid]-set(array('customSecurityID' = $sid)); } However, in PHP5 (5.2.4) the array has the proper keys in it but all of the array values

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread Gabriel Sosa
try doing this $secs = array(); foreach($_GET['sids'] as $sid){ $obj = null; $obj = new CustomSecurity(); $obj-set(array('customSecurityID' = $sid)); $secs[] = $obj; } i just don't know if the operator - it's working wll over object arrays saludos On Thu, May 29, 2008 at 1:31 PM, David

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread David Moylan
Nope. Same performance. I originally had something like this (minus the assigment to null) but I thought the confusion was in the variable assignment so I went directly to the array. I've tried your code exactly and get the same thing, assignment to null doesn't help. Dave Gabriel Sosa

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread Gabriel Sosa
I thought this line it may help, not actually the null $secs[] = $obj; i will still researching about this On Thu, May 29, 2008 at 2:08 PM, David Moylan [EMAIL PROTECTED] wrote: Nope. Same performance. I originally had something like this (minus the assigment to null) but I thought the

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread David Moylan
Well, I did that except I'm providing the key explicitly. However, I've tried it now without the key and it's the same except for the key value. Very frustrating. Dave Gabriel Sosa wrote: I thought this line it may help, not actually the null $secs[] = $obj; i will still researching

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread Robert Cummings
On Thu, 2008-05-29 at 14:01 -0300, Gabriel Sosa wrote: try doing this $secs = array(); foreach($_GET['sids'] as $sid){ $obj = null; $obj = new CustomSecurity(); $obj-set(array('customSecurityID' = $sid)); $secs[] = $obj; } No, no, no. If it's a reference issue you need to do the

[PHP] preg_match_all

2008-05-29 Thread Chris W
What I want to do is find all links in an html file. I have the pattern below. It works as long as there is only one link on a line and as long as the whole link is one line. It seems there should be a way to get this to work with more than one link on a single line. The work around I have

Re: [PHP] preg_match_all

2008-05-29 Thread Robert Cummings
On Thu, 2008-05-29 at 13:07 -0500, Chris W wrote: What I want to do is find all links in an html file. I have the pattern below. It works as long as there is only one link on a line and as long as the whole link is one line. It seems there should be a way to get this to work with more

[PHP] Javascript control on Firefox 2/3 with flash 9

2008-05-29 Thread jencisson
my page include some javascript to control the play,rewind..and other functions of the swffile showEdit.swf, it works in Safari/IE with flash-plugin 8/9 installed but not works in Firefox with flash plugin 9(would reports obj.play() is not a function, is any one point out what is the problem

Re: [PHP] preg_match_all

2008-05-29 Thread Robert Cummings
On Thu, 2008-05-29 at 14:20 -0400, Robert Cummings wrote: On Thu, 2008-05-29 at 13:07 -0500, Chris W wrote: What I want to do is find all links in an html file. I have the pattern below. It works as long as there is only one link on a line and as long as the whole link is one line. It

Re: [PHP] Javascript control on Firefox 2/3 with flash 9

2008-05-29 Thread Wolf
[EMAIL PROTECTED] wrote: my page include some javascript to control the play,rewind..and other functions of the swffile showEdit.swf, it works in Safari/IE with flash-plugin 8/9 installed but not works in Firefox with flash plugin 9(would reports obj.play() is not a function, is

[PHP] form validation

2008-05-29 Thread Sudhakar
i need to validate a field in a form where a user enters a reference number this can be letters, numbers and special characters also so i have not written any special preg match as the username is a combination. the only check i am doing is if there are any white spaces and if a user simple

[PHP] sql injection

2008-05-29 Thread Sudhakar
i have implemented a way to avoid sql injection from the php website from this url http://in.php.net/mysql_real_escape_string from the Example #3 A Best Practice query section of this page following are the steps i have followed after the form values are submitted to a php file. step 1.

[PHP] validating # sign in php

2008-05-29 Thread Sudhakar
my question is about validation using php. i am validating a username which a user would enter and clicks on a image to find if that username is available. example if a user enters abc#123 php file is reading this value as abc ONLY which i do not want instead the php file should read as abc#123.

Re: [PHP] sql injection

2008-05-29 Thread Gabriel Sosa
YOU can write (') characters in the database.. that fine.. mysql_real_escape_string avoid injections doing that: escaping characters then when you put in a form abc'''def the query will be INSERT . (name.) VALUES ( 'abc\'\'\'def' each ' = \' for me the steps are right saludos

[PHP] authentication verification

2008-05-29 Thread DeadTOm
So the user comes to the site and they're presented with a log in page. They enter their username and password and php checks a mysql database for a matching username and password. In the case of a match, php then sets a cookie on their browser with a value of 1 for authenticated and 0 for not

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread David Moylan
Solved this. I tried setting a class variable directly and didn't have the same issue (should have tried that long ago). So that told me that my error was somewhere in some lower level code when I initialize my objects. I tracked it down to a problem where I wasn't cloning properly when I

Re: [PHP] Problem with Object references in an array via for loop

2008-05-29 Thread David Moylan
Also, for the record: Referring to the objects in the array directly works fine. So, syntax like $secs[$sid] = new CustomSecurity(); $secs[$sid]-load($sid); is fine, as I would expect. Don't have to define it to a simple variable like $obj in the code below. Further, if I then do $sec =

Re: [PHP] authentication verification

2008-05-29 Thread Robert Cummings
On Thu, 2008-05-29 at 14:20 -0600, DeadTOm wrote: So the user comes to the site and they're presented with a log in page. They enter their username and password and php checks a mysql database for a matching username and password. In the case of a match, php then sets a cookie on their browser

Re: [PHP] authentication verification

2008-05-29 Thread Greg Maruszeczka
On Thu, 29 May 2008 14:20:02 -0600 (MDT) DeadTOm [EMAIL PROTECTED] wrote: So the user comes to the site and they're presented with a log in page. They enter their username and password and php checks a mysql database for a matching username and password. In the case of a match, php then sets

[PHP] Re: A Little Something.

2008-05-29 Thread tedd
At 8:31 PM +0200 5/28/08, Michelle Konzack wrote: I have customers in Iran, Turkey, Syria, Lebanon, Moroco, Germany and Swiss. Sounds like a sandwich. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List

Re: [PHP] preg_match_all

2008-05-29 Thread Mario Guenterberg
On Thu, May 29, 2008 at 01:07:11PM -0500, Chris W wrote: What I want to do is find all links in an html file. I have the pattern below. It works as long as there is only one link on a line and as long as the whole link is one line. It seems there should be a way to get this to work

[PHP] A problem with fgets()

2008-05-29 Thread Usamah M. Ali
Hello, I have a function that picks up a random entry from a file consisting of city names, each name on a separate line. The random value is generated by rand() before fseek()ing to the position determined by it. The problem is that when using fgets() to get a random line, it returns a part of

[PHP] PHP Code I Must find

2008-05-29 Thread John Taylor-Johnston
A web site deploys what I think are UTF characters to mask email addresses. Is there there a php function I can use to generate this? Or was this hand-done? It is crackable, but a darned good stab at the problem of spiders at the same. Any feedback, info or code would be appreciated, John

Re: [PHP] PHP Code I Must find

2008-05-29 Thread Jeremy Privett
John Taylor-Johnston wrote: A web site deploys what I think are UTF characters to mask email addresses. Is there there a php function I can use to generate this? Or was this hand-done? It is crackable, but a darned good stab at the problem of spiders at the same. Any feedback, info or code

Re: [PHP] PHP Code I Must find

2008-05-29 Thread TG
You could look at the email cloaking routine that Joomla uses. Here's a starting point: http://dev.joomla.org/component/option,com_jd-wiki/Itemid,/id,references:joomla.framework:html:jhtmlemail-cloak/ -TG - Original Message - From: John Taylor-Johnston [EMAIL PROTECTED] To: PHP-General

Re: [PHP] preg_match_all

2008-05-29 Thread Eric Butera
On Thu, May 29, 2008 at 2:07 PM, Chris W [EMAIL PROTECTED] wrote: What I want to do is find all links in an html file. I have the pattern below. It works as long as there is only one link on a line and as long as the whole link is one line. It seems there should be a way to get this to work

Re: [PHP] preg_match_all

2008-05-29 Thread Eric Butera
On Thu, May 29, 2008 at 8:13 PM, Eric Butera [EMAIL PROTECTED] wrote: Why not use DOMDocument with getElementsByTagName('href') [1] http://us2.php.net/manual/en/domdocument.getelementsbytagname.php Sorry there was an error in that. It felt wrong when I sent it so I looked again. Here is a

Re: [PHP] PHP Code I Must find

2008-05-29 Thread John Taylor-Johnston
Ok. ?php $mystring = [EMAIL PROTECTED]; #How can I generate $mystring in ascii characters? echo ??($mystring); ? lists-php wrote: that's not UTF, rather just the html representation of the ascii codes for the characters. [someone else has already pointed you to an ascii table.] when put in

Re: [PHP] A problem with fgets()

2008-05-29 Thread Chris
Usamah M. Ali wrote: Hello, I have a function that picks up a random entry from a file consisting of city names, each name on a separate line. The random value is generated by rand() before fseek()ing to the position determined by it. The problem is that when using fgets() to get a random

Re: [PHP] A problem with fgets()

2008-05-29 Thread Usamah M. Ali
On Fri, May 30, 2008 at 3:38 AM, Chris [EMAIL PROTECTED] wrote: fseek doesn't go to the start of a line, it goes to a particular byte - so that's where the problem lies (not with fgets). There's no function (that I could see) which would go to the start of the line based on that offset (I

Re: [PHP] A problem with fgets()

2008-05-29 Thread Chris
I just need to figure out why when using fgets() with fseek() rand(), the script returns partial strings form the city names. Because fseek doesn't necessarily put you at the start of a line. It puts you anywhere (which could be the start, middle, 3 chars from the end) according to the

Re: [PHP] A problem with fgets()

2008-05-29 Thread Usamah M. Ali
On Fri, May 30, 2008 at 4:21 AM, Chris [EMAIL PROTECTED] wrote: I just need to figure out why when using fgets() with fseek() rand(), the script returns partial strings form the city names. Because fseek doesn't necessarily put you at the start of a line. It puts you anywhere (which could

[PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Weston C
This might be a dumb question with an obvious answer somewhere, but I'm wondering if it's possible to build php extensions as shared objects that plug into the PHP binary much like an apache shared module plugs into apache. Is PECL close to this? Sorry if this is obvious. Searches on the topic

Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Chris
Weston C wrote: This might be a dumb question with an obvious answer somewhere, but I'm wondering if it's possible to build php extensions as shared objects that plug into the PHP binary much like an apache shared module plugs into apache. Yes. See http://www.php.net/dl (though a lot of

Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Weston C
On Thu, May 29, 2008 at 7:11 PM, Chris [EMAIL PROTECTED] wrote: See http://www.php.net/dl (though a lot of hosts disable this functionality for security reasons). Fortunately, I'll have full control of the hosting environment in the context this matters. :) dl is definitely interesting, but

Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread mike
On 5/29/08, Weston C [EMAIL PROTECTED] wrote: Fortunately, I'll have full control of the hosting environment in the context this matters. :) dl is definitely interesting, but I'm worried that runtime invocation might mean performance hits. Is there a way to do load/startup time inclusion?

Re: [PHP] Help mms (Get audio Stream)

2008-05-29 Thread Shelley
My test result is that it works on Windows platform, but not on Linux. Maybe that's because it is Microsoft Media Services protocol? Whatever, I can not hear anything on Firefox 3 Beta 5 on Ubuntu. 2008/5/29 Gabriel Sosa [EMAIL PROTECTED]: what do you wanna do ?? just a bridge? or try to play

[PHP] A bit 0T - WAMPSERVER

2008-05-29 Thread Ryan S
Hello all! Had some big problems with XAMPP crashing my windows (Vista) laptop 8 times out or 10 (actual figures) as I started XAMPP so have shifted over to WAMPSERVER2 So far so good, no crash... but their website seems to be down and need one small tidbit... if anyone of you are using

Re: [PHP] A bit 0T - WAMPSERVER

2008-05-29 Thread Chris
Ryan S wrote: Hello all! Had some big problems with XAMPP crashing my windows (Vista) laptop 8 times out or 10 (actual figures) as I started XAMPP so have shifted over to WAMPSERVER2 So far so good, no crash... but their website seems to be down and need one small tidbit... if anyone of

Re: [PHP] PHP Code I Must find

2008-05-29 Thread John Taylor-Johnston
Seen that in the manual. I'll need a routine of some sort I guess. I'll get my cookie cutters out tomorrow and see what I can create. I make cool gingerbread men, for a dude. **htmlentities() does most of what I want, sort of. **lists-php wrote: you might try looking at the php manual. start