php-general Digest 8 Aug 2007 17:57:16 -0000 Issue 4950

Topics (messages 260425 through 260443):

Re: Echoing input w/o sanatizing - what is the danger
        260425 by: Larry Garfield

two confuse problems
        260426 by: EVEL_LIU.WISTRON.COM
        260442 by: brian

Re: need mysql_ping when using mysql_pconnect?
        260427 by: lists.dwsasia.com

Re: DOMDocument -> loadHTML() cuts off html input
        260428 by: Stijn Verholen

Re: Articles or News Management Systems
        260429 by: Sancar Saran

Re: Articles or News Management Systems -- Full Message
        260430 by: Sancar Saran

Hidden include_path Fall Back?
        260431 by: imacat
        260434 by: Ford, Mike

Re: get domain component from email
        260432 by: Stut
        260433 by: Stut

Re: Check if var has a date (timestamp or regular)
        260435 by: Sanjeev N
        260441 by: Bastien Koert

Re: compose html body with variables
        260436 by: Sanjeev N

Re: Cut text from a string
        260437 by: Daniel Brown
        260439 by: Jason Pruim

Re: magic quotes
        260438 by: k3cheese

Re: Objects
        260440 by: Nathan Nobbe

Not quite OT but maybe close... Help with MySQL
        260443 by: Jason Pruim

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
On Tuesday 07 August 2007, Dan wrote:
> I know how you can use cross site scripting if you can steal cookies and do
> bad stuff with JS.  My question now though is if I have a form, and I post
> to myself and just echo the value of that post, is that bad?  Nobody else
> would see the result of my post so no malicous JS could ever do anything.
> I'm not doing any database calls, just storing what they typed in either an
> array or a variable and echoing it.  Simple as that.  Is that insecure?
>
> - Dan

You're fundamentally approaching it from the wrong angle.  

Do not assume that just because you can't think of a way to break it that 
there isn't one.  Perhaps it just hasn't been invented yet.  (XSRF, as a 
wide-spread concern, is younger than most web apps or CMSes out there.)

Assume that someone WILL try to break into your site and do evil nasty things.  
Assume that person is at least twice as smart as you and knows at least twice 
as much.  Every single point where data enters your code is a security hole 
until proven otherwise.  Every single HTTP header is a Threat until you've 
conclusively confirmed that it isn't by sanitizing it.  

Do not ask "why is this insecure?"  Ask "is this secure?"  If the answer is 
even "well I think so" rather than "yes, because X, Y, Z", then you still 
have work to do.

Can you conclusively prove that someone can't make use of input that is output 
immediately back to them for illicit purposes?  Then it's a security hole.

Given how clever the Bad Guys are, paranoia is a virtue when talking about 
online security.

-- 
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson

--- End Message ---
--- Begin Message ---
Dear all

As the follow show:

I want to meet a function that,

1,Click the brows bottom, and select one file, return the file name to the text 
area and the file’s size to the $filesize.

 

I don’t how to make the browser bottom to achieve that.?

2,use the zip_read function of the PHP: (because most of the file type is *.zip 
and *.doc)

The file name will be return by a name filter function.

<?php

 

$zip = zip_open("test.zip");

 

if ($zip) {

    while ($zip_entry = zip_read($zip)) {

        echo "Name:               " . zip_entry_name($zip_entry) . "\n";

        echo "Actual Filesize:    " . zip_entry_filesize($zip_entry) . "\n";

        echo "Compressed Size:    " . zip_entry_compressedsize($zip_entry) . 
"\n";

        echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . 
"\n";

 

        if (zip_entry_open($zip, $zip_entry, "r")) {

            echo "File Contents:\n";

            $buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));

            echo "$buf\n";

 

            zip_entry_close($zip_entry);

        }

        echo "\n";

 

    }

 

    zip_close($zip);

 

}

?>

Error information:

Warning: zip_read() expects parameter 1 to be resource, integer given in 
D:\www…on line 6

Warning: zip_read() expects parameter 1 to be resource, integer given in 
D:\www…on line 23

I don’t know why? Who can explain it,thanks!

 

Regards!

R Evel



 


--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:

1,Click the brows bottom, and select one file, return the file name to the text area and the file¡¦s size to the $filesize.

> I don¡¦t how to make the browser bottom to achieve that.?


PHP can't help you with that. When a person selects a file in a file
upload form widget, everything is taking place on the client side.
Additionally, file upload widgets have restrictions with regard to
Javascript for security reasons. And the size of the selected file cannot be known until it is uploaded to the server. You can see it in $_FILES['your_form_field_name']['size'].

See the manual page for uploads:
http://www.php.net/manual/en/features.file-upload.php


2,use the zip_read function of the PHP: ¡]because most of the file type is *.zip and *.doc¡^

...

Warning: zip_read() expects parameter 1 to be resource, integer given
 in D:\www¡Kon line 6


Check the manual:
http://www.php.net/zip_open

--snip--
Return Values

Returns a resource handle for later use with zip_read() and zip_close()
or returns the number of error if filename does not exist or in case of
other error.
--snip--

So, zip_open() is not opening the file and is returning an error code.
See the comment by "saulius at solmetra dot lt" on that page for
instructions for dealing with errors.

brian

--- End Message ---
--- Begin Message ---
Quoting Richard Lynch <[EMAIL PROTECTED]>:

On Tue, August 7, 2007 3:58 am, [EMAIL PROTECTED] wrote:
Just becasue you create a persistent connection it can still go down,
can't it? So therefore using mysql_ping inside of scripts with plenty
of idle time is useful?

It can still go down, for sure.

Using mysql_ping to see if it's still up at any given moment, though,
is probably a bad idea.

It can STILL go down between mysql_ping() and whatever (real) work you
want to do with mysql.

So you STILL need the same level of error-checking on your actual real
work statements.

So the ping is mostly just a waste of bandwidth.

There might be a specific use-case of 'mysql_ping', such as some kind
of "heartbeat" script that sends you an email if mysql has been down
for more than X seconds.

But you almost for sure don't want to just scatter mysql_ping
throghout normal code.


Yes that is true. I only use mysql_ping in scripts with long idle times (up to one hour idle time), and then I noticed that the mysql connection goes down. Using mysql_ping will not just check that it is alive, but also try to reconnect if it was down.

I'd never use mysql_ping in scripts that have short life length.

/Peter

--- End Message ---
--- Begin Message ---
Hey Richard,

It's a list of organisation names. A lot of them have nifty characters such as é ç ' etc. When I escape these character to their corresponding html entities, their encoded value seem to get lost when loaded into a DOMDocument, i.e. they just turn up as non-html entities.
I'm pretty sure those characters are the problem though.
I first fixed it by dropping the DOMDocument approach and have now adapted them as an AJAX Suggest list, for the very reason you mention. 330 options is way too much.

Web 2.0, here we come.

Greetz,

boro


Richard Lynch schreef:
Are there any funky characters or unusual attributes/values in the
31st option -- the one right after the last one that "works"?

I'm reasonably certain there is no limitation anywhere near "30" in
any RFC for the number of options in a SELECT list.

Though 330 is a lot for a normal user who has NO CLUE how to use the
keyboard to navigate quickly within the list...

On Wed, August 1, 2007 3:54 am, Stijn Verholen wrote:
Hey List,

In my application, I am loading html content into a DOMDocument using
loadHTML(). The DOMDocument is validated, then the element with a
certain ID tag is extracted and loaded into a node in the main
DOMDocument, which is then presented as html with saveHTML().

This works fine and has worked fine for relatively large pages
(containing several <select> lists with up to 400 options in total).

The problem I am now facing is a page with a single, relatively large
<select> list, i.e. some 330 options.
The html is generated as expected. However when I load it into a
DOMDocument and saveHTML(), the select list is cut off to about 30
options. The remainder of the html content dissappears
 and instead, the remaining open tags are closed, presumably by
DOMDocument's saveHTML() method.

Any ideas as to why this behaviour is occurring and how to fix it ?
Further information available if needed.

Thanks in advance,

Stijn

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





--


metastable
Stijn Verholen
Camille Huysmanslaan 114, bus 2
B-2020 ANTWERPEN
+32 (0)3 707 08 08
+32 (0)473 47 62 88
[EMAIL PROTECTED]
http://www.metastable.be

BTW-BE 0873.645.643
bankrek.nr. ING 363-0106543-77

--- End Message ---
--- Begin Message ---
Thanks :) It was helpfull, very intersting cms design plus it gives lots of 
idea bout document management.

Also, I had my own cms design alredy, and it was very capable.

Probably I ask wrong question.  Maybe I ask is there any standarts or examples 
for document management system.

For example, How can store the document elements. ?

Shall I do secondary store for document in xml format ?
What is the best possible way to store document elements to  gether. (Images, 
Flash files, probably pdf and word docs?

For example
/category/subcat/subcat/documentTitle/document.xml
/category/subcat/subcat/documentTitle/document.xml
/category/subcat/subcat/documentTitle/document.xml
/category/subcat/subcat/documentTitle/document.xml


On Wednesday 08 August 2007 03:49:25 Chris wrote:
> Sancar Saran wrote:
> > Hello List,
> >
> > I'm going to add some kind of articles system into my cms.
> >
> > General aim of this articles system have unlimited branches (or sub
> > categories), each branch may own editors or writers.
> >
> > I'm looking for current imlementations of this kind of systems.
> >
> > Does anyone suggest a system to have good abilities about this issue
> >
> > also I'm looking for any standats about this issue.
>
> There are no standards for this stuff - each cms has it's own idea about
> how to implement cascading permissions (if they have them at all - most
> have general permissions and don't limit per category/subcategory).
>
> One I know that does is http://matrix.squiz.net/ - however the
> installation is painful and trying to understand the app interface is
> even worse.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Sorry, I made mistake to send half message


Thanks :) It was helpfull, very intersting cms design plus it gives lots of 
idea bout document management.

Also, I had my own cms design alredy, and it was very capable.

Probably I ask wrong question.  Maybe I ask is there any standarts or examples 
for document management system.

For example, How can store the document elements. ?

Shall I do secondary store for document in xml format ?
What is the best possible way to store document elements to  gether. (Images, 
Flash files, probably pdf and word docs?

For example
/category/subcat/subcat/documentTitle/document.xml
/category/subcat/subcat/documentTitle/gfx1.jpg
/category/subcat/subcat/documentTitle/gfx2.jpg
/category/subcat/subcat/documentTitle/pdf1.pdf

Or Shall I use full sql based storege (for binary content ?)

My current focus was creating and managing documents. 

Displaying them also another mini project.

Regards

Sancar


On Wednesday 08 August 2007 03:49:25 Chris wrote:
> Sancar Saran wrote:
> > Hello List,
> >
> > I'm going to add some kind of articles system into my cms.
> >
> > General aim of this articles system have unlimited branches (or sub
> > categories), each branch may own editors or writers.
> >
> > I'm looking for current imlementations of this kind of systems.
> >
> > Does anyone suggest a system to have good abilities about this issue
> >
> > also I'm looking for any standats about this issue.
>
> There are no standards for this stuff - each cms has it's own idea about
> how to implement cascading permissions (if they have them at all - most
> have general permissions and don't limit per category/subcategory).
>
> One I know that does is http://matrix.squiz.net/ - however the
> installation is painful and trying to understand the app interface is
> even worse.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Dear all,

    Hi.  I'm new to this list.  I searched the list archive and couldn't
find an answer.  I'm sorry if someone has asked before.

    I found that include_path seems to have a hidden fall back that's
not documented anywhere.  It seems to always look for files in the
calling files' own directory.  The below is a piece of terminal log of a
simple test case I produced for this.  The include_path does not include
/tmp/phpinc/inc, but PHP can still find /tmp/phpinc/inc/inc02.php from
/tmp/phpinc/inc/inc01.php solely with the name inc02.php.

[EMAIL PROTECTED] /tmp/phpinc % find -type f
./test.php
./inc/inc02.php
./inc/inc01.php
[EMAIL PROTECTED] /tmp/phpinc % cat test.php
<?php
set_include_path(dirname(__FILE__));
echo "include_path is \"" . get_include_path() . "\".\n";
echo "This is " . __FILE__ . ".\n";
include "inc/inc01.php";
?>
[EMAIL PROTECTED] /tmp/phpinc % cat inc/inc01.php
<?php
echo "This is " . __FILE__ . ".\n";
include "inc02.php";
?>
[EMAIL PROTECTED] /tmp/phpinc % cat inc/inc02.php
<?php echo "This is " . __FILE__ . ".\n"; ?>
[EMAIL PROTECTED] /tmp/phpinc % php test.php
include_path is "/tmp/phpinc".
This is /tmp/phpinc/test.php.
This is /tmp/phpinc/inc/inc01.php.
This is /tmp/phpinc/inc/inc02.php.
[EMAIL PROTECTED] /tmp/phpinc %

    I traced into the PHP source.  At line 1348 in the subroutine
_php_stream_fopen_with_path() in main/streams/plain_wrapper.c, there is
a piece of code saying that:

...
        /* check in provided path */
        /* append the calling scripts' current working directory
         * as a fall back case
         */
        if (zend_is_executing(TSRMLS_C)) {
...

    I cannot find the reason of this fall back anywhere on the net.  I
have a lot of scripts that "accidently" works because of this, which I
do not know whether I should fix it or not.  Can I rely on this
undocumented behavior?  Or will this be fixed in the future, so I had
better fix my scripts in advance?

    Thank you for your time in advance.

-- 
imacat ^_*'
[EMAIL PROTECTED]
PGP Key: http://www.imacat.idv.tw/me/pgpkey.asc

Tavern IMACAT's http://www.imacat.idv.tw/
Woman's Voice http://www.wov.idv.tw/
TLUG List Manager http://www.linux.org.tw/mailman/listinfo/tlug

Attachment: pgpS9t61neNGZ.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
On 08 August 2007 10:06, imacat wrote:

> Dear all,
> 
>     Hi.  I'm new to this list.  I searched the list archive
> and couldn't
> find an answer.  I'm sorry if someone has asked before.
> 
>     I found that include_path seems to have a hidden fall back that's
> not documented anywhere.  It seems to always look for files in the
> calling files' own directory.

Isn't this what's documented here: http://php.net/include/?

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
JG125, The Headingley Library,
James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 812 4730          Fax:  +44 113 812 3211 



To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--- End Message ---
--- Begin Message ---
Richard Lynch wrote:
On Tue, August 7, 2007 6:21 pm, Stut wrote:
Kevin Waterson wrote:
I would like to prevent registration of emails from certain domains
that
abuse a forum. eg: foo.uy7f564d8d6d.com
These domains are registered by the thousands by spammers and
because they
use dyndns it is impossible to use an IP block.

You are also likely to screw up and end up banning legitimate users
who happen to use DynDns for perfectly valid reasons.

I don't think he meant DynDns the company, I think he just mean DHCP addresses.

I would suggest that you abandon trying to ban users based on domain,
or IP, and focus on their actual content/contributions
post-registration.

As a bonus, by banning users based on content and not email address,
you'll also catch those who use "valid" email addresses that you'd
never be able to "rule out" in any predictive sensible way.

Completely agree. It's like banning someone from a pub based on the clothes they were wearing the last time you saw them.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Daniel Brown wrote:
On 8/7/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Tue, August 7, 2007 1:25 pm, Kevin Waterson wrote:
Im looking for a way to get the domain from an email address.
Not sub domains, just the domain, so
[EMAIL PROTECTED]
would return
example.com.mn

similarly, the address [EMAIL PROTECTED] would return
example.com

perhaps an array of tld's, then strip the tld off the end and anything
before that and the next "." is the domain?

also, somebody told me .co.uk was a tld, but I cannot see it listed
http://www.iana.org/root-whois/index.html
I think you're in trouble...

The "rules" for what is or isn't a TLD have changed over time.

I did see a nice article the other day in the RFCs about some
pragmatic ways to do this "right" without killing yourself, or coding
something that's bound to break within a very short time.  Don't know
the RFC# offhand though, but I got the feeling that it was pretty
recent...

The LAST thing you want to do is hard-code the list of known TLDs from
today, because that will change too often.

.co.uk is a TLD, afaik...


    My understanding was that .co.uk and like domains were still SLDs,
but where a TLD wasn't available for registration under the ccTLD
format for the respective country.

This is just terminology, but to make it clear... .co.uk is a ccTLD not an SLD and .uk is *not* a TLD. The IANA website has lots of info on this stuff.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
Hi,

You need to check with your submitted data as in which format it is. Try
with different combination for splitting the string (include -, / while
splitting string). If input string works with split then assume input string
as in above format. Otherwise simple, consider it as in timestamp.

But I suggest if some user is entering the date then let them insert the
date as you want. Just mention (mm/dd/yyyy) after the text field and it will
solve your problem

Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com
-----Original Message-----
From: OOzy Pal [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 06, 2007 5:22 PM
To: PHP
Subject: [PHP] Check if var has a date (timestamp or regular)

How can I check an inputed date if it is a valid date and if it is in
the form of a timestamp or regular date such as (22-07-2007 or
22/07/2007)

-- 
OOzy
Ubuntu-Feisty

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

--- End Message ---
--- Begin Message ---
Other options include
 
using a date calendar widget (js) to fill the field
splitting the date field into three separate selects and building the date on 
the server from those three elements
 
Bastien> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]> 
Date: Wed, 8 Aug 2007 16:50:39 +0530> Subject: RE: [PHP] Check if var has a 
date (timestamp or regular)> > Hi,> > You need to check with your submitted 
data as in which format it is. Try> with different combination for splitting 
the string (include -, / while> splitting string). If input string works with 
split then assume input string> as in above format. Otherwise simple, consider 
it as in timestamp.> > But I suggest if some user is entering the date then let 
them insert the> date as you want. Just mention (mm/dd/yyyy) after the text 
field and it will> solve your problem> > Warm Regards,> Sanjeev> 
http://www.sanchanworld.com/> http://webdirectory.sanchanworld.com> 
-----Original Message-----> From: OOzy Pal [mailto:[EMAIL PROTECTED] > Sent: 
Monday, August 06, 2007 5:22 PM> To: PHP> Subject: [PHP] Check if var has a 
date (timestamp or regular)> > How can I check an inputed date if it is a valid 
date and if it is in> the form of a timestamp or regular date such as 
(22-07-2007 or> 22/07/2007)> > -- > OOzy> Ubuntu-Feisty> > -- > 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> 
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

--- End Message ---
--- Begin Message ---
Use as following:
$body = " Hello, here is your quote from Freight Services.<br 
/><br />Shipping from: <tab> $origin to $destination<br />Shipping subtotal
$" . number_format($subtotal,2). "<br><br>Freight charges $" .
number_format($freightCharges,2). "<br>";

And so on....

Warm Regards,
Sanjeev
http://www.sanchanworld.com/
http://webdirectory.sanchanworld.com

-----Original Message-----
From: Matt [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 06, 2007 8:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] compose html body with variables

Hello,

I'm trying to compose the body of an html email to use with the mail() 
function.  I'm running into problem because I'm not sure how to quote 
the multi-line body.  Here is what I have:

$body = "
               echo "Hello, here is your quote from Freight Services.<br 
/><br />";
               echo "Shipping from: <tab> $origin to $destination<br />";
                echo "<br>";
                echo "Shipping subtotal $" . number_format($subtotal,2);
                echo "<br>";
                echo "<br>";
                echo "Freight charges $" . number_format($freightCharges,2);
                echo "<br>";
                echo "Fuel surcharge $" . number_format($fuelSurcharge,2);
                echo "<br>";
                echo "Pickup and delivery $" . 
number_format($pickupDelivery,2);
                echo "<br>";
                echo "<br>";
                echo "Miscellaneus costs (e.g. liftgates, etc.) below $" 
. number_format($miscCost,2);
                echo "<br>";
                echo "<br>";
                if ($liftgatePickup == "50"){
                        echo "Adding liftgate on pickup $50.00";
                        echo "<br>";
                }
                if ($liftgateDelivery == "50"){
                        echo "Adding liftgate on delivery $50.00";
                        echo "<br>";
                }
                if ($spectimeDelivery == "35"){
                        echo "Adding cost of specific-time delivery $35.00";
                        echo "<br>";
                }
                if ($conventionDelivery == "35"){
                        echo "Adding cost of convention delivery $35.00";
                        echo "<br>";
                }
                if ($dreyageWait != 0){
                        echo "Adding cost for wait $" . $dreyageWait;
                        echo "<br>";
                }
                if ($insideDelivery == "25"){
                        echo "Adding cost for inside delivery $25.00";
                        echo "<br>";
                }
                if ($notifyClient == "10"){
                        echo "Adding cost for client notification $10.00";
                        echo "<br>";
                }
                echo "Total cost is $" . number_format($totalcost,2);
                echo "<br /><br />";

                echo "<a href=\"www.foo.net\">foo Services</a>";


               $subject = "Online Freight Quote";

               mail($email, $subject, $body, "From: 
[EMAIL PROTECTED]: [EMAIL PROTECTED]: 
[EMAIL PROTECTED]: PHP 4.x\r\nMIME-Version: 1.0\r\nContent-Type: 
text/html; charset=iso-8859-1\r\n");

If anyone could assist me I'd appreciate it very much,

Matt

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

--- End Message ---
--- Begin Message ---
On 8/7/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
> preg_match('|^(.*)\\((.*)\\)$', $string, $parts);

    Lynch, he asked how to manipulate a string, not for you to draw
him an ASCII topless dancer.  ;-P


-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

--- End Message ---
--- Begin Message ---

On Aug 8, 2007, at 8:54 AM, Daniel Brown wrote:

On 8/7/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
preg_match('|^(.*)\\((.*)\\)$', $string, $parts);

    Lynch, he asked how to manipulate a string, not for you to draw
him an ASCII topless dancer.  ;-P

Pregnant too none the less.....





--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

Hey, PHP-General list.... to give something back to everyone, you guys
can have 50% off every month on hosting plans of $10/mo. or more (list
price) at http://www.pilotpig.net/.
Use the coupon code phpgeneralaug07

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



--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Thanks,

Met javascript not ajax. I had AJAX on the brain do to a project I'm working
on. So I'm assuming there is a library of functions to use with the
.htaccess file?  Cause it looks like you can use UNIX and PHP to edit this
file?

Kevon K. Hayes
815-980-3435
RFD, IL

-----Original Message-----
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 07, 2007 11:30 PM
To: KVIGOR
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] magic quotes

On Tue, July 31, 2007 9:28 am, KVIGOR wrote:
> If magic quotes is on and I dont have access to the php.ini.
>
> Is there any way I can strip quotes from the form field with out using
> AJAX?

Best: Use .htaccess to turn magic_quotes off.
Okay: Use something like if (ini_get('magic_quotes_gpc')) $data =
stripslashes($data);
Worst: Ajax cannot possibly begin to address this issue and is
completely useless to solve this particular problem.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
 

--- End Message ---
--- Begin Message ---
On 8/8/07, Richard Lynch <[EMAIL PROTECTED]> wrote:
>
> On Tue, July 31, 2007 8:40 am, Eric Butera wrote:
> > On 7/31/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> >> i
> >> feel sorry for Richard; if youd ever seen a successful
> >> implementation of
> >> design patterns in the wild
> >> well you would probly feel like i do...  gotta have em :)
>
> This post is a result of SEVERAL recent emails I've received, and is
> not directed SOLELY at the OP.
>
> WHY do people ASSUME that a poster has never actually tried X, just
> because they don't like it?!
>
> I do not understand this attitude.
>
> It's particularly annoying when I specifically state that I *have*
> suffered through several implementation of design patterns in the wild
> (or whatever it is that somebody ASSUMES I have not investigated).
>

sorry if i offended you Richard.  but if you look more closely at the
statement i posted
you will see that i assumed you havent seen a successful implementation of
design patterns
in the wild.  and indeed i still feel its safe to assume you havent unless
you say otherwise,
because you keep saying you loathe them, due to failed implementations of
design patterns
of which you have observed.

-nathan

--- End Message ---
--- Begin Message ---
Hey everyone,

I tried asking this question on the MySQL list but haven't gotten very many helpful responses... Does anyone know how to successfully import a excel file into MySQL (To make it on topic) Using PHP? I have tried using LOAD FILE in mysql and it just imports the first row of my excel file with no errors...

Any ideas?
--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
[EMAIL PROTECTED]



--- End Message ---

Reply via email to