What's the easiest way in .NET to check what status code a web server replies with to a GET request?
Note that I do not need the body of the response. In fact, if possible, only the header should be requested. Having said that, however, if requesting that the body of the response be omitted significantly increases the complexity of the ...
How can I create a HTTP request that sends one file and some post data with JavaScript that can be received by a PHP server?
I have found the following suggestion but it does not seem to be complete
xhr.open("POST", "upload.php");
var boundary = '---------------------------';
boundary += Math.floor(Math.random()*32768);
boundary += Mat...
Hi,
I use .htaccess RewriteRules to pass the url to index.php. If the specified page name isn't found in the database, I want my script to throw proper 404 responses.
The way I have tried to achieve this is:
header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
Analysing the HTTP responses in my browser, the response comes back fi...
Hi,
I need to make a HTTP POST call to a Hudson CI server from CakePHP. The call is parametrized and contains a few key/value pairs. Some of those are in fact files which need to be uploaded.
Since I'm using CakePHP, I'd rather use the HttpSocket class which comes with the framework rather then try and write my own cURL based implement...
Hello,
I am setting up a CDN relying only on Header redirects or temporary URLs served by an API controlled by a Database cluster.
The Goal is to reduce hardware costs and have flexible nodes with only FTP/HTTP/PHP as requirement and create a cheap solution for websites that can work with this.
Howevery my Problem is that i want to hav...
I'm wondering about what headers are. I use PHP strictly for HTML completion and I thought I had to send text/html header when the output was text and then image/jpeg header from a separate script which was used as source in an image tag but then someone suggested me to take away the headers because they made nothing... And I did and eve...
Hi,
I've been trying to figure out how to do a HTTP authentication and then use the session to display pages in a webview in my android app. Could someone please provide som guidance (I would very much appretiate some sample code if possible).
I use Zend ACL on the server side.
Thanks in advance.
...
I have a client who is trying to determine traffic metrics, to his site by way of those "URL shortened" sites: (tinyurl.com, bit.ly and x.co) to be specific, and to take action based on that traffic...
We would have thought that the HTTP_REFERER variable would have held the referring resource name, the shortened URL from that service. ...
Hello,
I am ruining the following code:
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
echo "<p>You entered {$_...
I wand to develop http client in Java for college project which login to site, obtain data from HTML data, complete and send forms.
I don't know which http lib to use :
Apache HTTP client - don't create DOM model but work with http redirects, multi threading.
HTTPUnit - create DOM model and is easy to work with forms, fields, tables e...
Hi,
I use VB 6 but the POST request variables being sent escaped i mean it adds backslashes before quotes, is that normal? how to fix it?
Thanks
...
Hello all,
i've created an C++ application using WinSck, which has a small (handles just a few features which i need) http server implemented. This is used to communicate with the outside world using http requests. It works, but sometimes the requests are not handled correctly, because the parsing fails. Now i'm quite sure that the requ...
Meaning will it work fine? I have a situation where I am attaching files via HTTP attachment by attaching the URI of the file and it is on a different server so I don't have access to the length of the file.
...
here is the call...
return new FileUriResult("application/octet-stream", a.AssetPath, null);
[note that I set content length to null because I don't know it (file is on another server)]
a.AssetPath is: "http://http.cdnlayer.com/account name/folder/folder/folder/asset.mp3"
(fake URL for this example but in my implementation I can bro...
Warning: Non-static method Zend_Controller_Request_Http::getCookie() should not be called statically in..
Iam trying the following to get Cookie values:
$cookieData = Zend_Controller_Request_Http::getCookie($key, $default);
is there an better way to this?
...
Should I use initWithURL or NSRequest to download an XML file when using NSXMLParser?
I'm downloading a feed and I'd like to get progress information for my download.
...
I have this situation where we have media files stored on a global CDN. Our web app is hosted on it's own server and then when the media assets are needed they are called from the CDN url. Recently we had a page where the user can download file attachments, however some of the file types were opening in the browser instead of downloading...
I've been having some trouble with Windows Media Player on CE 5.0 downloading an entire multi-megabyte movie file from a web server into a temporary directory and running the device out of memory. Any idea how to force the player to play in streaming mode?
...
What well known C/C++ libraries are out there that could allow one to implement servlets, or at least provide most of the essentials for dealing with HTTP/CGI protocols such as http headers, error codes, cookies, GET/POST etc.
So far I have only found CPPSERV.
EDIT: Looking for server side solutions.
...
This may be a question for Server Exchange but I am starting to feel pretty cozy here and I feel like someone here will definitely know the answer. We are currently rebuilding a php site in rails and have the new site that is being rebuilt on a linode box [nginx]. The live domain lives on a slicehost box [also niginx]. Upon launch we ...