http

extracting text from HTML (Perl)

I'm doing a script that enters a page and extract and extract information from it. The script I'm doing it in Perl. Problem: Not how to start running the script because when I start it picks up the url like this and this is not what I want <a href="http://valeptr.com/scripts/runner.php?BA=6672&amp;amp;hash=08c5c66839a468a11b7574e6ce02e...

Is out there any sample of reading http requests using TCP socket collecting data from them (like emulating Http server in some way)

Is out there any sample of reading http requests using TCP socket collecting data from them (like emulating Http server in some way) so I wanna to keep data like senders IP:PORT, request body and so on. So has any one seen such thing in OpenSource projects or do you know how to create it? (if so please provide siple code example) ...

Protocol Buffers MIME problem

Help! Trying to implement Protocol Buffers via Rest (Jersey), but get this exception. class com.util.ProtobufMessageBodyReader class com.util.ProtobufMessageBodyWriter Jul 6, 2010 3:43:37 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-9102 Jul 6, 2010 3:43:37 PM org.apache.catalina.startup.Catali...

catch specific HTTP error in python

I want to catch a specific http error and not any one of the entire family.. what I was trying to do is -- import urllib2 try: urllib2.urlopen("some url") except urllib2.HTTPError: <whatever> but what I end up is catching any kind of http error, but I want to catch only if the specified webpage doesn't exist!! probably that's HT...

saving referer url in a database

Hello, I have written some code that provides statistical information about visitors to a website (like "Google Analytics") I have a REFERER table with refererID, refererURL columns. The refererURL contains the whole url, including the parameters. other tables, such as the statistics table, refer to this table by the refererID column....

HTTP_Request::setPostFields is an undefined method

Hey, I've been battling with PHP all morning and it's now really starting to bug me! I've had a hard time getting HTTP_Request to work at all, but now it seems happy with everything but setPostFields() which it claims to be undefined... Here's my code - I'm a new PHP coder, so be gentle on my (non-existant/terrible) coding style. requ...

Watching a Motion Jpeg http stream in Windows Media Player

I have a camera that is sending a motion-jpeg stream over a network in real time, and I would like to open the stream and view the video in Windows Media Player. Firefox and VLC are able to show me the video, but Windows Media Player just says "Connecting to..." for forever. I think this is because the stream has no end - it's just playi...

accessing one mercurial repo with different methods

Hi. I want to make the same (physically same) Mercurial repository accessible via ssh and https (hgwebdir). Are there transaction problems when ssh users and http users push at the same time? ...

Infinite loop with HTTP 401 status

I wrote an ASP.NET page that requires HTTP Basic authorization, which I put in the Page_Load function: void Page_Load(object sender, EventArgs e) { string auth = Request.Headers["Authorization"]; if (string.IsNullOrEmpty(auth)) { Response.StatusCode = 401; } else { string[] usernameAndPassword = Enc...

Download .wav file with asp.net in Internet Explorer

I'm just trying to sent a .wav file to Internet Explorer with an ASP.net Handler: public void ProcessRequest(HttpContext context) { HttpResponse response = context.Response; response.ContentType = "audio/x-wav"; response.WriteFile("MyWav.wav"); response.AddHeader("Content-Length", "304578"); response.Flush(); } Th...

read file from server with some offset

How can I read file from server starting with some offset (Similar behavior to wget -c)? What headers I must send to server? What futures must server support? ...

Testing http connections on device

Hallo, developing a bb app I need to make http connections to get files, images etc. In simulator all works, but not in device. I bought a BlackBerry but I want to test my app without a sim then without a bes. How do I need to set my device? and how do I have to compose my url? I just have a bb device with wifi available Thanks all :)...

problem with curl piping $_POST and $_FILES in same request

I'm trying to recreate an entire http request including both post and files data however no matter what I do I can't seem to get my files to work, the code I'm using is below... $count=count($_FILES['photographs']['tmp_name']); $file_posts=array(); for($i=0;$i<$count;$i++) { if(!empty($_FILES['photographs']['name'][$i])) { $_...

Google Reader API request token, get 400:Bad Request

this Android code worked fine before, but i'm having problems for some reason. here is the request i'm trying to make: https://www.google.com/reader/api/0/token i'm getting 400:Bad Request as a response, and i'm not sure why. isn't this the correct URL for requesting a token? the auth token is being passed as a header in all requests...

HTTP 403 : Forbidden error while accessing Google Tile through a C# program.

I have one URL "http://mt0.google.com/vt/lyrs=m@129&amp;hl=en&amp;x=11728&amp;y=7595&amp;z=14&amp;s=Galileo" used to fetch Google Tiles from Internet. If I use this Google Tile URL from browser (any), I successfully get the Google Tiles (Map). But the problem is, if I try to access this URL programmaticaly, I get an Error: HTTP 403 Forbi...

Why does Web Server respond "304 Not Modified" when no Etag and no "If-Modified-Since" is in request header

I get back 304 Not Modified from the web server, but in Firebug, the request header doesn't have Etag and doesn't have If-Modified-Since, and I looked at all the header line and there was no datetime info at all, so how does the server know the content is not modified? ...

HTTP Response 411 Length Required, Http Client 4.0.1 Android

i'm sending an http request to the google reader api and getting an unusual response code. following the documentation, i've requested an auth code and included it in the header of every request. after performing the login, and getting an auth code, i tried accessing this url, which is part of the documentation: http://www.google.com/...

What's the difference between using "http://" and just "//" in src or href?

I've seen some sites use //somedomain.com/images/img.jpg vs using http://somedomain.com/images/img.jpg which includes the http: as well. Is there a difference between the two? Is the browser just correcting the missing http: and these people are being lazy? Im curious behind the reasoning. ...

Whats the best Http Component which supports SOCKS and HTTPS for C#.NET

Hi , Iam coding an application which needs to do some web automation to some websites from our intranet. Some are simple web services while some will be https websites. My application needs to connect to them via socks proxies. Now httpwebrequest class does not support socks so Iam looking to code a complete HTTP wrapper using Sockets...

Multiple HTTP Requests due to img behavior tag

Hi All, We have couple of portlets deployed on Websphere Portal Server. In the css file we have included a behavior attribute for img tag. img { position:relative; border:none; outline:none; behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLower...