|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help
lists.php.net
Date: Fri Feb 22 2008 - 11:09:02 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 22 Feb 2008 17:09:02 -0000 Issue 5308
Topics (messages 269837 through 269886):
Re: form cleaner class
269837 by: Andrés Robinet
Re: Exception vs exception
269838 by: Paul Scott
269839 by: Chris
Deleting all rows in a database every 24 hours?
269840 by: Zoran Bogdanov
269841 by: Paul Scott
269856 by: Bastien Koert
269859 by: Daniel Brown
URL modification
269842 by: Xavier de Lapeyre
269843 by: Andrés Robinet
269844 by: Xavier de Lapeyre
269845 by: Thijs Lensselink
269846 by: Richard Heyes
269847 by: Per Jessen
269852 by: Jason Pruim
269860 by: Nathan Rixham
269873 by: Per Jessen
269875 by: Daniel Brown
269880 by: Per Jessen
269884 by: Nathan Rixham
269886 by: Richard Heyes
Re: All Survey leading to PHP
269848 by: Allan Fernandes
269853 by: tedd
269854 by: Robert Cummings
269857 by: tedd
269862 by: Daniel Brown
269867 by: Matty Sarro
269868 by: Robert Cummings
269869 by: Robert Cummings
269871 by: Nathan Rixham
269874 by: Robert Cummings
269876 by: Daniel Brown
269878 by: Nathan Rixham
269882 by: Robert Cummings
Re: AMP installer
269849 by: zerof
Prado IDE
269850 by: Hélio Rocha
269877 by: Daniel Brown
Re: APC & __autoload & webclusters
269851 by: Jochem Maas
Re: temporary error
269855 by: tedd
269858 by: Robert Cummings
269861 by: tedd
269863 by: tedd
269864 by: Daniel Brown
269865 by: Jay Blanchard
269866 by: Daniel Brown
Re: More than one values returned?
269870 by: Greg Donald
269879 by: Robert Cummings
XML encoding variable simpleXML on Linux
269872 by: Larry Brown
269881 by: Bojan Tesanovic
Re: Ajax send()
269883 by: germana
269885 by: Zoltán Németh
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
> -----Original Message-----
> From: nihilism machine [mailto:nihilismmachine
gmail.com]
> Sent: Thursday, February 21, 2008 11:53 PM
> To: php-general
lists.php.net
> Subject: [PHP] form cleaner class
>
> What is a better idea? Using this class in my db class and using
> CleanInput on the sql statements, or using it in the top of the all
> pages with form input to clean the $_POST's?
Will all your $_POST variables contain HTML code that must be filtered out
except a set of tags that must be kept?
Otherwise, it's not worth to filter everything everytime (it will become a
performance issue).
IMO, if you expect an integer for some *whatever* input variable, it's best to
do:
$whatever = (int)$_POST['whatever'];
> Also, any ideas or
> comments on improving the class?
I'd check out how well-known PHP Frameworks/CMS clean out HTML code to prevent
XSS attacks (If somebody has done the job already, you just need to improve it -
if you ever can). And what other precautions they take.
>
> <?php
>
> class FormCleaner {
>
> // Initializer
> function __construct() {
> if (count($_POST) > 0) {
> foreach($_POST as $curPostKey => $curPostVal) {
> $_POST[$curPostKey] = $this-
> >CleanInput($curPostVal);
> }
> }
> }
>
> // Clean Form Input
> public function CleanInput($UserInput) {
> $allowedtags =
> "<b></b><i></i><h1></h1><a></a><img><ul></ul><li></
> li><blockquote></blockquote>";
> $notallowedattribs = array("
javascript:|onclick|ondblclick|
> onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|
> onkeydown|onkeyup
si");
> $changexssto = '';
> $UserInput = preg_replace($notallowedattribs, $changexssto,
> $UserInput);
> $UserInput = strip_tags($UserInput, $allowedtags);
> $UserInput = nl2br($UserInput);
> return $UserInput;
> }
> }
>
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Regards,
Rob
Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: info
bestplace.net | MSN Chat: best
bestplace.net | SKYPE: bestplace |
Web: bestplace.biz | Web: seo-diy.com
attached mail follows:
On Thu, 2008-02-21 at 21:01 -0800, Prabath Kumarasinghe wrote:
> In second approach for every query I have to write
> throw new MySQLException("My Message"). It's very time
> consuming isn't it?
In order to *be* lazy, you have to *think* lazy...
Don't go and define every single query with an exception, thats just not
the lazy way, rather define a few functions that do generic stuff (or
even a single function that runs a query) and then send all of your
queries through that:
public function queryWithException($filter)
{
$results = $dblayer->query($filter);
if($results === FALSE)
{
throw new MyException("Query failed!");
}
else {
return $results;
}
}
then in your code:
try {
$this->queryWithException("SELECT * FROM users WHERE clue > 0");
}
catch (MyException $e)
{
// clean up
}
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
attached mail follows:
> But it's give a many information using $e->getTrace()
> is this correct. If there are several mysql_query then
> I can put it as bunch within try block and catch
> exception easily.
No, it doesn't give any such information.
1 :<?php
2 :mysql_connect('server', 'username', 'password');
3 :mysql_select_db('database_name');
4 :
5 :try{
6 : $result = mysql_query('SELECT * from unknowntable');
7 : echo __LINE__ . "\n";
8 :}catch(exception $e){
9 : echo __LINE__ . "\n";
10:}
Line numbers added for effect.
It will print the line number in the "try".
It never prints the line number in the "catch".
$ php -f ./test.php
7
> In second approach for every query I have to write
> throw new MySQLException("My Message"). It's very time
> consuming isn't it?
Use a database abstraction layer and run everything through that or
simply use a function.
function Query($query='')
{
if (!$query) {
throw new Exception("No query passed to Query method");
}
$result = mysql_query($query);
if (!$result) {
throw new Exception("Query " . $query . " is invalid.");
}
return $result;
}
Then simply:
$myquery = "select * from table_that_exists";
try {
$result = Query($myquery);
echo "Got result \n";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
// ... do whatever here.
}
$myquery = "select * from table_that_doesnt_exist";
try {
$result = Query($myquery);
echo "Got result\n";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
// ... do whatever here.
}
--
Postgresql & php tutorials
http://www.designmagick.com/
attached mail follows:
The title says it all, how do I perform an action every 24 hours?
Thank you.
attached mail follows:
On Fri, 2008-02-22 at 07:28 +0100, Zoran Bogdanov wrote:
> The title says it all, how do I perform an action every 24 hours?
>
$sql = "TRUNCATE TABLE 'sometable'";
$this->query($sql);
on a cron.daily
--Paul
--
------------------------------------------------------------.
| Chisimba PHP5 Framework - http://avoir.uwc.ac.za |
:------------------------------------------------------------:
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm
attached mail follows:
cron
bastien> To: php-general
lists.php.net> From: test1.test1
hi.t-com.hr> Date: Fri, 22 Feb 2008 07:28:58 +0100> Subject: [PHP] Deleting all rows in a database every 24 hours?> > The title says it all, how do I perform an action every 24 hours?> > Thank you. > > -- > PHP General Mailing List (http://www.php.net/)> To unsubscribe, visit: http://www.php.net/unsub.php>
_________________________________________________________________
attached mail follows:
On Fri, Feb 22, 2008 at 1:28 AM, Zoran Bogdanov <test1.test1
hi.t-com.hr> wrote:
> The title says it all, how do I perform an action every 24 hours?
Another question better answered on Google.
PHP Script:
<?
$sql = "TRUNCATE TABLE `tablename`";
mysql_query($sql);
?>
Crontab Entry:
40 3 * * * `which php` /path/to/your/script.php
That will run every morning at 3:40a server time with the
path-preferred PHP. If you're on Windows, look up Scheduled Tasks.
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Hi all,
I saw on some websites that modifies the links to access the webpages.
Something like:
http://www.example.com/login/
instead of
http://www.example.com/login.php
Does anyone knows how this works or how its call / which PHP library
performs this action?
Xavier de Lapeyre
attached mail follows:
> -----Original Message-----
> From: Xavier de Lapeyre [mailto:xavier
edsnetworks.net]
> Sent: Friday, February 22, 2008 2:09 AM
> To: php-general
lists.php.net
> Subject: [PHP] URL modification
> Importance: High
>
> Hi all,
>
> I saw on some websites that modifies the links to access the webpages.
>
> Something like:
> http://www.example.com/login/
> instead of
> http://www.example.com/login.php
>
> Does anyone knows how this works or how its call / which PHP library
> performs this action?
>
>
> Xavier de Lapeyre
That's called "URI/URL Routing" and it's usually performed as part of every MVC
Framework I know of (CodeIgniter, CakePHP, Symfony, Zend Framework... just to
name a few). It's usually implemented through Apache's mod_rewrite module, but
you can get close without that module, if you allow for something like:
http://www.example.com/index.php/myaccount/profile (that is, you don't need
mod_rewrite unless you want to remove the index.php part of the URI path)
However, if you have an existing website, migrating it to use one of the MVC
frameworks (or just using a stand-alone URI Routing class) may not be the path
you want to follow.
Regards,
Rob
Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: info
bestplace.net | MSN Chat: best
bestplace.net | SKYPE: bestplace |
Web: bestplace.biz | Web: seo-diy.com
attached mail follows:
Thnks,
Hmmmm... made a quick look into it.
Seems to be apache compatible.
I'm designing a site to be hosted on an IIS Server.
Does it still works there?
Regards,
Xavier de Lapeyre
Web Developer
Enterprise Data Services
24, Dr Roux Street,
Rose Hill
Office: (230) 465 17 00
Fax: (230) 465 29 00
Site: www.eds.mu
Email: hsia
edsnetworks.net
Please consider the environment before printing this mail note.
-----Original Message-----
From: Andrés Robinet [mailto:agrobinet
bestplace.biz]
Sent: vendredi 22 février 2008 11:48
To: php-general
lists.php.net
Subject: RE: [PHP] URL modification
> -----Original Message-----
> From: Xavier de Lapeyre [mailto:xavier
edsnetworks.net]
> Sent: Friday, February 22, 2008 2:09 AM
> To: php-general
lists.php.net
> Subject: [PHP] URL modification
> Importance: High
>
> Hi all,
>
> I saw on some websites that modifies the links to access the webpages.
>
> Something like:
> http://www.example.com/login/
> instead of
> http://www.example.com/login.php
>
> Does anyone knows how this works or how its call / which PHP library
> performs this action?
>
>
> Xavier de Lapeyre
That's called "URI/URL Routing" and it's usually performed as part of every MVC
Framework I know of (CodeIgniter, CakePHP, Symfony, Zend Framework... just to
name a few). It's usually implemented through Apache's mod_rewrite module, but
you can get close without that module, if you allow for something like:
http://www.example.com/index.php/myaccount/profile (that is, you don't need
mod_rewrite unless you want to remove the index.php part of the URI path)
However, if you have an existing website, migrating it to use one of the MVC
frameworks (or just using a stand-alone URI Routing class) may not be the path
you want to follow.
Regards,
Rob
Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: info
bestplace.net | MSN Chat: best
bestplace.net | SKYPE: bestplace |
Web: bestplace.biz | Web: seo-diy.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Quoting Xavier de Lapeyre <xavier
edsnetworks.net>:
> Thnks,
> Hmmmm... made a quick look into it.
> Seems to be apache compatible.
> I'm designing a site to be hosted on an IIS Server.
>
> Does it still works there?
>
> Regards,
> Xavier de Lapeyre
> Web Developer
> Enterprise Data Services
> 24, Dr Roux Street,
> Rose Hill
> Office: (230) 465 17 00
> Fax: (230) 465 29 00
> Site: www.eds.mu
> Email: hsia
edsnetworks.net
>
>
> Please consider the environment before printing this mail note.
>
>
>
> -----Original Message-----
> From: Andrés Robinet [mailto:agrobinet
bestplace.biz]
> Sent: vendredi 22 février 2008 11:48
> To: php-general
lists.php.net
> Subject: RE: [PHP] URL modification
>
>> -----Original Message-----
>> From: Xavier de Lapeyre [mailto:xavier
edsnetworks.net]
>> Sent: Friday, February 22, 2008 2:09 AM
>> To: php-general
lists.php.net
>> Subject: [PHP] URL modification
>> Importance: High
>>
>> Hi all,
>>
>> I saw on some websites that modifies the links to access the webpages.
>>
>> Something like:
>> http://www.example.com/login/
>> instead of
>> http://www.example.com/login.php
>>
>> Does anyone knows how this works or how its call / which PHP library
>> performs this action?
>>
>>
>> Xavier de Lapeyre
>
> That's called "URI/URL Routing" and it's usually performed as part
> of every MVC
> Framework I know of (CodeIgniter, CakePHP, Symfony, Zend Framework... just to
> name a few). It's usually implemented through Apache's mod_rewrite
> module, but
> you can get close without that module, if you allow for something like:
>
> http://www.example.com/index.php/myaccount/profile (that is, you don't need
> mod_rewrite unless you want to remove the index.php part of the URI path)
>
> However, if you have an existing website, migrating it to use one of the MVC
> frameworks (or just using a stand-alone URI Routing class) may not
> be the path
> you want to follow.
>
> Regards,
>
> Rob
>
> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale,
> FL 33308 |
> TEL 954-607-4207 | FAX 954-337-2695 |
> Email: info
bestplace.net | MSN Chat: best
bestplace.net | SKYPE:
> bestplace |
> Web: bestplace.biz | Web: seo-diy.com
>
There are rewrite modules for IIS also.
Just google for IIS rewrite.
attached mail follows:
> Hmmmm... made a quick look into it.
> Seems to be apache compatible.
> I'm designing a site to be hosted on an IIS Server.
>
> Does it still works there?
On IIS I belive the default document is default.htm Though you should be
able to modify this to whatever you please. On Apache it is index.html
or index.php (for example). Regardless you want this to be parsed by
PHP, and then you can stick the following in it:
<?php
header('http://www.example.com/login.php');
?>
Place this file in your "login" directory and then you'll be able to
publish URLs such as http://www.example.com/login The trailing slash is
not necessary if login is a directory. For example:
http://www.websupportsolutions.co.uk/demo
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
attached mail follows:
Xavier de Lapeyre wrote:
> Hi all,
>
> I saw on some websites that modifies the links to access the webpages.
>
> Something like:
> http://www.example.com/login/
> instead of
> http://www.example.com/login.php
>
> Does anyone knows how this works or how its call / which PHP library
> performs this action?
It could be apache content negotiation that does it.
/Per Jessen, Zürich
attached mail follows:
On Feb 22, 2008, at 2:09 AM, Xavier de Lapeyre wrote:
> Hi all,
>
> I saw on some websites that modifies the links to access the webpages.
>
> Something like:
> http://www.example.com/login/
> instead of
> http://www.example.com/login.php
>
> Does anyone knows how this works or how its call / which PHP library
> performs this action?
>
I do a version of this simply by creating a directory and then put a
default file in... I have Apache set to recognize index.php,
index.shtml, index.html etc. etc. etc. as default files, so when
someone goes to www.raoset.com/contact/ the page that loads is: www.raoset.com/contact/index.shtml
For my purposes it works great :)
--
Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruim
raoset.com
attached mail follows:
Richard Heyes wrote:
>> Hmmmm... made a quick look into it.
>> Seems to be apache compatible.
>> I'm designing a site to be hosted on an IIS Server.
>>
>> Does it still works there?
>
> On IIS I belive the default document is default.htm Though you should be
> able to modify this to whatever you please. On Apache it is index.html
> or index.php (for example). Regardless you want this to be parsed by
> PHP, and then you can stick the following in it:
>
> <?php
> header('http://www.example.com/login.php');
> ?>
>
> Place this file in your "login" directory and then you'll be able to
> publish URLs such as http://www.example.com/login The trailing slash is
> not necessary if login is a directory. For example:
>
> http://www.websupportsolutions.co.uk/demo
>
To use url's like http://domain.com/login/ as opposed to
http://domain.com/login.php you can take multiple approaches.
The first and simplest is to simply save your login.php as /login/index.php
to use this approach you need to ensure that index.php is listed as a
default page.
In IIS you can set the "default" page(s) to be whatever you like:
-> Open IIS Manager
-> Server -> Websites -> Right Click [properties]
-> select "Documents" tab
-> ensure "Enable default content page" is ticked
-> ensure "index.php" is listed
-> if not then click [add] and enter index.php
-> continue to add any other default pages [index.html, index.shtml etc]
The second common solution [and I'd advise to get used to it asap] is to
use URL rewriting.
In short url rewriting involves defining "rules" which the web server
uses to direct http requests to resources on the server.
eg: direct domain.com/all_our_news to /index.php?newsitem=all
a quick intro guide can be found here:
http://www.sitepoint.com/article/guide-url-rewriting
For URL rewriting in IIS use "ISAPI Rewrite" - http://www.isapirewrite.com/
in apache use mod_rewrite
[apache1.3>] httpd.apache.org/docs/1.3/mod/mod_rewrite.html
[apache2.0>] httpd.apache.org/docs/2.0/mod/mod_rewrite.html
Both are pretty much identical when it comes to the end rewrite rules.
Hope that helps a little
Nathan
attached mail follows:
Nathan Rixham wrote:
> To use url's like http://domain.com/login/ as opposed to
> http://domain.com/login.php you can take multiple approaches.
>
[big snip]
>
Seriously, this is all overkill. Apache content negotiation does it all
automagically and with minimal effort.
/Per Jessen, Zürich
attached mail follows:
On Fri, Feb 22, 2008 at 10:53 AM, Per Jessen <per
computer.org> wrote:
> Nathan Rixham wrote:
>
> > To use url's like http://domain.com/login/ as opposed to
> > http://domain.com/login.php you can take multiple approaches.
> >
> [big snip]
> >
>
> Seriously, this is all overkill. Apache content negotiation does it all
> automagically and with minimal effort.
Yes it does.... but the OP is using IIS. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Daniel Brown wrote:
> On Fri, Feb 22, 2008 at 10:53 AM, Per Jessen <per
computer.org> wrote:
>> Nathan Rixham wrote:
>>
>> > To use url's like http://domain.com/login/ as opposed to
>> > http://domain.com/login.php you can take multiple approaches.
>> >
>> [big snip]
>> >
>>
>> Seriously, this is all overkill. Apache content negotiation does it
>> all automagically and with minimal effort.
>
> Yes it does.... but the OP is using IIS. ;-P
Oops, I missed that completely. Sorry.
/Per Jessen, Zürich
attached mail follows:
Per Jessen wrote:
> Daniel Brown wrote:
>
>> On Fri, Feb 22, 2008 at 10:53 AM, Per Jessen <per
computer.org> wrote:
>>> Nathan Rixham wrote:
>>>
>>> > To use url's like http://domain.com/login/ as opposed to
>>> > http://domain.com/login.php you can take multiple approaches.
>>> >
>>> [big snip]
>>> >
>>>
>>> Seriously, this is all overkill. Apache content negotiation does it
>>> all automagically and with minimal effort.
>> Yes it does.... but the OP is using IIS. ;-P
>
> Oops, I missed that completely. Sorry.
>
>
>
> /Per Jessen, Zürich
+ rewrite is overkill for this, but long term it's worth implementing
and getting used to - think of the post as a pre-emptive strike on the
inevitable question in a couple of weeks: "how can i make /profile/adam
instead of profile.php?user=adam"
:) happy friday all
attached mail follows:
> + rewrite is overkill for this, but long term it's worth implementing
> and getting used to - think of the post as a pre-emptive strike on the
> inevitable question in a couple of weeks: "how can i make /profile/adam
> instead of profile.php?user=adam"
Have a directory in your htdocs called /profile/adam and in that place a
default document redirecting. Still no need for mod_rewrite. Unless of
course you want the url to remain in the addressbar, but personally I
don't think that is as important as what the user has to type in initially.
--
Richard Heyes
http://www.phpguru.org
Free PHP and Javascript code
attached mail follows:
I am aware that reverse engineering can be done to every program, and no one
may bother to really take too much trouble to reverse engineer it. All the
same I do not want it to be as simple as a java decompiler wherein the code
is regenerated from a jar file to perfection. Not so easy to break a Delphi
Exe.
I am not used to such fantastic support. Good team work out here. Thanks.
Regards
Allan Fernandes
"Matty Sarro" <msarro
gmail.com> wrote in message
news:e98a51c50802211124p65de992bpefefe8bdb3555c94
mail.gmail.com...
> You can attempt to protect your code with Zend guard or a couple other
> utilities. I believe theres also some php obfuscation utilities out
there -
> consult google. Ultimately though, even with compiled code you will never
> stop someone who wants to see your code, decompilers are commonplace. As
> mentioned in a previous response, a clear cut contract is your best bet
here
> (especially since things like zend guard require additional software,
which
> will in turn decrease performance).
>
> On Thu, Feb 21, 2008 at 12:07 PM, Andrés Robinet <agrobinet
bestplace.biz>
> wrote:
>
> > > -----Original Message-----
> > > From: Richard Lynch [mailto:ceo
l-i-e.com]
> > > Sent: Thursday, February 21, 2008 11:36 AM
> > > To: Allan Fernandes
> > > Cc: php-general
lists.php.net
> > > Subject: Re: [PHP] All Survey leading to PHP
> > >
> > > On Thu, February 21, 2008 6:29 am, Allan Fernandes wrote:
> > > > 1) Is there any method to protect source code of my applications
even
> > > > when
> > > > deployed at the clients Server.
> > >
> > > Have a good, clear contract and relationship with the client.
> > >
> > > You can also attempt to "encode" them with any number of PHP encoders,
> > > all of which have been and can be cracked by a determined user.
> > >
> > > > 2) Can I call Delphi Dll's
> > >
> > > You may be able to use COM objects.
> > > http://php.net/com
> > >
> > > --
> > > 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/from/lynch
> > > Yeah, I get a buck. So?
> > >
> > > --
> >
> > I assume you will be deploying your applications on a windows server,
> > right?
> > Otherwise, COM is NOT an option (probably .Net is ???).
> >
> > Just curious, why would you want to call a Delphi DLL (which is no
> > different
> > than any DLL)?
> > Just curious (x2) has anybody tried Delphi 4 PHP
> > (http://www.codegear.com/products/delphi/php)?
> >
> > As a Delphi fan... if you are moving to PHP development, I'd say you
> > forget all
> > you know about Delphi (or .Net for that matter) except the very generic
> > programming and OOP concepts.
> >
> > If you plan to target Linux... forget about DLLs. However, if you will
> > always
> > use your own server for deployment, you could try *migrating* your
> > existing
> > codebase as a set of modules and cgi programs (I don't know, it depends
on
> > what
> > you are trying to do). Check out Freepascal
(http://www.freepascal.org/).
> >
> > Anyway, if you are deploying PHP web applications for *all* OSs, you'd
> > better
> > off forgetting about Delphi and get good tutorials/courses/books on PHP.
> > And if
> > you want a Delphi-like IDE... be prepared for deception, only Delphi4PHP
> > gets
> > somewhere close to that (and I don't know how high are the runtime
> > requirements
> > to run PHP-VCL applications). There are very good PHP IDEs, such as Zend
> > Studio,
> > PHPDesigner, and NuSphere, etc... but forget about clicking and dragging
> > components on a form if that's your choice.
> >
> > Regards,
> >
> > Rob
> >
> > Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
> > 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL
> > 33308 |
> > TEL 954-607-4207 | FAX 954-337-2695 |
> > Email: info
bestplace.net | MSN Chat: best
bestplace.net | SKYPE:
> > bestplace |
> > Web: bestplace.biz | Web: seo-diy.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
attached mail follows:
At 3:43 AM +0530 2/22/08, Allan Fernandes wrote:
>I am aware that reverse engineering can be done to every program, and no one
>may bother to really take too much trouble to reverse engineer it. All the
>same I do not want it to be as simple as a java decompiler wherein the code
>is regenerated from a jar file to perfection. Not so easy to break a Delphi
>Exe.
>
>I am not used to such fantastic support. Good team work out here. Thanks.
>
>Regards
>Allan Fernandes
I, for one, don't care if someone steals my code or not.
If a client hires me to do something, whatever code I write is his --
that's simple enough.
I wasted more years than I am willing to admit trying to protect
code, there's no doing it. And this is especially true on the net
where you can't even guarantee that a password is safe.
So, my advice -- write good code, pick up your check, and move one to
the next client. Stop worrying about protecting your code and hope
that you get good enough that someone wants to steal it.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Fri, 2008-02-22 at 09:33 -0500, tedd wrote:
> At 3:43 AM +0530 2/22/08, Allan Fernandes wrote:
> >I am aware that reverse engineering can be done to every program, and no one
> >may bother to really take too much trouble to reverse engineer it. All the
> >same I do not want it to be as simple as a java decompiler wherein the code
> >is regenerated from a jar file to perfection. Not so easy to break a Delphi
> >Exe.
> >
> >I am not used to such fantastic support. Good team work out here. Thanks.
> >
> >Regards
> >Allan Fernandes
>
> I, for one, don't care if someone steals my code or not.
>
> If a client hires me to do something, whatever code I write is his --
> that's simple enough.
>
> I wasted more years than I am willing to admit trying to protect
> code, there's no doing it. And this is especially true on the net
> where you can't even guarantee that a password is safe.
>
> So, my advice -- write good code, pick up your check, and move one to
> the next client. Stop worrying about protecting your code and hope
> that you get good enough that someone wants to steal it.
BAD IDEA BUSTER!!! Always backup your code so it's protected from
crashes!!
;)
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. |
`------------------------------------------------------------'
attached mail follows:
At 9:42 AM -0500 2/22/08, Robert Cummings wrote:
>On Fri, 2008-02-22 at 09:33 -0500, tedd wrote:
>> At 3:43 AM +0530 2/22/08, Allan Fernandes wrote:
>> >I am aware that reverse engineering can be done to every program,
>>and no one
>> >may bother to really take too much trouble to reverse engineer it. All the
>> >same I do not want it to be as simple as a java decompiler wherein the code
>> >is regenerated from a jar file to perfection. Not so easy to break a Delphi
>> >Exe.
>> >
>> >I am not used to such fantastic support. Good team work out here. Thanks.
>> >
>> >Regards
>> >Allan Fernandes
>>
>> I, for one, don't care if someone steals my code or not.
>>
>> If a client hires me to do something, whatever code I write is his --
>> that's simple enough.
>>
>> I wasted more years than I am willing to admit trying to protect
>> code, there's no doing it. And this is especially true on the net
>> where you can't even guarantee that a password is safe.
>>
>> So, my advice -- write good code, pick up your check, and move one to
>> the next client. Stop worrying about protecting your code and hope
>> that you get good enough that someone wants to steal it.
>
>BAD IDEA BUSTER!!! Always backup your code so it's protected from
>crashes!!
>
>;)
>
Rob:
Did you forget to take your meds this morning? I'm not talking about
backup. :-)
But you did raise a point I forgot to mention.
When I write something for a client, it's his. But, it's also mine to
be reused as I see fit. I am not above selling the same code to
several different clients.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Fri, Feb 22, 2008 at 9:42 AM, Robert Cummings <robert
interjinn.com> wrote:
> BAD IDEA BUSTER!!! Always backup your code so it's protected from
> crashes!!
And here, I thought that backups were to recover from crashes, not
to "protect from" them.
I learn something new every day. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
I personally never sell my code... everything I create is released as open
source under GPL. However I do sell support, and server management, and
occasionally server hardware to run everything :o) (Richard Stallman
actually gave me the idea a few years ago when I emailed him about ways to
make a profit while still providing open source code
free-as-in-free-beer-and-speech).
I do warn my customers though that if they break it by modifying code its
their responsibility and it lies outside of my responsibility to fix it. Its
worked out wonderfully so far.
On Fri, Feb 22, 2008 at 10:01 AM, Daniel Brown <parasane
gmail.com> wrote:
> On Fri, Feb 22, 2008 at 9:42 AM, Robert Cummings <robert
interjinn.com>
> wrote:
> > BAD IDEA BUSTER!!! Always backup your code so it's protected from
> > crashes!!
>
> And here, I thought that backups were to recover from crashes, not
> to "protect from" them.
>
> I learn something new every day. ;-P
>
> --
> </Dan>
>
> Daniel P. Brown
> Senior Unix Geek
> <? while(1) { $me = $mind--; sleep(86400); } ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
On Fri, 2008-02-22 at 09:57 -0500, tedd wrote:
> >>
> >> So, my advice -- write good code, pick up your check, and move one to
> >> the next client. Stop worrying about protecting your code and hope
> >> that you get good enough that someone wants to steal it.
> >
> >BAD IDEA BUSTER!!! Always backup your code so it's protected from
> >crashes!!
> >
> >;)
> >
>
> Rob:
>
> Did you forget to take your meds this morning? I'm not talking about
> backup. :-)
Hey.. there's a winkie there. I was just being funny.
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. |
`------------------------------------------------------------'
attached mail follows:
On Fri, 2008-02-22 at 10:01 -0500, Daniel Brown wrote:
> On Fri, Feb 22, 2008 at 9:42 AM, Robert Cummings <robert
interjinn.com> wrote:
> > BAD IDEA BUSTER!!! Always backup your code so it's protected from
> > crashes!!
>
> And here, I thought that backups were to recover from crashes, not
> to "protect from" them.
Sure, but if you have no backup, there's nothing to recover, and you'll
wish you had protected your code by making a backup for recovery ;)
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. |
`------------------------------------------------------------'
attached mail follows:
tedd wrote:
> At 9:42 AM -0500 2/22/08, Robert Cummings wrote:
>> On Fri, 2008-02-22 at 09:33 -0500, tedd wrote:
>>> At 3:43 AM +0530 2/22/08, Allan Fernandes wrote:
>>> >I am aware that reverse engineering can be done to every program,
>>> and no one
>>> >may bother to really take too much trouble to reverse engineer it.
>>> All the
>>> >same I do not want it to be as simple as a java decompiler wherein
>>> the code
>>> >is regenerated from a jar file to perfection. Not so easy to break
>>> a Delphi
>>> >Exe.
>>> >
>>> >I am not used to such fantastic support. Good team work out here.
>>> Thanks.
>>> >
>>> >Regards
>>> >Allan Fernandes
>>>
>>> I, for one, don't care if someone steals my code or not.
>>>
>>> If a client hires me to do something, whatever code I write is his --
>>> that's simple enough.
>>>
>>> I wasted more years than I am willing to admit trying to protect
>>> code, there's no doing it. And this is especially true on the net
>>> where you can't even guarantee that a password is safe.
>>>
>>> So, my advice -- write good code, pick up your check, and move one to
>>> the next client. Stop worrying about protecting your code and hope
>>> that you get good enough that someone wants to steal it.
>>
>> BAD IDEA BUSTER!!! Always backup your code so it's protected from
>> crashes!!
>>
>> ;)
>>
>
> Rob:
>
> Did you forget to take your meds this morning? I'm not talking about
> backup. :-)
>
> But you did raise a point I forgot to mention.
>
> When I write something for a client, it's his. But, it's also mine to be
> reused as I see fit. I am not above selling the same code to several
> different clients.
>
> Cheers,
>
> tedd
>
I tend to follow the same pattern, however I say that the "application"
or website as the clients call it is entirely there's, however all
classes/objects/code snippets/javascripts [basically anything re-usable]
remains property of your's truely with indefinate usage right's given to
the client.
Protecting source: I've got a very simple view point on this, I use
linux servers, I can go into the source of everything on the entire
machine and modify or copy it, so why then should my application built
using open source software, running on an open source platform, through
an open source web server with an open source database behind it choose
to use closed source?
I suppose one way of looking at it is, if your codes that good that
people want to re-use it, then let them, help them and gain the credit
and respect that goes with it. Just document it up, attribute credit
where credit's due and GPL your code (or another more restricive license).
Another simple solution is to host all app's on your own server to which
only you have access - although odds are your still going to have to
give the source to the clients so null and voided?
I concurr completely, the support from the PHP community is fantastic,
even the documentation is far superior to any other language that I've
used. Help is a plenty, examples are everywhere, and there's code ready
built on the net for almost everything.
One further point:
I develop on a windows server 2003 machine, I test locally in apache2
and IIS.
I then upload to one of several linux machines [ubuntu, debian, rhel].
No recompiling, no messing about, just upload and run; as far as
"languages to make websites in" go, you won't get much better bar
possibly a python/xul combo but again I think php win's again due to the
sheer amount of add-on's and open source scripts available.
Just a random ramble,
Nathan
14th March :D
attached mail follows:
On Fri, 2008-02-22 at 15:49 +0000, Nathan Rixham wrote:
> One further point:
> I develop on a windows server 2003 machine
I think Mr. T. said it best... "I pity da fool!"
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. |
`------------------------------------------------------------'
attached mail follows:
On Fri, Feb 22, 2008 at 10:58 AM, Robert Cummings <robert
interjinn.com> wrote:
>
> On Fri, 2008-02-22 at 15:49 +0000, Nathan Rixham wrote:
> > One further point:
> > I develop on a windows server 2003 machine
>
> I think Mr. T. said it best... "I pity da fool!"
Must be Friday. ;-P
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Robert Cummings wrote:
> On Fri, 2008-02-22 at 15:49 +0000, Nathan Rixham wrote:
>> One further point:
>> I develop on a windows server 2003 machine
>
> I think Mr. T. said it best... "I pity da fool!"
>
> Cheers,
> Rob.
Indeed, purely because I need to check functionality in IIS and indeed
layout in IE *poor excuse* [convincing myself]
thank the good lord for putty and ssh.
attached mail follows:
On Fri, 2008-02-22 at 16:04 +0000, Nathan Rixham wrote:
> Robert Cummings wrote:
> > On Fri, 2008-02-22 at 15:49 +0000, Nathan Rixham wrote:
> >> One further point:
> >> I develop on a windows server 2003 machine
> >
> > I think Mr. T. said it best... "I pity da fool!"
> >
> > Cheers,
> > Rob.
>
> Indeed, purely because I need to check functionality in IIS and indeed
> layout in IE *poor excuse* [convincing myself]
VMware is da bomb. Never boot up windows outside of a fitting sandbox
again.
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. |
`------------------------------------------------------------'
attached mail follows:
Ryan A escreveu:
> Hey!
> Need to reinstall Apache PHP and MySql for personal development use on my new laptop... I usually used phpdev in the past but now I want php5 compatability... can anyone recommend any such "all in one installer".
> And yes, I know its good experience and so on to do each one manually... but dont have the time to pure over help docs for hours or days.
> Am on Win Vista premium.
> Thanks!
> Ryan
-----------------------
http://www.educar.pro.br/en/
--
zerof
http://www.educar.pro.br/
Apache - PHP - MySQL - Boolean Logics - Project Management
----------------------------------------------------------
You must hear, always, one second opinion! In all cases.
----------------------------------------------------------
Let the people know if this info was useful for you!
----------------------------------------------------------
attached mail follows:
Hi there.
Does anyone knows a good IDE for developing prado? I would prefer an eclipse
plug in if it's possible.
Thanks in Advance!
HJRocha
attached mail follows:
On Fri, Feb 22, 2008 at 7:34 AM, Hélio Rocha <hjrocha
gmail.com> wrote:
> Hi there.
>
> Does anyone knows a good IDE for developing prado? I would prefer an eclipse
> plug in if it's possible.
http://www.google.com/search?q=prado+editor
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
Nathan Nobbe schreef:
> On Thu, Feb 21, 2008 at 12:01 PM, Jochem Maas <jochem
iamjochem.com> wrote:
>
>> Richard Lynch schreef:
>>> If it's that inter-tangled, then I would hazard a WILD GUESS that the
>>> __autoload will still end up loading everything...
>> but not on every request ;-) ... I do use output caching, and I know
>> not everything is actually used in every request.
>
>
> i think youre good to go w/ autoload not loading everything up, but what
> about existing include / require directives? if the code doesnt already
> use __autoload() its almost certainly strewn w/ these. so i think if you
> want the boost from __autoload, not loading up everything, youll at least
> have
> to strip these out.
I know, I have ... I wrote the code in the first :-)
>
> I know - but it's a rubbish solution because it offer no control as to what
>> is cleared from the APC cache, sometimes I want to clear opcodes,
>> sometimes user-data,
>> sometimes both ... graceful means being forced to clear everything.
>
>
> you can pass a parameter to apc_clear_cache()
> http://www.php.net/manual/en/function.apc-clear-cache.php
> that distinguishes what you want to clear; user data or cached opcode.
> obviously calling it from the cli will not clear the webserver user cache
> though.
I know apc_clear_cache() ... the whole problem is doing it on multiple servers.
your statement about not being able to do it from the CLI (which I know) is half
correct AFAICT - you can't clear anything cached in APC via mod_php from the
CLI ... which is my whole problem in a nutshell :-)
>
> One would think that there was something like this indeed - I cannot find
>> it,
>> but then there must be something ... I assume, for instance, that Yahoo!**
>> occassionally
>> see fit to clear APC caches on more than one machine and I doubt Rasmus
>> sits there and
>> opens a browser to run apc.php on each one ;-)
>
>
> i dont know how yahoo does it, but i do know a little about how facebook
> does it; they had
> 3 speakers at the dc php conference last year. i think you might find these
> slides helpful,
> (sorry for the ridiculuus url)
> http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Ftekrat.com%2Ftalks_files%2Fphpdc2007%2Fapc%40facebook.pdf&ei=tce9R9T4FqrszATeiZG6CA&usg=AFQjCNF_1Ecm2cL1EINgRQG9k3fTEclzpA&sig2=ifrJK545M2liBdXbRrHrIw
thanks for that link - it gives me a few angles and ideas to work on!
> you can use capistrano to deploy the new files; but it may be more
> convenient to use php
> and http requests to update all the server caches; *just a thought*.
I'm not using capistrano for file deployment (files are stored centrally
on a GFS volume to which all servers have access) ... I am (will be) using
capistrano in order to run commands symultaneously on all webservers ...
one of which will have to be some kind of cache control mechanism, which is
the case of apc will probably be a php script that hits apc.php on the local
machines webserver (but I want to be able to run said php script on
multiple machines at once, or at least without having to log in to every
machine ... and I see no reason to duplicate the functionality of capistrano,
I just write a php script to do the actual apc.php interaction on the
local webserver that cap can call on each machine.
> there are optimizations that are possible as well, such as setting,
> apc.stat=0 and
got that one set already. :-)
> using apc_compile_file() rather than clearing the entire cache, but these
> techniques add
I read the facebook story about preloading the cache (using memory dumping/loading)
in combination with apc_compile_file() ... which is cool but a little too much
effort given the time/budget I have to complete this (my client doesn't have
X billion to burn ... but funnily enough they do have a viable business model ...
but that's another story ;-)
> complexity. it sounds like you just want to get a decent bumb w/o too much
> additional
> complexity, so i wouldnt recommend them here, but i thought id mention them
> in passing..
apart from writing some kind of management cli script to [remote] control the
apc cache of each webserver I'm also going [to have to] incorporate memcache
functionality into my current caching stuff - many thanks for that PDF link
(I hadn't come accross it before in my searching, although I had discovered
various other facebook+apc/memcache/caching related presentations) it's given me
jsut enough code and ideas to hang myself with ... er I mean write a transparent
memcache layer into my app :-)
>
> -nathan
>
attached mail follows:
>If you wan to shorten a bit you can use a constant as the counter
>increment like so:
>
>define('Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter', 1);
>
>$Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter =
>$Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter +
>Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter;
>
>-Shawn
-Shawn:
Not that you wrote that verbose crap, but my "personal choice" would be:
//Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter = $a
//Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter = $b
$a += $b;
Outside of a reasonable need for readability, variables should not be
used for documentation.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
On Fri, 2008-02-22 at 09:49 -0500, tedd wrote:
> >If you wan to shorten a bit you can use a constant as the counter
> >increment like so:
> >
> >define('Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter', 1);
> >
> >$Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter =
> >$Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter +
> >Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter;
> >
> >-Shawn
>
> -Shawn:
>
> Not that you wrote that verbose crap, but my "personal choice" would be:
>
> //Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter = $a
> //Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter = $b
>
> $a += $b;
>
> Outside of a reasonable need for readability, variables should not be
> used for documentation.
Who needs documentation when variables and functions are
self-documenting?
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. |
`------------------------------------------------------------'
attached mail follows:
At 4:08 PM +0100 2/21/08, Mirco Soderi wrote:
>In the original code there were no sintax errors,
Ah crap -- they're taxing that now?!
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
At 9:59 AM -0500 2/22/08, Robert Cummings wrote:
>On Fri, 2008-02-22 at 09:49 -0500, tedd wrote:
> > Outside of a reasonable need for readability, variables should not be
>> used for documentation.
>
>Who needs documentation when variables and functions are
>self-documenting?
>
>Cheers,
>Rob.
Rob:
Please, medication first, reading email second. :-)
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
attached mail follows:
<snip="100%">
Call me old-fashioned, old, or a bastard, but I still prefer:
for($i=0;$i<count($whatever);$i++) { }
For what do I need to remember the name of the counter increment?
Not only do I not care what it's name is, because it's disposable at
that moment, but I won't even be reusing it. And not just because I
won't be reusing it --- I can't reuse it. Another reason not to care.
Secondly, while Nate R. makes an excellent point about placing
some documentation in the head of the script, I still find that some
of my favorite characters often go far underused. And they are:
//
#
/* and */
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
[snip]
In the original code there were no sintax errors
[/snip]
Is that irony?
attached mail follows:
On Fri, Feb 22, 2008 at 10:01 AM, tedd <tedd.sperling
gmail.com> wrote:
> At 4:08 PM +0100 2/21/08, Mirco Soderi wrote:
> >In the original code there were no sintax errors,
>
> Ah crap -- they're taxing that now?!
http://www.insidervlv.com/taxgeneralinfo.html
--
</Dan>
Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>
attached mail follows:
On 2/21/08, Nick Stinemates <nick
stinemates.org> wrote:
> I'm glad you're literate enough to understand what *indication* and
> *usually* mean.
I know perfectly well what they mean, both words in fact.
What I, and many others I can only assume, are waiting for, is one
shred of an example to back up your obviously immature and uninformed
claim.
> Oh wait..
I am indeed waiting, where's your code? When, and under what
circumstances exactly, is getting back an array of objects from a
function or method call "poor design" ? Please, do tell.
--
Greg Donald
http://destiney.com/
attached mail follows:
On Fri, 2008-02-22 at 09:50 -0600, Greg Donald wrote:
> On 2/21/08, Nick Stinemates <nick
stinemates.org> wrote:
> > I'm glad you're literate enough to understand what *indication* and
> > *usually* mean.
>
> I know perfectly well what they mean, both words in fact.
>
> What I, and many others I can only assume, are waiting for, is one
> shred of an example to back up your obviously immature and uninformed
> claim.
>
> > Oh wait..
>
> I am indeed waiting, where's your code? When, and under what
> circumstances exactly, is getting back an array of objects from a
> function or method call "poor design" ? Please, do tell.
You must have missed his highly persuasive post regarding wrapping
everything in a "collection object" layer. I for one have begun
reworking all of my code. It's been going great so far... I feel so
purist having objects everywhere. I've even implemented wrapper objects
for base datatypes in case someday, a year or 50 from now, I want to
perform an action on an integer. In fact it's great, I've reimplemented
all of the array functions (shuffle, merge, splice, etc) to work on my
collections-- they were super fast as PHP functions but the usability
was just plain crap. Obviously I couldn't apply them to collections of
integers without forcing any future developers into difficulty. And who
knew how much more versatile strings could be as collections of
character objects. In fact, I'm thinking characters should be
collections of bit objects. We'll see about that one though, I'm already
suffering severe performance issues.
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. |
`------------------------------------------------------------'
attached mail follows:
I am using PHP on Linux to communicate with an XML peer. I pull and
push documents from and to their server. On the console I use UTF-8 as
far as I can tell. When I send these documents should my leading tag
read:
<?xml versionnn="1.0" encoding="UTF-8"?>
or is the encoding done by PHP and how do I know what it is encoded to?
TIA
Larry
attached mail follows:
encoding="UTF-8" doesn't guarantee that XML is encoded in UTF-8 its
only purpose is to tell XML parser how to decode that XML document .
it is responsibility of document creator to ensure that XML is proper
UTF-8 document .
on PHP side when creating XML there are number of functions to ensure
UTF-8 strings though there are some issues in PHP5 ,
and one of the main features of upcoming PHP6 is to address UTF-8
Issues that current PHP has.
some of UTF functions
utf8_encode — Encodes an ISO-8859-1 string to UTF-8
string utf8_encode ( string $data )
On Feb 22, 2008, at 4:52 PM, Larry Brown wrote:
> I am using PHP on Linux to communicate with an XML peer. I pull and
> push documents from and to their server. On the console I use
> UTF-8 as
> far as I can tell. When I send these documents should my leading tag
> read:
>
> <?xml versionnn="1.0" encoding="UTF-8"?>
>
> or is the encoding done by PHP and how do I know what it is encoded
> to?
>
> TIA
>
> Larry
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Bojan Tesanovic
http://www.classicio.com/
http://www.real-estates-sale.com/
attached mail follows:
Hi!!
Im trying to sent data to and php with Ajax, so..
this is what im sending>_url= "table='historia'$'='$''$'string'$''&";
then i do:
_url = _url.substring(0,_url.length-1) //quita el & de sobra al final
var ajax = nuevoAjax();
ajax.open("POST", "atrapalo_x.php", true);
ajax.setRequestHeader("Content-Type",
"aplication/x-www-form-urlencoded");
ajax.send(_url);
ajax.onreadystatechange = function()
{
if(ajax.readyState == 4)
{
alert(ajax.responseText)
.
.
.
..............
and in the php i do:
$datafield=explode("$",str_replace("\'","'",$_POST["table"]));
$main_table="".str_replace("'","",$datafield[0])."";
$main_table=strtolower($main_table);
but when i do and echo $datafield[0] or echo $main_table
it returns nothing... just blank
attached mail follows:
2008. 02. 22, péntek keltezéssel 12.03-kor germana ezt Ãrta:
> Hi!!
>
> Im trying to sent data to and php with Ajax, so..
> this is what im sending>_url= "table='historia'$'='$''$'string'$''&";
>
> then i do:
>
> _url = _url.substring(0,_url.length-1) //quita el & de sobra al final
> var ajax = nuevoAjax();
> ajax.open("POST", "atrapalo_x.php", true);
> ajax.setRequestHeader("Content-Type",
> "aplication/x-www-form-urlencoded");
> ajax.send(_url);
>
> ajax.onreadystatechange = function()
> {
> if(ajax.readyState == 4)
> {
> alert(ajax.responseText)
> .
> .
> .
> ..............
>
> and in the php i do:
>
> $datafield=explode("$",str_replace("\'","'",$_POST["table"]));
> $main_table="".str_replace("'","",$datafield[0])."";
> $main_table=strtolower($main_table);
>
> but when i do and echo $datafield[0] or echo $main_table
>
> it returns nothing... just blank
>
and if you var_dump($_POST) what does it show?
greets
Zoltán Németh
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]