473,782 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTTP request failed! HTTP/1.0 400

67 New Member
Hi,
Ehen i use file_get_conten ts functions or fopen to access a webpage on the net. i get the folowing error


Warning: file_get_conten ts(http://ndtv.com) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Invalid header received from browser

This is the same error with fopen too. But if i access the local files it works good,

Help Needed to access the rempte file....

Looking forward for reply..

Thanks in advance
Sep 18 '07 #1
3 4512
newlearner
67 New Member
Hi,
Ehen i use file_get_conten ts functions or fopen to access a webpage on the net. i get the folowing error


Warning: file_get_conten ts(http://ndtv.com) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Invalid header received from browser

This is the same error with fopen too. But if i access the local files it works good,

Help Needed to access the rempte file....

Looking forward for reply..

Thanks in advance


im totally Stumped Pls Some body Hlp Me out!!

I Dont no Where im Wrong!
Sep 19 '07 #2
kovik
1,044 Recognized Expert Top Contributor
You are getting a 400 response.

Expand|Select|Wrap|Line Numbers
  1. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
Have you tried adding a "www" to the URL?
Sep 19 '07 #3
newlearner
67 New Member
You are getting a 400 response.

Expand|Select|Wrap|Line Numbers
  1. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
Have you tried adding a "www" to the URL?
Yes
my code is


$url = 'http://www.bbc.com';
$page = file_get_conten ts($url);
echo "Type of ".gettype($page );
Sep 20 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4182
by: Kenneth McDonald | last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make regular expressions easier to create and use (and in my experience as a regular expression user, it makes them MUCH easier to create and use.) I'm still working on formal documentation, and in any case, such documentation isn't necessarily the...
0
1453
by: matt | last post by:
Hi There we have a new asp.net site that is getting a lot of hits. I have set this up on its own server with its own database server. We have a search system built into the site which is timing out (there are thousands of pages to full text search) I have got several of the following event logs which may be attributed to doing a search which times out EVENT ID 1090 SOURCE: ASP.NET 1.1.4322. Failed to execute request because...
0
4563
by: Armin Braunstein | last post by:
Hi! I have a curious problem in my C# ASP .Net application (Visual Studio 2002, .Net Framework 1.0 SP3 (previously SP2 with the same error - following), Crystal Reports (shipped with Visual Studio)). In my page there is an ASP ImageButton. If i click on that a crystal report will be generated and written into a PDF file. After generating this button the Button clicked will be set' to invisible. Sometimes (every about 50 to 500 report...
2
4103
by: RobertHillEDS | last post by:
While using the Soap generated ASP code, I would like to dump the raw contents of the request and response objects using Response.AppendToLog. I have tried using variations of the following code, but I may be barking up the wrong tree with this approach. Any expert help would greatly be appreciated. Dim objReader Set objReader = CreateObject("MSSOAP.SoapReader") objReader.Load Request
5
5625
by: Janning Vygen | last post by:
Hi, tonight my database got corruppted. before it worked fine. since two days i do the following tasks every night psql -c 'CLUSTER;' $DBNAME psql -c 'VACUUM FULL ANALYZE;' $DBNAME before these opertaions i stop all web access. The last months i only did a
1
2861
by: Tom Purdom | last post by:
Hi All, I am developing a Outlook interop plugin which performs task time allocation. However when i attempt to fire my custom event to notify that an allocation has been generated the security exception "Request Failed" is thrown. The events sole subscriber is the main class of the interop plugin. Anyone experienced this problem in the past? Or can you give me more information about this type of security exception. I have read about...
2
20847
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. Security Exception Description: The application attempted to perform an operation not
149
4312
by: jacob navia | last post by:
As a consequence of a heavy discussion in another thread, I wrote this program: #include <stdlib.h> int main(void) { char *p=calloc(65521,65552); if (p) printf("BUG!!!!\n"); }
3
12061
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (machine.config) ---> System.Security.SecurityException: Request for the permission of type
5
6135
by: chromis | last post by:
Hi there, I've recently been updating a site to use locking on application level variables, and I am trying to use a commonly used method which copies the application struct into the request scope. Application variables are then accessed in this manner Request.App.<Var>. To begin with I had a simple functioning login system inside a subdirectory named admin, this subdirectory had it's own application.cfm, I wasn't sure whether to duplicate...
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
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
10146
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...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8968
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
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
3
2875
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.