php-windows Digest 21 Aug 2001 10:26:26 -0000 Issue 713
Topics (messages 8967 through 8972):
php and http authentication
8967 by: Erick Baum
8968 by: Alain Samoun
Mutiline read as Sigle Line!
8969 by: Jack
8970 by: Michael Rudel
Re: Paths, Windows and PHP
8971 by: Phil Driscoll
currency format.... not international format
8972 by: sur-php
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]
----------------------------------------------------------------------
I think I've seen this done before, but I cannot figure out how to do it...
please help if you can.
I was wondering if/how you could use a PHP script to retrieve information
that was on a web site protected by HTTP authentication (the little pop-up
browser window asking for a username and password) assuming, of course,
that you have a correct username and password that you could pass to it.
Thanks in advance!
Erick
Use the curl extension.
Alain
On Mon, Aug 20, 2001 at 07:15:43PM -0700, Erick Baum wrote:
> I think I've seen this done before, but I cannot figure out how to do it...
> please help if you can.
>
> I was wondering if/how you could use a PHP script to retrieve information
> that was on a web site protected by HTTP authentication (the little pop-up
> browser window asking for a username and password) assuming, of course,
> that you have a correct username and password that you could pass to it.
>
> Thanks in advance!
>
> Erick
>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Dear all
I had a page which let user to input a long description into it! and had
wrote a script which will "fputs" the user input content to content.txt!
When i open the content.txt, it is shown below:
This is a test!
and this is not a joke!
which is fine , because it display as how the user type into the input text
box.
I got another php page which i use "fileread" to grap the content from
content.txt to display it to the browser!! The problem comes, which it read
all the content from content.txt as one line!! It show like below:
This is a test!and this is not a joke!
I want the browser could display exactly the same as the user input! even
the lines and format!
Could anyone pls help me with this?
Thx
Jack
[EMAIL PROTECTED]
Hi Jack,
... look at the generated html-code, you will read:
This is a test!
and this is not a joke!
But since html doesn't display \r\n you have to use
the php-function nl2br.
Greetinx,
Mike
Michael Rudel
- Web-Development, Systemadministration -
Besuchen Sie uns am 20. und 21. August 2001 auf der
online-marketing-d�sseldorf in Halle 1 Stand E 16
_______________________________________________________________
Suchtreffer AG
Bleicherstra�e 20
D-78467 Konstanz
Germany
fon: +49-(0)7531-89207-17
fax: +49-(0)7531-89207-13
e-mail: mailto:[EMAIL PROTECTED]
internet: http://www.suchtreffer.de
_______________________________________________________________
> -----Original Message-----
> From: Jack [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 10:58 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: [PHP-WIN] Mutiline read as Sigle Line!
>
>
> Dear all
> I had a page which let user to input a long description into
> it! and had
> wrote a script which will "fputs" the user input content to
> content.txt!
> When i open the content.txt, it is shown below:
>
> This is a test!
> and this is not a joke!
>
> which is fine , because it display as how the user type into
> the input text
> box.
> I got another php page which i use "fileread" to grap the content from
> content.txt to display it to the browser!! The problem comes,
> which it read
> all the content from content.txt as one line!! It show like below:
>
> This is a test!and this is not a joke!
>
> I want the browser could display exactly the same as the user
> input! even
> the lines and format!
>
> Could anyone pls help me with this?
>
> Thx
> Jack
> [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
Surely the ideal solution to this problem is to have php.exe php4ts.dll and
all the other dlls in the same directory (e.g. c:\php) then there's no
messing around with paths?
Cheers
--
Phil Driscoll
Hello php-windows,
any body know how to do this ?
suppose there is a input number "12345678.23"
i want output to be like this "1,23,45,678.23"
i don't need output in international format...
that means not like this fomrmat "12,345,678.23"
(it is the format used in our country)
so this is what i did...
-------------------------------------------------------------------------------------
<?
function convcurr($a)
{
$nadael=substr($a,-2,1);
$nadael2=substr($a,-1);
if ($nadael===".") {$a=$a."0";}
elseif ($nadael2===".") {$a=$a."00";}
$check=strpos($a,'.');
$check1=strlen($check);
if ($check1==0 and $a<>0) {$a=$a.".00";}
$b=strlen($a);
$c=strpos($a,".");
$d=substr("$a",$c);
$e=substr("$a",0,-($b-$c));
$f=strlen($e);
$aa="";
for ($i=1;$i<$f+1;$i++)
{
$g=substr("$e",-$i,1);
$aa=$g.$aa;
if($i==3){$aa=",".$aa;}
if($i==5 and $i<$f){$aa=",".$aa;}
if($i==7 and $i<$f){$aa=",".$aa;}
if($i==9 and $i<$f){$aa=",".$aa;}
if($i==11 and $i<$f){$aa=",".$aa;}
if($i==13 and $i<$f){$aa=",".$aa;}
}
$summa=$aa.$d;
$replace=str_replace("-,","-",$summa);
$issmall=strlen($replace);
if ($issmall<8) {$replace=str_replace(",","",$replace);}
echo "$replace";
}
?>
-------------------------------------------------------------------------------------
this works for me...
it should be used in this was
-------------------------------------------------------------------------------------
<?
include ("curr-convert.php");
$a="12345678.23"
convcurr($a);
?>
-------------------------------------------------------------------------------------
but i think there must be some easy way....
can anyone can give idea about it ?
i think you understood what i wrote here...
--
Best regards,
sur-php mailto:[EMAIL PROTECTED]