From: mayayana on 15 Mar 2010 17:52 > But let's talk VB6. Is it possible to write an app that can log into a > website forum? Is the only way to do this is with ASP? > I suppose you can go either way: server-side with PHP or client-side with VB. I don't know anything about forums. It's possible to write VB code that carries out the server conversation directly. I've done that for downloading and for SMTP email. But you'd need to know the details of what the server expects. I think PHP is worth looking into, though. I think you can get the path in their browser with something like: getenv("HTTP_HOST") It's simple to add an include, which just inserts the content of a text file into the code before serving the page: <?php include("downlink.inc"); ?> The include file can have your download link. With that you'd just need to parse the URL and check it against a file list. It's not always easy to find the PHP snippets you need, but it should all be out there for the finding, since parsing URL parameters is a very common occurence.
From: Karl E. Peterson on 15 Mar 2010 18:54 Webbiz wrote: >> I was guessing you may need to set a mime-type on the server to solve >> the problem you originally posted about. Could also be related to the >> browser being used. Have you tried other download methods? If you >> have a link, I'm sure others here would be willing to try snatching a >> copy, to see what happens and what might be learned from that. > > I gave up. It turned out to be a Mime issue and a subject I don't > think I have a lot of time to become expert about. There's no need to become an expert at it. Do you have access to the server? If not, there's *definitely* no need to learn much at all. For an indeterminate binary format, I believe you can just use "application/octet-stream" as the mime type. That's really all there is to it. That and finding how to set it on your web server. For example, in IIS6: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx?mfr=true -- ..NET: It's About Trust! http://vfred.mvps.org
From: Karl E. Peterson on 15 Mar 2010 19:00 Webbiz wrote: > I use an Apache server. Setting MIME for Apache http://www.flashcentral.com/Tech/Server/Apache.htm -- ..NET: It's About Trust! http://vfred.mvps.org
From: Nobody on 15 Mar 2010 19:36 "Webbiz" <nospam(a)noway.com> wrote in message news:rlssp5lmdmu2b1pt8gpupkdltc7slsl3h6(a)4ax.com... > Yes, my site uses PHP for its webpages so its definitely supported. > > Wish I had the time to learn the stuff. Had it done professionally. > > But let's talk VB6. Is it possible to write an app that can log into a > website forum? Is the only way to do this is with ASP? You could do it this way, but the password could be intercepted: mysite.com/getfile.php?UserID=1234&Pass=abc Here is a PHP version of the ASP script, modified slightly. It assumes that there are no HTML tags in the data file. The same applies to ASP, which support "include". Save the script below as "getfile.php" and upload it using FTP ASCII mode. How to access it: mysite.com/getfile.php?SubID=1234 <html> <head> <TITLE>Test</TITLE> </head> <body> <?php $SubID=$_GET["SubID"]; if ($SubID=="1234" or $SubID=="1235") { // Subscriber is black listed echo "Access denied."; } else { // Valid subscriber, send the file echo "Access granted."; include 'datafile.txt'; } ?> </body> </html> PHP Documentation: http://www.php.net/docs.php I recommend that you use PSPad freeware because it adds syntax color highlighting to virtually all languages and script files. http://www.pspad.com
From: Webbiz on 15 Mar 2010 21:08
On Mon, 15 Mar 2010 15:54:17 -0700, Karl E. Peterson <karl(a)exmvps.org> wrote: >Webbiz wrote: >>> I was guessing you may need to set a mime-type on the server to solve >>> the problem you originally posted about. Could also be related to the >>> browser being used. Have you tried other download methods? If you >>> have a link, I'm sure others here would be willing to try snatching a >>> copy, to see what happens and what might be learned from that. >> >> I gave up. It turned out to be a Mime issue and a subject I don't >> think I have a lot of time to become expert about. > >There's no need to become an expert at it. Do you have access to the >server? If not, there's *definitely* no need to learn much at all. > >For an indeterminate binary format, I believe you can just use >"application/octet-stream" as the mime type. That's really all there >is to it. > >That and finding how to set it on your web server. For example, in >IIS6: > >http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx?mfr=true Yes, I have access and yes I got it setup the other day. Thanks. <g> Webbiz |