473,671 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file_get_conten ts failure

This may be a very easy question, and I may need to supply more
information, but basically trying to read a file at a URL with
file_get_conten ts() returns the error message:

[function.file-get-contents]: failed to open stream: HTTP request
failed! HTTP/1.0 403 Forbidden

Any help is appreciated & thanks in advance,
Mouseit

Jun 27 '07 #1
1 3344
On Jun 27, 3:11 pm, mouseit <mouseit...@gma il.comwrote:
This may be a very easy question, and I may need to supply more
information, but basically trying to read a file at a URL with
file_get_conten ts() returns the error message:

[function.file-get-contents]: failed to open stream: HTTP request
failed! HTTP/1.0 403 Forbidden

Any help is appreciated & thanks in advance,
Mouseit
The server from which you are requesting the data isn't allowing it.
Try putting the URL in your browser and see if you get the same
result. If so, find out from the person who operates the server why
your request is forbidden.

Jun 27 '07 #2

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

Similar topics

2
4211
by: Rob | last post by:
for some reason i keep getting : Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/rob/www/php/filegetcontents2.php on line 3 Warning: file_get_contents(http://folding.stanford.edu/teamstats/team92.txt): failed to open stream: Resource temporarily unavailable in /home/rob/www/php/filegetcontents2.php on line 3
3
2670
by: Csaba Gabor | last post by:
I've got a section of code that takes a user supplied $url and essentially does: function redirectRequest($url) { $resultRemote = @file_get_contents($url); return $resultRemote; } Is there a reasonable way to trap for and differentiate between the major (most common) types of failure? For example, common scenarios in which I would not get back a desired
1
5015
by: jjainschigg | last post by:
I'm running PHP 5 on a shared VPS. I have a couple little apps that are using file_get_contents() and readfile() for various kinds of (what should be) low-overhead, fast outbound accesses ... that is, I'm handing URLencoded arguments to a couple fast servers and grabbing small patches of XML in return. When I enter these URL+argument strings in a browser (with the caches turned off), I get effectively instant responses -- so the remote...
5
23020
by: howa | last post by:
are there any advantage in replacing all fread() operations with file_get_contents() ? i.e. file_get_contents("/usr/local/something.txt") VS $filename = "/usr/local/something.txt";
4
2731
by: Aetherweb | last post by:
This is probably really obvious, sorry, been a long day... I'm wanting to create a PHP file which is a template for an email, and read the file into a string, ready to send out using my email functions... but I want to be able to get the PHP file to be server processed so that its content is created on the fly. Eg in pseudo code, what I want to do is this: 1$email_param1 = "my email param 1";
9
20991
by: howa | last post by:
Target: To fetch a file using PHP and send to user Method 1: echo file_get_contents( $file_path ); Method 2: readfile( $file_path );
6
6946
by: Taras_96 | last post by:
Hi everyone, The output of echo file_get_contents("http://watchout4snakes.com/creativitytools/ RandomWord/RandomWordPlus.aspx"); leaves the browser empty.. no error messages, nothing. Why is this occurring?
0
4999
by: pac1250 | last post by:
Hi, I am searching how to solve a problem and I dont find it :( I want to access a page from a script behind a proxy : (my script) <-(a proxy with authentification) <-(https serveur with authentification) -----------------------------------------------------------------
6
3635
by: Pheddy | last post by:
Hey i tried this code to get the country and IP via PHP (from: http://roshanbh.com.np/2008/07/getting-country-city-name-from-ip-address-in-php.html) function countryCityFromIP($ipAddr) { //function to find country and city from IP address //Developed by Roshan Bhattarai http://roshanbh.com.np //verify the IP address for the ip2long($ipAddr)== -1 || ip2long($ipAddr) === false ? trigger_error("Invalid IP", E_USER_ERROR) : "";...
0
8476
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8914
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8820
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7433
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 project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2810
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.