[PHP-WIN] user selectionz ?????

2003-02-21 Thread toby z
hi guyz

im making this report generation form which 
lets the user select a category out of 8 through a dropdown list
then the user has to select a few more thinggs
only then the report can be generated

now my problem is
each of the 8 categories has 3 to 5 sub-categories
what i want to do is when he selects a category the sub-cat-dropdown
should get the sub-cats of ONLY the category selected

n i have no clue how to go about this decently
that is without having to re-load the page when category is selected


suggesstion  solutions pleeez

thnx a million

toby .



__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




[PHP-WIN] Re: Writing in txt file...

2003-02-21 Thread Radovan Radic
Why dont open for append
$fp=fopen(file.txt,a);
fputs($fp,New line?);

Or i didnt understand what do u need?

Afan Pasalic [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 I'm working on adding a new row in text file. I use file() to transfer
file
 to array and then after recognizing the row with MARK_HERE hadd new row
 above the MARK row. It works fine. I use this code:

 $AddContent = Content of the new line...;

 $lines = file('old_content.txt');
 for($i=0; $icount($lines); $i++)
 {
 echo $i. $lines[$i]br;
 if(ereg('### MARK_HERE New row comes above this one', $lines[$i]))
 {
 $NewArray[] = $AddContent;
 }
 $NewArray[] = $lines[$i];
 }

 But what then? Code to add new line works fine but can't convert/write
back
 to new_content.txt file. looking for something opposite then file() -
 taking array and writing it in file...

 Thanks for any help!


 Afan




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




RE: [PHP-WIN] Force a user to download a text file from a link

2003-02-21 Thread Jill . Ramonsky

Far be it from me to question the wisdom of tweaking the headers, but why do
you need them at all?
Why can't you just do:

a href =filename.txtclick here/a

which, so far as I can see, will load said text page into the user's browser
window as soon as they click on the link. If the user then wants to save it,
they can use the browser's Save As function.

Too easy?

Jill


-Original Message-
From: FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 2:22 PM
To: 'George Pitcher'; Matt Babineau; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link


you could also try this:
or this 
or this 

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




[PHP-WIN] Re: Authenticate user

2003-02-21 Thread Rui
I'm really new at this authentification thing...

What I want do to:

1- a user appears
2- he fills a form (easy)
3- gain access to the page (?)
4- no one else can log-on until the user who is logged quits (very
important) ()
5- inside the user can surf in diferent php files without being asked for
new athentification ()

---

3 - Trying to authentificate user the warnings bellow appear:
  Warning: Cannot send session cache limiter - headers
already sent
  Warning: Cannot add header information - headers already
sent by (

   Line of the first Warning:

// Main --
 session_start();

   Line of second warning:

// Relocate back to the login page
header(Location: index.php);


5- How can a user surf in diferent pages with the same loggin?


Thanks

Rui Monteiro



Rui [EMAIL PROTECTED] escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm trying to make a page that requires an authentification by the user.

 A lot of problems appear when I run a script copied from the O'Reilly :
Web
 Database Applications.

 One of them is the function :clean: that doesn't exist, according with the
 php compiler:

   session_start();

   $authenticated = false;

   // Clean the data collected from the user
   $appUsername =
 clean($HTTP_POST_VARS[formUsername], 10);
   $appPassword =
 clean($HTTP_POST_VARS[formPassword], 15);

 Can someone tell me what is the prob? Where can I get information for this
 kind of script?

 Thanks.





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




RE: [PHP-WIN] Force a user to download a text file from a link

2003-02-21 Thread FARRINGTON, RYAN
that requires some form of trust in the user... I experience too many stupid
people in what I do on a day to day basis and it is just easier if it forces
a download... 


typical user experience: I were a user and there was a link to a word
document that i wanted to edit. If I clicked on the link [and I had word
installed =)] it would open the file in my browser window and allow me to
edit it... but there is not toolbar for saving.. where are all my formatting
tools... oh no I've gotta call the person that put the link out because I
can't figure out what to do... help me ... BLAH!!! I hate people like that
so I force the download and they edit it locally and use the same page to
re-upload it.. it is just easier =)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 3:51 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link



Far be it from me to question the wisdom of tweaking the headers, but why do
you need them at all?
Why can't you just do:

a href =filename.txtclick here/a

which, so far as I can see, will load said text page into the user's browser
window as soon as they click on the link. If the user then wants to save it,
they can use the browser's Save As function.

Too easy?

Jill


-Original Message-
From: FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 20, 2003 2:22 PM
To: 'George Pitcher'; Matt Babineau; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link


you could also try this:
or this 
or this 



RE: [PHP-WIN] Force a user to download a text file from a link

2003-02-21 Thread Jill . Ramonsky

Yeah, but the title of this thread says to download a TEXT FILE, not a Word
document.

No-one with any sense would ever download a Microsoft Word document off the
internet by choice, unless they had a serious amount of trust in the web
site owner, were browsing over a secure connection using SSL, and said
document was digitally signed with a PHP signature or similar. And even
then, you'd want to make sure your virus checker was switched on. This is
because Microsoft Word documents, like executables, CAN CARRY VIRUSES
(called Word Macros).

...and if you should _ever_ discover how to force someone to download
something against their will, then that of course would be highly
unethical...

Maybe I'm just missing the point here. Is it really TEXT documents you're
interested in, or something else? If it's text documents only, then my
original suggestion still stands. If it's something more sinister then
perhaps we should consider changing the thread title.

Jill



-Original Message-
From: FARRINGTON, RYAN [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 1:28 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link


that requires some form of trust in the user... I experience too many stupid
people in what I do on a day to day basis and it is just easier if it forces
a download... 


typical user experience: I were a user and there was a link to a word
document that i wanted to edit. If I clicked on the link [and I had word
installed =)] it would open the file in my browser window and allow me to
edit it... but there is not toolbar for saving.. where are all my formatting
tools... oh no I've gotta call the person that put the link out because I
can't figure out what to do... help me ... BLAH!!! I hate people like that
so I force the download and they edit it locally and use the same page to
re-upload it.. it is just easier =)



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 3:51 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Force a user to download a text file from a link



Far be it from me to question the wisdom of tweaking the headers, but why do
you need them at all?
Why can't you just do:

a href =filename.txtclick here/a

which, so far as I can see, will load said text page into the user's browser
window as soon as they click on the link. If the user then wants to save it,
they can use the browser's Save As function.

Too easy?

Jill

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




RE: [PHP-WIN] user selectionz ?????

2003-02-21 Thread Jill . Ramonsky

The good news is it's possible. The bad news is that it's not possible using
PHP alone.
You can't do client-side stuff with a server-side script.
You need to write that bit in Javascript, I'm afraid, so the code can run on
the user's browser.

Jill



-Original Message-
From: toby z [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 21, 2003 8:02 AM
To: php hlp list
Subject: [PHP-WIN] user selectionz ?


hi guyz

im making this report generation form which 
lets the user select a category out of 8 through a dropdown list
then the user has to select a few more thinggs
only then the report can be generated

now my problem is
each of the 8 categories has 3 to 5 sub-categories
what i want to do is when he selects a category the sub-cat-dropdown
should get the sub-cats of ONLY the category selected

n i have no clue how to go about this decently
that is without having to re-load the page when category is selected


suggesstion  solutions pleeez

thnx a million

toby .



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




[PHP-WIN] Problem with extensions in PHP4.3.1

2003-02-21 Thread Christian Bartsch
Hi folks,

we just upgraded to the newest PHP from 4.3.0. I´m a little bit surprised
because of the manual saying that this should be a security fix only.
Unfortunately, serveral extensions fail to work.

PHP 4.3.1 is running with IIS5.0 (no comments on that please). Runing as a
CGI. with version 4.3.0 everything was fine. After the upgrade extensions
CURL and MSSQL fail to work. The failure is that no page is returned, the
process is then stopped after 300 seconds by IIS with a timeout error.

The ini points to

extension_dir = c:\php\extensions\

where the extensions reside. Moving the faulty extensions to then system32
dir does not help either.

Am I doing anything wrong?!

Regards,
Chris



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




RE: [PHP-WIN] Re: Authenticate user

2003-02-21 Thread Rich Gray
Rui

You will have to check a session attribute at the start of each of your
scripts that you want to protect to ensure that the user has logged on.
Locking out other users whilst this user is logged on will mean flipping
some flag in a database table or creating a row that tells your login script
that someone is altready logged on. Problem is that this row will have to
get cleared after a certain timeout else noone will be able to logon again
even though the original user has gone away. The errors you are getting are
because you are sending http headers - session.start() sends an http header
as a session cookie and obviously header() as well - you cannot send http
headers once html output to the browser has started so check that these
functions are called first... you can use output buffering if this poses a
logical problem for your scripts.

pseudo code
?
// Protected script
// Assume db is connected already
session.start();
if (!isset($_SESSION['logged_on'])) {
$rs = mydb_query('select 1 from user_already_logged_in');
$in = (mydb_num_rows($rs) == 1);
header('Location: http://mysite.com/'.($in ? 'sorry.php' : 'login.php'));
exit();
}
// User is logged in ...
.
.
?
/pseudo code

HTH
Rich

 -Original Message-
 From: Rui [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2003 11:24
 To: [EMAIL PROTECTED]
 Subject: [PHP-WIN] Re: Authenticate user


 I'm really new at this authentification thing...

 What I want do to:

 1- a user appears
 2- he fills a form (easy)
 3- gain access to the page (?)
 4- no one else can log-on until the user who is logged quits (very
 important) ()
 5- inside the user can surf in diferent php files without being asked for
 new athentification ()

 ---

 3 - Trying to authentificate user the warnings bellow appear:
   Warning: Cannot send session cache limiter - headers
 already sent
   Warning: Cannot add header information - headers already
 sent by (

Line of the first Warning:

 // Main --
  session_start();

Line of second warning:

 // Relocate back to the login page
 header(Location: index.php);


 5- How can a user surf in diferent pages with the same loggin?


 Thanks

 Rui Monteiro



 Rui [EMAIL PROTECTED] escreveu na mensagem
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I'm trying to make a page that requires an authentification by the user.
 
  A lot of problems appear when I run a script copied from the O'Reilly :
 Web
  Database Applications.
 
  One of them is the function :clean: that doesn't exist,
 according with the
  php compiler:
 
session_start();
 
$authenticated = false;
 
// Clean the data collected from the user
$appUsername =
  clean($HTTP_POST_VARS[formUsername], 10);
$appPassword =
  clean($HTTP_POST_VARS[formPassword], 15);
 
  Can someone tell me what is the prob? Where can I get
 information for this
  kind of script?
 
  Thanks.
 
 



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





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




RE: [PHP-WIN] Problem with extensions in PHP4.3.1

2003-02-21 Thread Russell Johnson
I had a similar problem installing PHP 4.3.1. There appear to be more than a
few php libraries that Windows has problems finding. What I did was the
following:

In php.ini, I set the extension_dir to nothing:

extension_dir =

Then I moved most everying in the dlls and extension directories of the php
distribution into \windows\system32 (at least the ones I needed).

It worked for me, so good luck

- Russ



-Mensaje original-
De: Christian Bartsch [mailto:[EMAIL PROTECTED]]
Enviado el: Friday, February 21, 2003 4:07 PM
Para: [EMAIL PROTECTED]
Asunto: [PHP-WIN] Problem with extensions in PHP4.3.1


Hi folks,

we just upgraded to the newest PHP from 4.3.0. I?m a little bit surprised
because of the manual saying that this should be a security fix only.
Unfortunately, serveral extensions fail to work.

PHP 4.3.1 is running with IIS5.0 (no comments on that please). Runing as a
CGI. with version 4.3.0 everything was fine. After the upgrade extensions
CURL and MSSQL fail to work. The failure is that no page is returned, the
process is then stopped after 300 seconds by IIS with a timeout error.

The ini points to

extension_dir = c:\php\extensions\

where the extensions reside. Moving the faulty extensions to then system32
dir does not help either.

Am I doing anything wrong?!

Regards,
Chris



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



php-windows Digest 21 Feb 2003 17:15:34 -0000 Issue 1599

2003-02-21 Thread php-windows-digest-help

php-windows Digest 21 Feb 2003 17:15:34 - Issue 1599

Topics (messages 18646 through 18657):

Re: Authenticate user
18646 by: toby z
18651 by: Rui
18656 by: Rich Gray

Re: PHP HTTP Authentication, Win2k  IIS
18647 by: Juraj Hasko

user selectionz ?
18648 by: toby z
18654 by: Jill.Ramonsky.Aculab.com

Re: Writing in txt file...
18649 by: Radovan Radic

Re: Force a user to download a text file from a link
18650 by: Jill.Ramonsky.Aculab.com
18652 by: FARRINGTON, RYAN
18653 by: Jill.Ramonsky.Aculab.com

Problem with extensions in PHP4.3.1
18655 by: Christian Bartsch
18657 by: Russell Johnson

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]


--

---BeginMessage---
hi rui

1st of all y do u want to clean up user data collected 
:S

2nd if u only want to authentify a user (logged into ur system/site) 
try this :

// session check ! ! ! ! 

session_start();
if(!session_is_registered(name-of-session-u-registered-for-user ))
{
   header(Location: /root/error-file-name.php);
   exit();
}
  

hope i ve helped

good luck

toby ..






--- Rui [EMAIL PROTECTED] wrote:  I'm trying to make a page
that requires an authentification by the
 user.
 
 A lot of problems appear when I run a script copied from the
 O'Reilly : Web
 Database Applications.
 
 One of them is the function :clean: that doesn't exist, according
 with the
 php compiler:
 
   session_start();
 
   $authenticated = false;
 
   // Clean the data collected from the user
   $appUsername =
 clean($HTTP_POST_VARS[formUsername], 10);
   $appPassword =
 clean($HTTP_POST_VARS[formPassword], 15);
 
 Can someone tell me what is the prob? Where can I get information
 for this
 kind of script?
 
 Thanks.
 
 
 
 -- 
 PHP Windows Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
  

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

---End Message---
---BeginMessage---
I'm really new at this authentification thing...

What I want do to:

1- a user appears
2- he fills a form (easy)
3- gain access to the page (?)
4- no one else can log-on until the user who is logged quits (very
important) ()
5- inside the user can surf in diferent php files without being asked for
new athentification ()

---

3 - Trying to authentificate user the warnings bellow appear:
  Warning: Cannot send session cache limiter - headers
already sent
  Warning: Cannot add header information - headers already
sent by (

   Line of the first Warning:

// Main --
 session_start();

   Line of second warning:

// Relocate back to the login page
header(Location: index.php);


5- How can a user surf in diferent pages with the same loggin?


Thanks

Rui Monteiro



Rui [EMAIL PROTECTED] escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm trying to make a page that requires an authentification by the user.

 A lot of problems appear when I run a script copied from the O'Reilly :
Web
 Database Applications.

 One of them is the function :clean: that doesn't exist, according with the
 php compiler:

   session_start();

   $authenticated = false;

   // Clean the data collected from the user
   $appUsername =
 clean($HTTP_POST_VARS[formUsername], 10);
   $appPassword =
 clean($HTTP_POST_VARS[formPassword], 15);

 Can someone tell me what is the prob? Where can I get information for this
 kind of script?

 Thanks.





---End Message---
---BeginMessage---
Rui

You will have to check a session attribute at the start of each of your
scripts that you want to protect to ensure that the user has logged on.
Locking out other users whilst this user is logged on will mean flipping
some flag in a database table or creating a row that tells your login script
that someone is altready logged on. Problem is that this row will have to
get cleared after a certain timeout else noone will be able to logon again
even though the original user has gone away. The errors you are getting are
because you are sending http headers - session.start() sends an http header
as a session cookie and obviously header() as well - you cannot send http
headers once html output to the browser has started so check that these
functions are called first... you can use output buffering if this poses a
logical problem for your scripts.

pseudo code
?
// Protected script
// Assume db is connected already
session.start();

[PHP-WIN] index.php

2003-02-21 Thread Bill Rafferty
My index.php simply has ;
?php phpinfo(); ?

if in my broser I go to;
http://localhost/ra640/everything works fine, but
http://localhost/ra640/index.php which is the same file returns a error 500

??? what am I missing



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



[PHP-WIN] IIS and index.php issue

2003-02-21 Thread Bill Rafferty
My index.php simply has ;
?php phpinfo(); ?

if in my broser I go to;
http://localhost/ra640/everything works fine, but
http://localhost/ra640/index.php which is the same file returns a error 500

??? what am I missing



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



RE: [PHP-WIN] IIS and index.php issue

2003-02-21 Thread Charles P. Killmer
I know this sounds simple but make sure that index.php is the document
that is being served.  

Either remove all other files from the web root.  Or remove all other
documents from the default documents tab in IIS.  Also make sure that
the webroot is in the right place.

Also make sure that a script mapping exists for .php

I cant think of anything else that could cause something like that.

Charles

-Original Message-
From: Bill Rafferty [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 21, 2003 11:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] IIS and index.php issue

My index.php simply has ;
?php phpinfo(); ?

if in my broser I go to;
http://localhost/ra640/everything works fine, but
http://localhost/ra640/index.php which is the same file returns a error
500

??? what am I missing



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


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



RE: [PHP-WIN] IIS and index.php issue

2003-02-21 Thread Matt Hillebrand
Oh, you're right. My advice doesn't appy to your problem. Sorry. I just
woke up.

Matt

|-Original Message-
|From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
|Sent: Friday, February 21, 2003 11:55 AM
|To: [EMAIL PROTECTED]
|Subject: RE: [PHP-WIN] IIS and index.php issue
|
|
|I know this sounds simple but make sure that index.php is the 
|document that is being served.  
|
|Either remove all other files from the web root.  Or remove 
|all other documents from the default documents tab in IIS.  
|Also make sure that the webroot is in the right place.
|
|Also make sure that a script mapping exists for .php
|
|I cant think of anything else that could cause something like that.
|
|Charles
|
|-Original Message-
|From: Bill Rafferty [mailto:[EMAIL PROTECTED] 
|Sent: Friday, February 21, 2003 11:36 AM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] IIS and index.php issue
|
|My index.php simply has ;
|?php phpinfo(); ?
|
|if in my broser I go to;
|http://localhost/ra640/everything works fine, but
|http://localhost/ra640/index.php which is the same file 
|returns a error 500
|
|??? what am I missing
|
|
|
|-- 
|PHP Windows Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|-- 
|PHP Windows Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|



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



[PHP-WIN] why is this mail code not working on a windows server?

2003-02-21 Thread cathy
Hi,
I'm getting rather desperate about this one.

Code below is working fine on one server: Apache 1.3.26 /PHP 4.1.2/Linux.
On another server (Apache 1.3.24/PHP 4.3.1/Windows 2000) I get keeping this
error:

Failed to connect to mailserver at smtp.vt4.net port 25, verify your
SMTP and smtp_port setting in php.ini or use ini_set() in
c:\oracle\ora91\apache\apache\htdocs\templateprobeersel\tmp47v15anqr5.php on
line 16

CODE:

$headers.=From:[EMAIL PROTECTED];
ini_set(SMTP, smtp.vt4.net);
ini_set(sendmail_from,[EMAIL PROTECTED]);

mail([EMAIL PROTECTED], test php, Line 1,$headers);

Can anyone help me?
Thx,
Cathy



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



[PHP-WIN] problema con una libreria

2003-02-21 Thread Frank
Hola a todos
tengo problemas con la libreria php_oci8.dll, a partir de la versión 4.0.6 de php en 
adelante cuando cargo el modulo mediante el archivo php.ini ya sea por CGI o por 
ISAPI, me envia un error de Unload module oci8.
yo trabajo con window nt, alguien tiene información del porque sucede y como poder 
solucionarlo?

por vuestra atención
gracias.
Frank.-


[PHP-WIN] fsockopen() doesnt work

2003-02-21 Thread Arne Schumann
Hi

Ive got a problem with the fsockopen function. I want to simulate things
like Browser-Version (user_agent) to another php-Script and read its parsed
ScourceCode. Everything I read about that used fsockopen() as the main
function to access the file. So I tried this:


$fp = fsockopen (http://www.homepage.de;, 80);


Also with /index.html in the end and with many different URLs.
This way I always get the following two errors:


Warning: fsockopen() [function.fsockopen]: php_network_getaddresses:
gethostbyname failed in D:\Programme\Apache2\htdocs\eigene\test\read.php on
line 3

Warning: fsockopen() [function.fsockopen]: unable to connect to
http://www.homepage.de:80 in
D:\Programme\Apache2\htdocs\eigene\test\read.php on line 3
$fp does not exist!


Ive already been told to leave out the http://. But in that case i got:


Fatal error: Maximum execution time of 30 seconds exceeded in
D:\Programme\Apache2\htdocs\eigene\test\read.php on line 12


Which makes me wondering,  because line 12 is the end of the script and not
the one with the fsockopen function...
My first thought was that I get timeouted, because i dont have any further
issues for the opened coonnection but the whole script is:


?php
$fp = fsockopen (http://www.homepage.de;, 80);
if(!$fp) {
 echo \$fp does not exist!;
 }
else {
 fgets($fp, 1024);
 }
?


Now I do have an fgets-statement to recieve sth from the server. And still
he gets timeouted.

So why does this happen?! And what can I do against it?!
OS is: Win 98SE
PHP: 4.3.0
Apache: 2.0.43

allow_url_fopen in the php.ini is activated...

Thx for help


Re: [PHP-WIN] fsockopen() doesnt work

2003-02-21 Thread Dash McElroy
It looks like the host cannot be resolved. Can you do a DNS query from
that machine successfully?

-Dash

Cogito cogito ergo cogito sum --
I think that I think, therefore I think that I am.
-- Ambrose Bierce, The Devil's Dictionary

On Fri, 21 Feb 2003, Arne Schumann wrote:

 Hi

 Ive got a problem with the fsockopen function. I want to simulate things
 like Browser-Version (user_agent) to another php-Script and read its parsed
 ScourceCode. Everything I read about that used fsockopen() as the main
 function to access the file. So I tried this:


 $fp = fsockopen (http://www.homepage.de;, 80);


 Also with /index.html in the end and with many different URLs.
 This way I always get the following two errors:


 Warning: fsockopen() [function.fsockopen]: php_network_getaddresses:
 gethostbyname failed in D:\Programme\Apache2\htdocs\eigene\test\read.php on
 line 3

 Warning: fsockopen() [function.fsockopen]: unable to connect to
 http://www.homepage.de:80 in
 D:\Programme\Apache2\htdocs\eigene\test\read.php on line 3
 $fp does not exist!


 Ive already been told to leave out the http://. But in that case i got:


 Fatal error: Maximum execution time of 30 seconds exceeded in
 D:\Programme\Apache2\htdocs\eigene\test\read.php on line 12


 Which makes me wondering,  because line 12 is the end of the script and not
 the one with the fsockopen function...
 My first thought was that I get timeouted, because i dont have any further
 issues for the opened coonnection but the whole script is:


 ?php
 $fp = fsockopen (http://www.homepage.de;, 80);
 if(!$fp) {
  echo \$fp does not exist!;
  }
 else {
  fgets($fp, 1024);
  }
 ?


 Now I do have an fgets-statement to recieve sth from the server. And still
 he gets timeouted.

 So why does this happen?! And what can I do against it?!
 OS is: Win 98SE
 PHP: 4.3.0
 Apache: 2.0.43

 allow_url_fopen in the php.ini is activated...

 Thx for help



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



[PHP-WIN] using frames

2003-02-21 Thread Andrew Ferguson
I want to build a website with frames and have PHP call up the data from a
mySQL database. However, I also want the title to change every you click a
different link in the frame. Any ideas?



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



RE: [PHP-WIN] using frames

2003-02-21 Thread Matt Hillebrand
This is a client-side programming issue, so you would use JavaScript and
not PHP. I guess you could do something like:

  a href=blah.php onClick=parent.document.title='The Blah
Page'blah/a

It can be fun/challenging to dynamically create javascript code with
PHP. I sometimes like to use borderless iframes (not frames). That way
the client-side javascript code can interact with a server-side PHP
script in order to change the content on the screen without changing the
location of the web browser (and without the appearance of frames).

Matt

|-Original Message-
|From: Andrew Ferguson [mailto:[EMAIL PROTECTED] 
|Sent: Friday, February 21, 2003 7:31 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] using frames
|
|
|I want to build a website with frames and have PHP call up the 
|data from a mySQL database. However, I also want the title to 
|change every you click a different link in the frame. Any ideas?
|
|
|
|-- 
|PHP Windows Mailing List (http://www.php.net/)
|To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|



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