473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

including file that resides on server that requires authentication

I am trying to include html file that resides on other server than the
main .php file (landing.php), while this server requires user
name-password authentication. I tried 2 options while trying:
<?
if ($page=="24") {
include ("http://10.11.0.251/support/index.html");
}
else {
include ("http://10.11.0.251/support/faq.html");
}
?>

replies me, in the place where the included content suppose to be, the
warnings:

Warning: main(http://10.11.0.251/support/faq.html): failed to open
stream: HTTP request failed! HTTP/1.1 401 Authorization Required in
/www/landing.php on line 242

Warning: main(): Failed opening 'http://10.11.0.251/support/faq.html'
for inclusion (include_path='.:/home/httpd:/usr/share/php') in
/www/landing.php on line 242

and when trying the following:

<?
if ($page=="24") {
@include("http://10.11.0.251/suppport/csb.html");
}
else {
@include("http://10.11.0.251/suppport/csb.html");
}
?>

it replies nothing just like ignore the inclusion, the rest of the
page is diplayed OK, while in the place where the included content
suppose to be - it is empty.

summarizing, non of the ways works.
can someone please help me: what is the right way for including pages
from remote protected server?

Thanks a lot
Jul 17 '05 #1
1 1655
While the city slept, Orit <Or*********@atrica.com> feverishly typed:
I am trying to include html file that resides on other server than the
main .php file (landing.php), while this server requires user
name-password authentication. I tried 2 options while trying:


Just guessing, but could you put the username and password into the uri as
in: http://username:pa******@www.whateve...e/whatever.php ?

Like I say, just guessing...

Hope that helps,
Nige

--
Nigel Moss.

Email address is not valid. ni***@nigenetDOG.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
In the land of the blind, the one-eyed man is very, very busy!
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Dave Smithz | last post by:
Hi There, I have taken over someone else's PHP code and am quite new to PHP. I made some changes and have implemented them to a live environment fine so far. However, I now want to setup a...
0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
2
by: Brian Madsen | last post by:
Hey guys, I am currently working on a remote file upload utility from an external server to a local server. Problems I face is: 1)the request server cannot be mapped - ie. i can't secure it...
3
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us” page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email...
4
by: Ravikanth[MVP] | last post by:
Hi It is possible that IIS and SQL Server can reside on Seperate Machines and you can use Integrated Windows Authentication to connect. Ravikanth >-----Original Message-----
1
by: Volker Jobst | last post by:
Hi, The following code works fine as long as I don't use a smtp-server which requires authentication: Sub sendMail() Dim sfrom As String = TextBox1.Text Dim sto As String = TextBox2.Text...
3
by: Wild Wind | last post by:
Hello all, I apologise in advance for the long windedness of this post, but I feel that if I am going to get any solution to this problem, it is important that I present as much information...
1
by: Coder | last post by:
If outgoing server requires authentication, How can I use smtpmail object in c# ? I use a windows 2003 server hosting packet somewhere... string from = "register@xxx.com"; string to =...
1
by: Mrozik | last post by:
Hi! I have Web Application with forms authentication. Data and security model resides in Oracle database. I have 'login' page with MS 'Login' control. In my LoggingIn event for debug purposes I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.