Re: [PHP] Re: http request problem

2007-01-03 Thread Curt Zirzow

On 1/3/07, Roman Neuhauser [EMAIL PROTECTED] wrote:

# [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500:
 ===ORINGIAL===
[...]
 ===END ORIGINAL===

Gah, early morning! Ok, I wasted my time thanks to your quoting style.
Would you please use something more conventional, like prefixing each
line of the quoted material with  ? Thank you!


I had the same problem.



 I tried following code but it gives the same error

 $link=
 
http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
 ;

 $handle2= fopen($link,r);

...


Seriosly: does that mean that your original question is answered, or do
you still expect advice on getting it to work? I really can't tell,
there's neither a question nor a solved statement in your email.


It all is in Kencana's (the original author) shoes right now  i dont
know what to advise other than what has been provided to figure out
such an odd error.

Curt

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



Re: [PHP] Re: http request problem

2007-01-03 Thread Kencana

Hi all,

first of all, sorry for all the trouble i have caused.
i didnt give a clear explanation
and for your information that I am not the author of the requested jsp file.
however i did try to access other jsp file from the same server,
it didn't give me any error.
so i guess i have to ask the author about this issue.
and once again
I am really sorry for the trouble

Regards,
Kencana


Roman Neuhauser wrote:
 
 # [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500:
 ===ORINGIAL===
 hi all,
 
 I got problem in getting file content. the file is located at another
 server
 (tomcat) and it is a jsp file.
 i don't know why i keep getting the same error message file accessing
 that
 file but
 while i am trying to access to another file, from another server it run
 perfect.
 this is the error message i get:
 PHP Warning:
 file_get_contents(
 http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
 )
 [function.file-get-contents]: failed to open stream: HTTP request failed!
 $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart
 on,Turn sharp left onto,Continue on,Turn right onto in C:\Program
 Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php
 on line 5
 
 take note that the text in bold is part of the page contents.
 
 The text/plain version of your multipart/mixed email omits terminal
 escape sequences (tags) so there's no bold. But that error message
 is somehow garbled anyway.
 
 Now, what happens if you try to display that same url in a normal
 browser on the same network where it fails in the PHP script? If it
 works, what's the difference between the two requests? Use a packet
 capture and analysis tool like Wireshark (formerly Ethereal) to tell.
 If it doesn't work, fix that first. If it works from a normal browser,
 you can't see anything wrong with the request made by PHP, *and* you
 know your requests actually hit the server, ask its admin to cooperate.
 
 -- 
 How many Vietnam vets does it take to screw in a light bulb?
 You don't know, man.  You don't KNOW.
 Cause you weren't THERE. http://bash.org/?255991
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/http-request-problem-tf2911952.html#a8137855
Sent from the PHP - General mailing list archive at Nabble.com.

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



[PHP] Re: http request problem

2007-01-02 Thread Fahad Pervaiz

===ORINGIAL===
hi all,

I got problem in getting file content. the file is located at another server
(tomcat) and it is a jsp file.
i don't know why i keep getting the same error message file accessing that
file but
while i am trying to access to another file, from another server it run
perfect.
this is the error message i get:
PHP Warning:
file_get_contents(
http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
)
[function.file-get-contents]: failed to open stream: HTTP request failed!
$5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart
on,Turn sharp left onto,Continue on,Turn right onto in C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php
on line 5

take note that the text in bold is part of the page contents.
i don't understand why i cant get the whole content and keep getting this
error.
I hope somebody can help me out.

Thank you

Regards,
Kencana
===END ORIGINAL===

I tried following code but it gives the same error

$link=
http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
;

$handle2= fopen($link,r);

  $contents = '';
  while (!feof($handle2)) {
$contents = fread($handle, 819200);
echo $contents;
  }

I tried opening the given URL directly, but this url seems to be a broken
link. If you try any other link, it will work

--
Regards
Fahad Pervaiz
www.ecommerce-xperts.com
(Shopping Cart, Web Design, SEO)


Re: [PHP] Re: http request problem

2007-01-02 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500:
 ===ORINGIAL===
 hi all,
 
 I got problem in getting file content. the file is located at another server
 (tomcat) and it is a jsp file.
 i don't know why i keep getting the same error message file accessing that
 file but
 while i am trying to access to another file, from another server it run
 perfect.
 this is the error message i get:
 PHP Warning:
 file_get_contents(
 http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
 )
 [function.file-get-contents]: failed to open stream: HTTP request failed!
 $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart
 on,Turn sharp left onto,Continue on,Turn right onto in C:\Program
 Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php
 on line 5
 
 take note that the text in bold is part of the page contents.

The text/plain version of your multipart/mixed email omits terminal
escape sequences (tags) so there's no bold. But that error message
is somehow garbled anyway.

Now, what happens if you try to display that same url in a normal
browser on the same network where it fails in the PHP script? If it
works, what's the difference between the two requests? Use a packet
capture and analysis tool like Wireshark (formerly Ethereal) to tell.
If it doesn't work, fix that first. If it works from a normal browser,
you can't see anything wrong with the request made by PHP, *and* you
know your requests actually hit the server, ask its admin to cooperate.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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



Re: [PHP] Re: http request problem

2007-01-02 Thread Curt Zirzow

On 1/2/07, Fahad Pervaiz [EMAIL PROTECTED] wrote:

this is the error message i get:
PHP Warning:
file_get_contents(
http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
)
[function.file-get-contents]: failed to open stream: HTTP request failed!
$5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart
on,Turn sharp left onto,Continue on,Turn right onto in C:\Program
Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php
on line 5

===END ORIGINAL===

I tried following code but it gives the same error


Same error?



$link=
http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
;

$handle2= fopen($link,r);

   $contents = '';
   while (!feof($handle2)) {


I get invalid handle with this code right at the above line.

And...
telnet 123.123.1.2 8008; never responds

if $link doesn't have carriage returns or line feeds, it waits for a
long time and repeats about an invalid handle as well.


I tried opening the given URL directly, but this url seems to be a broken
link. If you try any other link, it will work


i'm suspect at the actual ip used, the ip in question seems odd.


Curt

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



Re: [PHP] Re: http request problem

2007-01-02 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500:
 ===ORINGIAL===
[...]
 ===END ORIGINAL===

Gah, early morning! Ok, I wasted my time thanks to your quoting style.
Would you please use something more conventional, like prefixing each
line of the quoted material with  ? Thank you!
 
 I tried following code but it gives the same error
 
 $link=
 http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
 ;
 
 $handle2= fopen($link,r);
 
   $contents = '';
   while (!feof($handle2)) {
 $contents = fread($handle, 819200);
 echo $contents;
   }
 
 I tried opening the given URL directly, but this url seems to be a broken
 link. If you try any other link, it will work

Thank you for the information.

Seriosly: does that mean that your original question is answered, or do
you still expect advice on getting it to work? I really can't tell,
there's neither a question nor a solved statement in your email.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
---BeginMessage---
# [EMAIL PROTECTED] / 2007-01-03 11:19:21 +0500:
 ===ORINGIAL===
 hi all,
 
 I got problem in getting file content. the file is located at another server
 (tomcat) and it is a jsp file.
 i don't know why i keep getting the same error message file accessing that
 file but
 while i am trying to access to another file, from another server it run
 perfect.
 this is the error message i get:
 PHP Warning:
 file_get_contents(
 http://123.123.1.2:8008/V3JRoute?slot=1startX=103.880764startY=1.335458endX=103.886297endY=1.334953routeType=1format=2
 )
 [function.file-get-contents]: failed to open stream: HTTP request failed!
 $5$13:53:22,13:53:22,13:53:22,13:53:22,13:53:22$0.0,0.0,0.0,0.0,0.0$Depart
 on,Turn sharp left onto,Continue on,Turn right onto in C:\Program
 Files\MapGuideOpenSource\WebServerExtensions\www\phpviewersample\xmlaccesstrial.php
 on line 5
 
 take note that the text in bold is part of the page contents.

The text/plain version of your multipart/mixed email omits terminal
escape sequences (tags) so there's no bold. But that error message
is somehow garbled anyway.

Now, what happens if you try to display that same url in a normal
browser on the same network where it fails in the PHP script? If it
works, what's the difference between the two requests? Use a packet
capture and analysis tool like Wireshark (formerly Ethereal) to tell.
If it doesn't work, fix that first. If it works from a normal browser,
you can't see anything wrong with the request made by PHP, *and* you
know your requests actually hit the server, ask its admin to cooperate.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

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


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

[PHP] Re: http request using fsockopen

2004-10-25 Thread Manuel Lemos
Hello,
On 10/25/2004 09:46 AM, Rob wrote:
I have a form on page A which is submitted trough a POST method to page B.
On the start of page B I check var $foo. If true I want to forward the 
request to
page C. Sending the POST data also though the POST method.

I manually create a HTTP request to page C and use the fsockopen method to 
sent the request.

As a result I get the requested page C (status code 200 OK is returned) 
but the
POST data is not received/parsed(?). I mean the $_POST array is empty in 
page C. All other PHP scripts in page C is executed as expected though.

My questions:
1 Is what I am doing possible in the first place?
Sure.

2 If so, what is the correct syntax to sent the
  POST data ($query) in the entity body of the request?
It is hard to tell but you may not be sending the request data correctly.
You may want to try this HTTP client class that you can be sure that it 
can compose and send your POST requests properly.

http://www.phpclasses.org/httpclient
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread DvDmanDT
And once again, someone didn't search the archives before posting like you
are told to do on the mailing list page (this question is answered several
times daily)..

The bug is called register_globals being on on you production server and off
onn you development server.. Learn not to use register globals.. Use
$_GET['param'] instead... I'll quote myself:

The reason is the register_globals defaults to off last years or so, which
it says in the FAQ and in the manual, as well as in the mailing list
archives, which
you must have ignored even though it's a notice saying 'Check the archives
before posting a question, chances are it has already been asked and
answered a few times.' This question has been answered just about a million
times before..

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Slava Zinkovski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Hi, everybody!

 I've just installed PHP on my workstation and it seems as I have some
 trouble. The simplest code does not work! Here it is:

 ?
 print_r($HTTP_GET_VARS);
 print(param =  . $param);
 ?

 I run it with URL like this http://localhost/myApp/test.php?param=qqq:
 I expect it to print 'param=qqq' string, though it does not! :(((
 Here is the output:

  Array ( [param] = qqq )
  Notice: Undefined variable: param in d:\phptest\test.php on line 4
  param =

 Though, the script produces expected output when uploaded to a
 production server.

 Where is the bug? Any ideas are greatly appreciated.

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



[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread Slava Zinkovski
Many thanks, man. You are very helpful!
I did try searching this news group. Nothing found.
Will try to do my best next time to not upset you.
Anyway, thanks for help.
Dvdmandt wrote:
And once again, someone didn't search the archives before posting like you
are told to do on the mailing list page (this question is answered several
times daily)..
The bug is called register_globals being on on you production server and off
onn you development server.. Learn not to use register globals.. Use
$_GET['param'] instead... I'll quote myself:
The reason is the register_globals defaults to off last years or so, which
it says in the FAQ and in the manual, as well as in the mailing list
archives, which
you must have ignored even though it's a notice saying 'Check the archives
before posting a question, chances are it has already been asked and
answered a few times.' This question has been answered just about a million
times before..
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread DvDmanDT
lol, I'm not upset.. But follow this group a month and you'll understand..
I've been following 8 months or so... Just about everyone asks... Many ppl
on php.windows as well.. Ppl in forums.. I'm thinking about suggesting the
solution to this problem should be posted on the mailing-lists.php page.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Slava Zinkovski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 Many thanks, man. You are very helpful!
 I did try searching this news group. Nothing found.
 Will try to do my best next time to not upset you.
 Anyway, thanks for help.

 Dvdmandt wrote:
  And once again, someone didn't search the archives before posting like
you
  are told to do on the mailing list page (this question is answered
several
  times daily)..
 
  The bug is called register_globals being on on you production server and
off
  onn you development server.. Learn not to use register globals.. Use
  $_GET['param'] instead... I'll quote myself:
 
  The reason is the register_globals defaults to off last years or so,
which
  it says in the FAQ and in the manual, as well as in the mailing list
  archives, which
  you must have ignored even though it's a notice saying 'Check the
archives
  before posting a question, chances are it has already been asked and
  answered a few times.' This question has been answered just about a
million
  times before..
 

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



[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread Slava Zinkovski
I will follow, sure. The problem is that until last week i knew nothing 
about PHP (I used to practice java). And in a few weeks i have to be 
ready with a PHP application and possibly it should utilize fusebox 
framework. There are so many stuff to get to know in short time that 
sometimes it is easier just to ask than to search for something that you 
even don't know where to search, which terms to use.

Dvdmandt wrote:
lol, I'm not upset.. But follow this group a month and you'll understand..
I've been following 8 months or so... Just about everyone asks... Many ppl
on php.windows as well.. Ppl in forums.. I'm thinking about suggesting the
solution to this problem should be posted on the mailing-lists.php page.. :p
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread DvDmanDT
Yes, I know what you mean.. :)

If you use windows (or some other msn client), feel free to add me on MSN
and I'll be glad to help you out if you get problems.. :)

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Slava Zinkovski [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 I will follow, sure. The problem is that until last week i knew nothing
 about PHP (I used to practice java). And in a few weeks i have to be
 ready with a PHP application and possibly it should utilize fusebox
 framework. There are so many stuff to get to know in short time that
 sometimes it is easier just to ask than to search for something that you
 even don't know where to search, which terms to use.

 Dvdmandt wrote:
  lol, I'm not upset.. But follow this group a month and you'll
understand..
  I've been following 8 months or so... Just about everyone asks... Many
ppl
  on php.windows as well.. Ppl in forums.. I'm thinking about suggesting
the
  solution to this problem should be posted on the mailing-lists.php
page.. :p
 

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



[PHP] Re: HTTP request parameters do not populate variables

2004-02-01 Thread Slava Zinkovski
OK! Thanks!

Dvdmandt wrote:
Yes, I know what you mean.. :)

If you use windows (or some other msn client), feel free to add me on MSN
and I'll be glad to help you out if you get problems.. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Http request

2002-01-08 Thread David

 just use post to send your username/password to the servlet

Hi, 

Can anyone tellme how I can do a http request to a servlet from a PHP?? 

I mean, I have a username and password which I want to send in a string(variable) to 
a Servlet which authentifies it and responses back in XML format... 

any suggestions?? 

TIA, 
sandeep 

-- 
PHP General 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]




Re: [PHP] Re: Http request

2002-01-08 Thread Jon Farmer

 just use post to send your username/password to the servlet

 Hi,
 
 Can anyone tellme how I can do a http request to a servlet from a PHP??
 
 I mean, I have a username and password which I want to send in a
string(variable) to a Servlet which authentifies it and responses back in
XML format...
 
 any suggestions??


Well that would suffice if he just wanted to display the raw XML in the
broswer. However if he wanted to parse the XML he needs to open a socket on
port 80 or use a http class.

Regards


jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key



-- 
PHP General 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]