|
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 26 Nov 2005 21:43:19 -0000 Issue 3817
php-general-digest-help
lists.php.net
Date: Sat Nov 26 2005 - 15:43:19 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 26 Nov 2005 21:43:19 -0000 Issue 3817
Topics (messages 226465 through 226492):
Re: Is there an alternative for $_FILES['guildimage']['type'] == "image/jpeg"
226465 by: Andy Pieters
Re: Wanna Join me for an open source PHP Project?
226466 by: Andy Pieters
226467 by: bala chandar
226473 by: M. Sokolewicz
226483 by: Robert Cummings
226485 by: M. Sokolewicz
226487 by: Robert Cummings
Adding links to HTML for a CMS
226468 by: Shaun
226478 by: Matt Monaco
226480 by: Matt Monaco
Benchmarking SPL Iterators vs for / foreach ???
226469 by: Andrei Verovski (aka MacGuru)
Re: $_GET and $_POST arrays not working
226470 by: John Nichel
226475 by: Unknown Unknown
Unable to compile php 5.1 / 5.1RC ok
226471 by: robert mena
When to make a class
226472 by: Todd Cary
226476 by: Oliver Grätz
226477 by: Todd Cary
226481 by: Matt Monaco
SQL Password() function
226474 by: Yaswanth Narvaneni
226484 by: Gustavo Narea
An event calendar
226479 by: Todd Cary
Web based editor
226482 by: Todd Cary
226486 by: Joe Wollard
226491 by: Todd Cary
Re: php + cURL issue
226488 by: Nate Nielsen
Re: cms type session - how to ?
226489 by: Raj Shekhar
226492 by: Raj Shekhar
RecursiveDirectoryIterator & RecursiveFilterIterator
226490 by: Jared Williams
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:
On Wednesday 23 November 2005 03:15, twistednetadmin wrote:
> I use this line in a script for uploading pictures to a website:
>
> $_FILES['guildimage']['type'] == "image/jpeg"
>
[snip]
Please understand that the type is set by the browser and is never to be
trusted.
Especially with file uploads, extreme cautions apply.
If all you want to upload are images, then ONLY rely on the php builtin
getimagesize
Example
if($result=(
getimagesize($_FILES['guildimage']['tmp_name'])) ===false)
die('Invalid picture');
list($width,$height,$type)=$result;
swith($type)
{case 1: #gif; break;
case 2: #jpeg; break;
case 3: #png; break;
case ... see php getimagesize documentation
}
And always use the move_uploaded_file function so you are sure you really are
moving an uploaded file and not one that is already on the server
Example
move_uploaded_file($_FILES['guildimage']['tmp_name'],$publicdir);
This function will fail if called with a file that was not uploaded.
HTH
Andy
--
Now listening to Top! Radio Live www.topradio.be/stream on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBDiCuU6Hylol726jIRAlwvAJ9YldRXTo2kJXplNGJggi3yVz96JwCfQ3/s
Kq40ChB/SWaW5CRvGg61MYM=
=6808
-----END PGP SIGNATURE-----
attached mail follows:
Hmmm..
Outlook is notorious for blatantly violating the standards and being a
security nightmare.
Instead I suggest you make an application that has the same look & feel as
outlook but has a core that is much smarter, safer, and better.
Also, work from the ground up to generate standards compliant html (or xhtml)
documents so that FireFox, and KHTML based browsers will render it ok. You
can later add hacks to support non-standard compliant browsers (such as ie)
Not starting a flame war, just providing some common sense.
Good luck with your project
With kind regards
Andy
--
Now listening to Top! Radio Live www.topradio.be/stream on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQBDiC0+6Hylol726jIRApuSAKCALmMR/JOcD6wRHO9TFyzH36V6GQCfcLTq
QWNLA3rhVH+0lQYyCBGdySc=
=w6fv
-----END PGP SIGNATURE-----
attached mail follows:
On 11/26/05, Andy Pieters <mailings
vlaamse-kern.com> wrote:
> Hmmm..
>
> Outlook is notorious for blatantly violating the standards and being a
> security nightmare.
>
> Instead I suggest you make an application that has the same look & feel as
> outlook but has a core that is much smarter, safer, and better.
>
> Also, work from the ground up to generate standards compliant html (or xhtml)
> documents so that FireFox, and KHTML based browsers will render it ok. You
> can later add hacks to support non-standard compliant browsers (such as ie)
i will take your suggestions.
>
> Not starting a flame war, just providing some common sense.
> Good luck with your project
>
>
> With kind regards
>
> Andy
>
>
> --
> Now listening to Top! Radio Live www.topradio.be/stream on amaroK
> Geek code: www.vlaamse-kern.com/geek
> Registered Linux User No 379093
> If life was for sale, what would be its price?
> www.vlaamse-kern.com/sas/ for free php utilities
> --
>
>
>
--
<name> balachandar muruganantham</name>
<Yahoo!> mbchandar</Yahoo!>
<Hotmail> mbchandar</Hotmail>
<blog> http://chandar.blogspot.com</blog>
<web>http://www.balachandar.net</web>
<talk> http://www.expertstalk.org</talk>
<shop>http://www.chennaishopping.com</shop>
attached mail follows:
I'm pretty sure something like this already exists. Why? because I know
somebody who uses it. Ok, so it's written in asp (by MS if I'm not
mistaking), still... I wouldn't know why you'd want to write a new one
in php... seems hard to make to me; might be wrong though.
anyway, good luck
bala chandar wrote:
> Hi All,
>
> I have just started a Open source Project in SourceForget.net using PHP.
>
> Project Name: Weblook Express
> URL : http://sourceforge.net/projects/weblookexpress
>
> Idea came to me when i thought of porting the complete windows based
> Desktop outlook express Application into a Portable, Web based
> Application that runs on any Javascript supported webbrowser for any
> POP3, or IMAP or HTTP Mail Service Providers.
>
> I am just looking for people who can work along with me so that
> complete porting occurs so that we can release the base version.
>
> Technology to be used would be PHP, XML, XSLT, Javascript, HTML.
>
> About Weblook Express
> Weblook Express provides an integrated solution for managing and
> organizing e-mail messages. It delivers innovations you can use to
> manage your email communications, organize your mails - all from one
> place similar like the desktop outlook express.
>
> Project would involve complete porting of Desktop Outlook Express that
> comes with Internet Explorer. The user should be able to configure
> multiple Mail Service Providers. User experience is what we must see.
> and i have more ideas in my mind. I also invite ideas, suggestions for
> this project.
>
> Looking for developers...
> --
> <name> balachandar muruganantham</name>
> <Yahoo!> mbchandar</Yahoo!>
> <Hotmail> mbchandar</Hotmail>
> <blog> http://chandar.blogspot.com</blog>
> <web>http://www.balachandar.net</web>
> <talk> http://www.expertstalk.org</talk>
> <shop>http://www.chennaishopping.com</shop>
attached mail follows:
On Sat, 2005-11-26 at 11:09, M. Sokolewicz wrote:
> I'm pretty sure something like this already exists. Why? because I know
> somebody who uses it. Ok, so it's written in asp (by MS if I'm not
> mistaking), still... I wouldn't know why you'd want to write a new one
> in php... seems hard to make to me; might be wrong though.
Hard to make is not a very good argument against making something.
Especially when there's already a will to make it.
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:
Robert Cummings wrote:
> On Sat, 2005-11-26 at 11:09, M. Sokolewicz wrote:
>
>>I'm pretty sure something like this already exists. Why? because I know
>>somebody who uses it. Ok, so it's written in asp (by MS if I'm not
>>mistaking), still... I wouldn't know why you'd want to write a new one
>>in php... seems hard to make to me; might be wrong though.
>
>
> Hard to make is not a very good argument against making something.
> Especially when there's already a will to make it.
>
> Cheers,
> Rob.
that wasn't the reason; the reason I'm looking at is that there is
already a vendor-supplied way of doing it, and a non-vendor way would
(most probably) not have the possibility of even duplicating the
vendor-supplied version's possibilities (in this case).
attached mail follows:
On Sat, 2005-11-26 at 14:03, M. Sokolewicz wrote:
> Robert Cummings wrote:
> > On Sat, 2005-11-26 at 11:09, M. Sokolewicz wrote:
> >
> >>I'm pretty sure something like this already exists. Why? because I know
> >>somebody who uses it. Ok, so it's written in asp (by MS if I'm not
> >>mistaking), still... I wouldn't know why you'd want to write a new one
> >>in php... seems hard to make to me; might be wrong though.
> >
> >
> > Hard to make is not a very good argument against making something.
> > Especially when there's already a will to make it.
> >
>
> that wasn't the reason; the reason I'm looking at is that there is
> already a vendor-supplied way of doing it, and a non-vendor way would
> (most probably) not have the possibility of even duplicating the
> vendor-supplied version's possibilities (in this case).
That's like saying open source solutions can't compete with commercial
solutions. I'm not buying it (pun observed but not intended :)
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:
Hi,
I am trying to create my own CMS. To being with I want to let users edit
anything within a <p> tag.
I want to have a menu to the left and display the webpage in the rest of the
page, and for each set of <p> tags I want the user to be able to click on
the link to edit that paragraph.
My problem is how can I include a webpage in my CMS and for each <p> tag
wrap an <a href""> tag araound it?
Thanks for your advice.
attached mail follows:
You can use file_get_contents and use an http address as a parameter. Then
use the pearl regular expressions functions to replace <p> with the elements
you'd like.
""Shaun"" <shaunthornburgh
hotmail.com> wrote in message
news:AC.48.56276.9A458834
pb1.pair.com...
> Hi,
>
> I am trying to create my own CMS. To being with I want to let users edit
> anything within a <p> tag.
>
> I want to have a menu to the left and display the webpage in the rest of
> the page, and for each set of <p> tags I want the user to be able to click
> on the link to edit that paragraph.
>
> My problem is how can I include a webpage in my CMS and for each <p> tag
> wrap an <a href""> tag araound it?
>
> Thanks for your advice.
attached mail follows:
You can use file_get_contents and use an http address as a parameter. Then
use the pearl regular expressions functions to replace <p> with the elements
you'd like.
""Shaun"" <shaunthornburgh
hotmail.com> wrote in message
news:AC.48.56276.9A458834
pb1.pair.com...
> Hi,
>
> I am trying to create my own CMS. To being with I want to let users edit
> anything within a <p> tag.
>
> I want to have a menu to the left and display the webpage in the rest of
> the page, and for each set of <p> tags I want the user to be able to click
> on the link to edit that paragraph.
>
> My problem is how can I include a webpage in my CMS and for each <p> tag
> wrap an <a href""> tag araound it?
>
> Thanks for your advice.
attached mail follows:
Hi,
Someone have benchmarked SPL iterators vs for / foreach loops? What is the performance penalty?
SPL is ¨interpreted wrapper¨ on the top of C++ STL (correct me if I am wrong), and I am sure it uses STL callbacks. But unlike C++, PHP scripts are interpreted, so pointer arithmetic will work only through Zend engine which for sure adds extra performance penalty.
Thanks in advance for any suggestion(s)
************************************************
*** with best regards
*** Andrei Verovski (aka MacGuru)
*** Mac, Linux, DTP, Programming Web Site
***
*** http://snow.prohosting.com/guru4mac/
************************************************
attached mail follows:
> On Saturday 26 November 2005 02:45, John Nichel wrote:
>> If you have a form like this one one page...
>>
>> <form action="page2.php" method="post">
>> <input type="hidden" name="foo" value="bar" />
>> <input type="submit" />
>> </form>
>>
> [snip]
>
> Dear John
>
> Please go all the way when providing an example. To prevent errors and
> unpredictable behaviour, ALWAYS add encoding to the form tag.
>
> <form action="page2.php" method="post" enctype="multipart/form-data"
> name="form1">
>
> Systematically adding names on all your forms may save you many hours of
> hair
> plucking as well ;)
Neither are required. enctype is implied if left out, and name is only
'useful' on the client side. Even the W3C's examples match what I posted.
http://www.w3.org/TR/html4/interact/forms.html#h-17.3
--
John C. Nichel IV
Programmer/System Admin
Dot Com Holdings of Buffalo
716.856.9675
jnichel
dotcomholdingsofbuffalo.com
attached mail follows:
Thank you, my login script started to work and i'l find some functions to
clean data properly
attached mail follows:
Hi,
I am trying to compile php 5.1 but it fails with pdo error messages
'./configure' '--with-apxs2' '--with-mysql=/usr' '--enable-soap'
'--with-xmlrpc' --with-zlib --enable-pdo=shared --with-pdo-mysql=/usr
ext/sqlite/.libs/sqlite.o(.text+0x1365): In function `zm_startup_sqlite':
/home/build/php-5.1.0/ext/sqlite/sqlite.c:1100: undefined reference to
`php_pdo_register_driver'
...
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
I do have sqlite/sqlite-devel installed.
Linux / FC4
sqlite-3.1.2-3
sqlite-devel-3.1.2-3
attached mail follows:
My background is in Object Oriented Pascal (Delphi), however I am having
difficulty knowing when to make a class in PHP. For instance, in my
script file, functions.php, I have these functions among others:
/* Input a field */
function input_field($name, $value, $size, $max) {
echo('<INPUT TYPE="text" NAME="' . $name . '" VALUE="' . $value .
'" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
};
/* Input a password field */
function input_password_field($name, $value, $size, $max) {
echo('<INPUT TYPE="password" NAME="' . $name . '" VALUE="' . $value .
'" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
};
Should I have a class that contains these functions (methods)?
One of my non-profit clients would like to have an online emailer
program driven by a MySQL database. This I can envision as a class,
actually several classes (e.g. send mail, create message, select
addresses, etc.).
Todd
attached mail follows:
Todd Cary schrieb:
> My background is in Object Oriented Pascal (Delphi), however I am having
> difficulty knowing when to make a class in PHP. For instance, in my
> script file, functions.php, I have these functions among others:
>
> /* Input a field */
> function input_field($name, $value, $size, $max) {
> echo('<INPUT TYPE="text" NAME="' . $name . '" VALUE="' . $value .
> '" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
> };
>
> /* Input a password field */
> function input_password_field($name, $value, $size, $max) {
> echo('<INPUT TYPE="password" NAME="' . $name . '" VALUE="' . $value .
> '" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
> };
>
>
> Should I have a class that contains these functions (methods)?
Simple answer:
If YOU don't see the benefits of a class then you shouldn't use one.
Longer answer:
I see the benefits of a class when functions start sharing variables.
Then you would have to use $GLOBALS or the global keyword. This is a big
indication that the functions should instead be inside a class and that
the variables should be properties of that class.
Of course, when you start using classes you slowly move to using classes
even if they're not absolutely necessary as with your two functions up
there. Then one notices that there are even more types of input fields
(radio buttons, hidden fields, select boxes...) and that they have
something in common (attributes of the input tag). So one could think
"Hey, why not make a base class for all fields?". And so on...
OLLi
attached mail follows:
Olli -
A very well thought out answer. I especially liked the part, "I see the
benefits of a class when functions start sharing variables.".
Todd
Oliver Grätz wrote:
> Todd Cary schrieb:
>
>>My background is in Object Oriented Pascal (Delphi), however I am having
>> difficulty knowing when to make a class in PHP. For instance, in my
>>script file, functions.php, I have these functions among others:
>>
>> /* Input a field */
>> function input_field($name, $value, $size, $max) {
>> echo('<INPUT TYPE="text" NAME="' . $name . '" VALUE="' . $value .
>> '" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
>> };
>>
>> /* Input a password field */
>> function input_password_field($name, $value, $size, $max) {
>> echo('<INPUT TYPE="password" NAME="' . $name . '" VALUE="' . $value .
>> '" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
>> };
>>
>>
>>Should I have a class that contains these functions (methods)?
>
>
> Simple answer:
> If YOU don't see the benefits of a class then you shouldn't use one.
>
> Longer answer:
> I see the benefits of a class when functions start sharing variables.
> Then you would have to use $GLOBALS or the global keyword. This is a big
> indication that the functions should instead be inside a class and that
> the variables should be properties of that class.
> Of course, when you start using classes you slowly move to using classes
> even if they're not absolutely necessary as with your two functions up
> there. Then one notices that there are even more types of input fields
> (radio buttons, hidden fields, select boxes...) and that they have
> something in common (attributes of the input tag). So one could think
> "Hey, why not make a base class for all fields?". And so on...
>
> OLLi
attached mail follows:
There's really no reason making classes for those (unless you'd like to
write an entire HTML class and its children - I'd be happy to use it!).
Matt
"Todd Cary" <todd
aristesoftware.com> wrote in message
news:DB.E6.56276.13688834
pb1.pair.com...
> My background is in Object Oriented Pascal (Delphi), however I am having
> difficulty knowing when to make a class in PHP. For instance, in my
> script file, functions.php, I have these functions among others:
>
> /* Input a field */
> function input_field($name, $value, $size, $max) {
> echo('<INPUT TYPE="text" NAME="' . $name . '" VALUE="' . $value .
> '" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
> };
>
> /* Input a password field */
> function input_password_field($name, $value, $size, $max) {
> echo('<INPUT TYPE="password" NAME="' . $name . '" VALUE="' . $value .
> '" SIZE="' . $size . '" MAXLENGTH="' . $max . '">');
> };
>
>
> Should I have a class that contains these functions (methods)?
>
> One of my non-profit clients would like to have an online emailer program
> driven by a MySQL database. This I can envision as a class, actually
> several classes (e.g. send mail, create message, select addresses, etc.).
>
> Todd
attached mail follows:
Hi!
Is there a function (or a code snippet) in PHP for mysql password() function?
I 'dont' want to use something like select * from table where
table.passwd=password($passwd);
Is there any other alternate way to do it?
Regards,
Yaswanth
--
"In theory there is no difference between theory and practice.
In practice there is." -- Fortune Cookie
attached mail follows:
Hi.
Yaswanth Narvaneni wrote:
> Hi!
>
> Is there a function (or a code snippet) in PHP for mysql password() function?
>
> I 'dont' want to use something like select * from table where
> table.passwd=password($passwd);
>
> Is there any other alternate way to do it?
Try this:
<?php
$mypassword="this is my password!!!";
$query=mysql_query("SELECT PASSWORD('$mypassword')");
list($mysql_pass)=mysql_fetch_array($query);
mysql_free_result($query);unset($query);
printf( "My password is "%s" and Its hash value ".
"is "%s" computed by the MySQL PASSWORD() function",
$mypassword, $mysql_pass);
?>
You don't need a MySQL connection.
Happy weekend.
--
Gustavo Narea.
PHP Documentation - Spanish Translation Team.
Valencia, Venezuela.
attached mail follows:
Currently I am considering the use of ltwCalendar, however I am open to
suggestions for an open source event calendar like this demo of ltwCalendar:
http://209.204.172.137/sfyc/php/calendar/calendar.php
I would like to be able to easily modify it so that I can have an event
that links to another page when necessary or even to a "signup" page to
make reservations.
Exploring....
Todd
attached mail follows:
I want to provide the user with an editor like
http://209.204.172.137/FCKeditor/_samples/php/sample01.php
Is it best to use a JavaScript based editor?
Are there some "favorites" out there or is the FCKeditor about as good
as they get?
Todd
attached mail follows:
On Nov 26, 2005, at 12:11 PM, Todd Cary wrote:
> I want to provide the user with an editor like
>
> http://209.204.172.137/FCKeditor/_samples/php/sample01.php
>
> Is it best to use a JavaScript based editor?
>
> Are there some "favorites" out there or is the FCKeditor about as
> good as they get?
>
> Todd
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
I don't know if one is better than the next, but I've used TinyMCE in
the past and it has served me well.
http://tinymce.moxiecode.com/
attached mail follows:
Joe -
Thank you. I like how TinyMCE integrates.
Todd
Joe Wollard wrote:
> On Nov 26, 2005, at 12:11 PM, Todd Cary wrote:
>
>> I want to provide the user with an editor like
>>
>> http://209.204.172.137/FCKeditor/_samples/php/sample01.php
>>
>> Is it best to use a JavaScript based editor?
>>
>> Are there some "favorites" out there or is the FCKeditor about as
>> good as they get?
>>
>> Todd
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
> I don't know if one is better than the next, but I've used TinyMCE in
> the past and it has served me well.
> http://tinymce.moxiecode.com/
attached mail follows:
I'm adding additional bounty to my problem for anyone who can help me fix
it.
I'll send you a Rio Cali Sport 256 MB MP3 player - new in box. Comes with
the sport ear buds, arm strap, few other accessories. You can google it for
the details of it. Great for a stocking stuffer or as an extra gadget for
kicks (as if we all dont have enough). =D
To restate the problem for those that have forgotten, one server is working
(win 2k, other is not win 2k3) - same code, same versions of everything.
I've created a page for you to view the code / the verbose data / the
phpInfo() for the two servers. Its a script to auto-login to a site - not
particularly yahoo, the problem occurs with all cookie based logins, so
using this yahoo script as an example. Again, the win2k server ==IS==
working with that code - so its dosent appear to be a code issue.
You can view the debug information here : http://70.84.198.254/index.html
thanks again,
Nate Nielsen
nnielsen
cfgod.com
----- Original Message -----
From: "Curt Zirzow" <czirzow
gmail.com>
To: <php-general
lists.php.net>
Sent: Friday, November 18, 2005 11:04 PM
Subject: Re: [PHP] php + cURL issue
> On Fri, Nov 18, 2005 at 06:08:16PM -0600, Nate Nielsen wrote:
>> Okay, I've added the verbose output to copare exactly what is happening
>> between the two versions - thanks to Curt, the verbose info shows there
>> IS
>> something different happening.
>>
>> To recap, the code is exactly the same, the php version is the same (same
>> files even), the php.ini is the same (except drive letters), the curl
>> version is exactly the same (libcurl/7.14.0 OpenSSL/0.9.8 zlib/1.2.3).
>> The
>> only difference is that one server is Win2k and the other is Win2003
>> (and
>> of course one is working and other is not).
>
> yeah, it does seem to be *not* a bug in curl versions.
>
>>
>> Now it is very clear that something different is happening on the two
>> different servers. I've created a page to list the phpInfo() data, the
>> code that is being run, and the VERBOSE information outputted by cURL.
>>
>> You can view the information here : http://70.84.198.254/index.html
>
> ok.. the key thing i noticed in that nice little side by side
> display you put together is this:
>
> When you are sending the first post data look at the end of it
> curl is complaining about something:
>
> Ok side:
> name=login_form&.src=auc&.tries=1&.done=TML
> 4.01//EN&.md5=&.hash=&.js=&.partner=&.slogin=adsherrouse&.intl=us&.fUpdate=&.prelog=&.bid=&.aucid=&.challenge=.01//EN&.yplus=&.chldID=&pkg=&hasMsgr=0&passwd=doglogan&submit=Sign
> In< HTTP/1.1 302 Found
>
> Bad Side:
> name=login_form&.src=auc&.tries=1&.done=TML
> 4.01//EN&.md5=&.hash=&.js=&.partner=&.slogin=adsherrouse&.intl=us&.fUpdate=&.prelog=&.bid=&.aucid=&.challenge=.01//EN&.yplus=&.chldID=&pkg=&hasMsgr=0&passwd=doglogan&submit=Sign
> In* Curl_xxx_rcvs returned -1, block = TRUE
>
> You will notice that the ok side is sends back a 302 while the bad
> side is returning an error from curl.
>
> I'm not sure what that Curl_xxx_rcvs.. line means but it seems is
> the source of the problem.
>
> A other thing you would want to compare is the actual results that
> come back from the request.
>
> On the otherhand, what you seem to be doing is very likely to break
> sooner than later, i'm not sure why you want to proxy a complex web
> authentication system such as yahoo's
>
>
> Curt.
> --
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
in infinite wisdom Gregory Machin spoke thus On 11/23/2005 04:28 PM:
> Sorry for the lack of clarity on the single page... eg :
> http://127.0.0.1/index.php?
> where the index.php holds the logic of what is displayed and by passing vars
> back to it's self determins what is next displayed .. hope that helps..
What you mean is that you want a MVC framework. This might help
http://www.onlamp.com/pub/a/php/2005/09/15/mvc_intro.html and this
http://www.tonymarston.co.uk/php-mysql/model-view-controller.html#2005-06-21
--
Raj Shekhar
blog : http://rajshekhar.net/blog home : http://rajshekhar.net
Disclaimer : http://rajshekhar.net/disclaimer
attached mail follows:
in infinite wisdom Gregory Machin spoke thus On 11/23/2005 04:28 PM:
> Sorry for the lack of clarity on the single page... eg :
> http://127.0.0.1/index.php?
> where the index.php holds the logic of what is displayed and by passing vars
> back to it's self determins what is next displayed .. hope that helps..
What you mean is that you want a MVC framework. This might help
http://www.onlamp.com/pub/a/php/2005/09/15/mvc_intro.html and this
http://www.tonymarston.co.uk/php-mysql/model-view-controller.html#2005-06-21
--
Raj Shekhar
blog : http://rajshekhar.net/blog home : http://rajshekhar.net
Disclaimer : http://rajshekhar.net/disclaimer
attached mail follows:
Hi,
Having trouble writing a RecursiveFilterIterator to exclude linked directories from the recursive listing..
class DXLinkDirectoryRecursiveFilter extends RecursiveFilterIterator
{
function accept() { return TRUE; }
}
interface DXDirectoryVisitor
{
function visit(DirectoryIterator $file);
}
class DXDirectory
{
const FILES_FIRST = RecursiveIteratorIterator::CHILD_FIRST;
const FILES_ONLY = RecursiveIteratorIterator::LEAVES_ONLY;
const DIR_FIRST = RecursiveIteratorIterator::SELF_FIRST;
private $directory;
function __construct($directory)
{
$this->directory = $directory;
}
function forEvery(DXDirectoryVisitor $visitor, $mode = self::DIR_FIRST)
{
$r = file_exists($this->directory);
if ($r)
{
$directoryIterator = new RecursiveDirectoryIterator($this->directory);
$directoryIterator = new DXLinkDirectoryRecursiveFilter($directoryIterator);
$recursiveIteratorIterator = new RecursiveIteratorIterator($directoryIterator, $mode);
foreach($recursiveIteratorIterator as $i)
{
if (!$i->isDot())
$r = $r && $visitor->visit($i);
}
}
return $r;
}
}
class DXDirEcho implements DXDirectoryVisitor
{
function visit(DirectoryIterator $dir)
{
echo $dir->getPathname(), "\n";
return TRUE;
}
}
$d = new DXDirectory('somedirectory');
$d->forEvery(new DXDirEcho());
The filter shouldn't be doing anything, according to my understanding, but its filtering out all files in any of the subdirectories.
Jared
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]