To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Article :: Building Dynamic Systems with Expressions in .NET
How Is XML Like An Interface?
Understanding Covariance and Contravariance
Print VS 2010 Keyboard Shortcut References in Letter (8.5x11in) and A4 (210×297mm) Sizes
Updated Productivity Power Tools



Go Back   VBForums > VBForums CodeBank > CodeBank - Visual Basic 6 and earlier

Reply Post New Thread
 
Thread Tools Display Modes
Old May 4th, 2005, 09:24 AM   #1
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Winsock: HTTP File Upload

Introduction
One of the most useful extensions to the HTTP protocol, is the ability to use it to upload files. Although, compared to FTP it is somewhat limited, all that is required to make use of HTTP file uploads is access to a web browser.

Transferring files using HTTP is generally safer than FTP as the data sent to the server can be carefully scrutinised before the commitment is made to store / use it. For this reason it is ideal in client/server applications which regularly need to transfer data over the Internet.

The following application, demonstrates how to upload files to a web server using Visual Basic, with the help of the winsock control. In order to add the Winsock Control to your VB6 application, right click on the tool box, select components from the menu and check the box "Microsoft Winsock Control".

This mimics what a web browser does when you upload a file to a site via a web form.

A Bit about HTTP

The Winsock control enables you to establish a connection to another computer using either TCP / UDP and transfer data over that connection. HTTP (Hypertext Transfer Protocol) is used to request and send data to web resources and it is up to the programmer to construct the HTTP request and parse the response.

The file upload application uses a HTTP POST request to send the file in the form of a multi part HTTP request. This is explained fully in RFC 1867

Using the Demo Application

The demo application allows you to enter a URL and choose the file which you wish to upload. You must give the file a name and an MIME type; a list of MIME types for particular file extensions can be found here.

Pressing the upload button sends the HTTP request containing the data from the file which you have chosen.

Like I mentioned earlier HTTP file uploads are useful in client / server applications. So, I have made a script which will take file uploads to demonstrate how the application works, it also has a web interface:

http://adam.codedv.com/examples/post_dump.php

The files which have been uploaded can be found here, it is clear that there is no conceivable difference between files uploaded via VB and via a web browser. The means in which the server gets the data is transparent.

Attached Images
 
Attached Files
File Type: zip file_upload.ZIP (5.0 KB, 11230 views)
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jun 10th, 2005, 11:32 AM   #2
sabricka
New Member
 
Join Date: Jun 05
Posts: 2
sabricka is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

plz send to me the (post_dump.php) file to put it in my site and try it
send it to
hanysabra@hotmail.com
sabricka is offline   Reply With Quote
Old Jun 10th, 2005, 12:04 PM   #3
Hack
Super Moderator
 
Hack's Avatar
 
Join Date: Aug 01
Location: Sterling Heights, Michigan
Posts: 54,096
Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)Hack has a brilliant future (2000+)
Re: Winsock: HTTP File Upload

Quote:
Originally Posted by sabricka
plz send to me the (post_dump.php) file to put it in my site and try it
send it to
First, welcome to the forums.

Second, you should never, ever put your email address in any open forum post anywhere. It is very easy for spam bots to pick that up.

If you wish to let one of our members know what your email address, please use our internal private messenging system. Thanks.
__________________
Please use [Code]your code goes in here[/Code] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
Before posting your question, did you look here?
Got a question on Linux? Visit our Linux sister site.
I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum.

Creating A Wizard In VB.NET
Modifications Required For VB6 Apps To Work On Vista
Paging A Recordset
What is wrong with using On Error Resume Next
Good Article: Language Enhancements In Visual Basic 2010
IT professionals freelancer site. Register today to find coders, or offer your services for available freelance projects!
Upgrading VB6 Code To VB.NET
Microsoft MVP 2005/2006/2007/2008/2009/2010

Last edited by Hack; Jun 13th, 2005 at 12:03 PM.
Hack is offline   Reply With Quote
Old Jun 10th, 2005, 05:17 PM   #4
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

Everyone seems to want the source code for the PHP files. So, here they are.

The post_dump.php file simply loops through all the posted variables and files and displays information on them. It saves the files in another directory, so to use it you need to create two directories:

uploaded_files
uploaded_files/files

post_dump.php
PHP Code:
<?php
    
/* check for and loop through uploaded files */
    
foreach ($_FILES as $name => $info) {
        
/* chekc the file has a valid name */
        
if (($info['name'] != 'ht.access' &&
            
substr($info['name'], 0,1) != '.' &&
            
$info['name'] != 'allowed_files')) {

            
/* attempt to move the file to the uploaded_files directory */
            
if (@move_uploaded_file($info['tmp_name'], "uploaded_files/files/{$info['name']}")) {
                
/* get the contenst of the array of files */
                
$file_arrays = @unserialize(@file_get_contents('uploaded_files/allowed_files'));        
    
                
/* if there are more already 5 files, remove the oldest item fomr the array
                 * and delete it
                 */
                
if (count(@$file_arrays['files']) == 5) {
                    
$name = array_shift($file_arrays['files']);
            
                    unset(
$file_arrays['types'][$name]);
                    @
unlink('uploaded_files/files/' . $name);
                }

                
/* add the new item to the arrays */
                
$file_arrays['files'][] = $info['name'];
                
$file_arrays['types'][$info['name']] = $info['type'];

                
/* serialize the array and write it back to the file */
                
if ($fhwnd = @fopen('uploaded_files/allowed_files', 'wb+')) {
                    
fwrite($fhwnd, serialize($file_arrays));
                    
fclose($fhwnd);
                }
            }          
        }   
    }
?>
<html>
    <head>
        <title>Form Post Dump</title>
    </head>
    <body>
        <?php if ($_POST): ?>
            <p>You submitted the following POST variables with the following names:</p>
            <ul><?php foreach($_POST as $name => $var) : ?>
                <li><?php echo(htmlspecialchars($name)) ?> = <?php echo(htmlspecialchars($var)) ?></li>
            <?php endforeach; ?></ul>
        <?php endif; ?>
        <?php if ($_GET): ?>
            <p>You submitted the following fariables with the query string:</p>
            <ul><?php foreach($_GET as $name => $var) : ?>
                <li><?php echo(htmlspecialchars($name)) ?> = <?php echo(htmlspecialchars($var)) ?></li>
            <?php endforeach; ?></ul>
        <?php endif; ?>
        <?php if ($_FILES): ?>
            <p>You submitted the following FILES:</p>
            <ul><?php foreach($_FILES as $name => $info): ?>
                <li>File name: <?php echo(htmlspecialchars($name)) ?>
            <ul>
                <li>Client file name: <?php echo(htmlspecialchars($info['name'])) ?></li>
                <li>File MIME type: <?php echo(htmlspecialchars($info['type'])) ?></li>
                <li>File size: <?php echo(htmlspecialchars($info['size'])) ?></li>
                <li>Download link: <a href="uploaded_files.php?file=<?php echo(htmlspecialchars($info['name'])) ?>"><?php echo(htmlspecialchars($info['name'])) ?></a></li>
            </ul>
            </li>
        </ul>
            <?php endforeach; ?></ul>
        <?php endif; ?>
        <form enctype="multipart/form-data" action="<?php echo($_SERVER['PHP_SELF']) ?>" method="post">
            <p>Variable1: <input type="text" name="variable1" /></p>
            <p>Variable2: <input type="text" name="variable2" /></p>
            <p>Variable3: <input type="text" name="variable3" /></p>
            <p>File: <input type="file" name="file1" /></p>
            <p><input type="submit" value="Post" /></p>
        </form>
    </body>
</html>
Direct link to the source code: http://adam.codedv.com/examples/post_dump.phps

The uploaded_files.php file, displays or allows the user to download last 5 uploaded files.

uploaded_files.php
PHP Code:
<?php
    
/* load the file containg the list of uploaded files in to an array */
    
$file_arrays = @unserialize(@file_get_contents('uploaded_files/allowed_files'));

    
/* check the data was loaded successfully - if not, create an empty array */
    
if (!is_array($file_arrays)) {
        
$file_arrays = array('files' => array(), 'types' => array());
    }

    
/* check for the existance of a file variable in the queery string
     * if its there, this contains the name of the file to be downlaoded
     */
    
if (isset($_GET['file'])) {
        
$file = $_GET['file'];
        
        
/* check the file is in the array retrieved from the file */
        
if (in_array($file, @$file_arrays['files'])) {
            
/* get the Content-Type of the file */
            
header('Content-Type: ' . $file_arrays['types'][$file]);
            
header('Content-Disposition: attachment; filename="' . $file . '"');

            
/* send the file */
            
@readfile("uploaded_files/files/$file");
            exit;
        }
    }
?>
<html>
    <head>
        <title>Uploaded Files</title>
    </head>
    <body>
        <h3>Recently Uploaded Files</h3>
        <ul>
            <?php foreach($file_arrays['files'] as $file): ?>
                <li><a href="<?php echo($_SERVER['PHP_SELF'] . '?file=' . htmlspecialchars($file))?>">
                    <?php echo(htmlspecialchars($file)) ?></a>
                </li>
            <?php endforeach; ?>
        </ul>
    </body>
</html>
Direct link to the source code: http://adam.codedv.com/examples/uploaded_files.phps
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.

Last edited by visualAd; Jun 13th, 2005 at 09:22 AM.
visualAd is offline   Reply With Quote
Old Jun 13th, 2005, 09:19 AM   #5
sabricka
New Member
 
Join Date: Jun 05
Posts: 2
sabricka is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

thank you too match and many thanks to this great fourm
sabricka is offline   Reply With Quote
Old Jun 24th, 2005, 01:07 PM   #6
joechez
New Member
 
Join Date: Jun 05
Posts: 4
joechez is an unknown quantity at this point (<10)
Resolved [RESOLVED] Re: Winsock: HTTP File Upload

This programs are working some how okey, but when I try to use the documents (JPG pictures or any other) online (meaning on a web page or by direct access to it from a web folder,) It just doesn't work. I can not use the files online. Why? Is there any whay to do it, or fix it. I have being trying all kinds of things: change mime type, etc. But still nothing. I will apreciate any help.

Last edited by joechez; Jun 26th, 2005 at 09:52 AM.
joechez is offline   Reply With Quote
Old Jun 24th, 2005, 01:31 PM   #7
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

Can you clarify what the problem is? - Is it with the server scripts or the example program? Do you get any error messages or is the file just messed up?
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jun 24th, 2005, 01:50 PM   #8
joechez
New Member
 
Join Date: Jun 05
Posts: 4
joechez is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

I just want to use the uploaded pictures on my website, but they just don't work. If I upload manually using ftp they work just fine. But if I use the script, they don't. Then using the script, I uploaded some pictures (to try out) and downloaded them using ftp. Then uploaded them againg using ftp, and they didn't show up. So, something happend with the pictures using the script. I try other documents also with the same results.
joechez is offline   Reply With Quote
Old Jun 25th, 2005, 09:27 AM   #9
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

What errors are you getting? And have you created the correct directories to place the uploaded files in?
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jun 25th, 2005, 02:36 PM   #10
joechez
New Member
 
Join Date: Jun 05
Posts: 4
joechez is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Yes! I have created the needed folders. As I said the script is working. I can upload and download files. But the files get corrupted or something because after doing an upload, they just don't work on regular web pages. I think the attributes of the files are changing or something.
joechez is offline   Reply With Quote
Old Jun 25th, 2005, 02:48 PM   #11
joechez
New Member
 
Join Date: Jun 05
Posts: 4
joechez is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Yeep! The files work okey just changing the attributes to public read and to group read. Still looking forward to transffer variables at the same time using VB6.
joechez is offline   Reply With Quote
Old Dec 8th, 2005, 04:58 AM   #12
harish_sv
New Member
 
Join Date: Apr 05
Posts: 6
harish_sv is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Hi,


The above example wont work with https site.Pls let me know the solution.

Thanks
Harish
harish_sv is offline   Reply With Quote
Old Dec 8th, 2005, 05:25 AM   #13
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

HTTPs is HTTP tunneled through SSL. Unfortunatly this is vastly more complicated than a standard unencrypted HTTP connection and somthing which I haven't got the time or the knowledge to do at the moment.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Dec 8th, 2005, 07:19 AM   #14
svhk
New Member
 
Join Date: Dec 05
Posts: 1
svhk is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Hi All,

Even i am struggling with uploading files for https sites using vb 6.0.
If anybody gets the solution don't forget to post it here..Also i am looking for this solution very urgently...so pls pls post it asap.

Thanks in advanc
svhk
svhk is offline   Reply With Quote
Old Dec 20th, 2005, 12:21 AM   #15
leigh_wardle
New Member
 
Join Date: Dec 05
Posts: 1
leigh_wardle is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Hi everyone,

The PHP and VB6 code posted here works really well.

I was just wondering if it would be possible to generalize it to do what I would call "custom folders" (on the server).

I would like to be able to upload just one licence file to a few dozen different folders (one per client). The version of the file is different for each folder.

It would nice to be able to put a loop around the VB6 upload code to make this happen.

But I don't know enough about the methodology used in the current PHP and VB6 code to do this.

Any suggestions would be most welcome.

Regards, Leigh
leigh_wardle is offline   Reply With Quote
Old Apr 9th, 2006, 02:04 PM   #16
ionut_ro
New Member
 
Join Date: Apr 06
Posts: 1
ionut_ro is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

QUESTION:

I am connected to Internet Via Proxy. How can I make this sample work?
If I have a direct connection, everything works well.

Through proxy, I am getting this error: 'Valid name, no data record of requested type' (Code 11004) Need advice..

Thank you all.
ionut_ro is offline   Reply With Quote
Old May 7th, 2006, 09:22 AM   #17
ScanCC
New Member
 
Join Date: May 06
Posts: 2
ScanCC is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

anyone here can upload jpg, doc, zip... by this program? I have tried many time and can't success...
But I found that there are no problem when uploading plain text file(txt).
ScanCC is offline   Reply With Quote
Old May 7th, 2006, 09:40 AM   #18
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

It works fine for me. Do you get any errors? And are you sending the right MIME type?
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.

Last edited by visualAd; May 7th, 2006 at 09:44 AM.
visualAd is offline   Reply With Quote
Old May 8th, 2006, 02:50 AM   #19
ScanCC
New Member
 
Join Date: May 06
Posts: 2
ScanCC is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Thank for your reply and your great program first!!

After many times of try and error, I found that it can upload jpg under ENGLISH WinXP, but not in CHINESE WinXP.

for CHINESE WinXP:
There are no error when uploading jpg file, but when I try to download the jpg file from server, I found that the content of jpg is changed and it can't be opened again. May be it is becasue of the encoding problems?
ScanCC is offline   Reply With Quote
Old Jul 17th, 2006, 02:39 PM   #20
Vladimir - SV
New Member
 
Join Date: Jul 06
Location: San Salvador, El Salvador
Posts: 2
Vladimir - SV is an unknown quantity at this point (<10)
Thumbs up Re: Winsock: HTTP File Upload

Hi!, in first place let me thank you for share your code visualAd, second a few questions about it:

1)Could your code work with "multipart/form-data" header type?
2)Wich is the max size of the file that can effectively be send?, despiting the servers limitations.
3)How necessary is to do it with winsock.ocx?, it's difficult to do it through winsocks APIs?, does need winsock.ocx be packed along the aplication?
4)Could your code be reproducible with Wininet APIs?

Thanks in advance. Glad to see that someone is sharing this kind of hard to find but high usable code.
Vladimir - SV is offline   Reply With Quote
Old Jul 17th, 2006, 03:04 PM   #21
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

Quote:
1)Could your code work with "multipart/form-data" header type?
What do you mean? It uses the multipart/form-data header in the HTTP request and sends the HTTP request as a multipart document.

Quote:
2)Wich is the max size of the file that can effectively be send?, despiting the servers limitations.
I am not sure probably the size of a VB string 64k. However, with anything bigger, VB should use swap or other mechanisms to handle the string. I am no VB guru so cannot say for sure.

Quote:
3)How necessary is to do it with winsock.ocx?, it's difficult to do it through winsocks APIs?, does need winsock.ocx be packed along the aplication?
In theory the ocx should be included. If not, you need to ensure that the control is installed on the OS you are running the program on and hope that if it is installed the version is compatible withh the one you've used.

Winsock is included by default from windows 98+, so I would imagain you'd be quite safe.

Quote:
4)Could your code be reproducible with Wininet APIs?
I should hope so, as this is exaclty what the Winsock control is a wrapper for
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jul 17th, 2006, 03:14 PM   #22
Vladimir - SV
New Member
 
Join Date: Jul 06
Location: San Salvador, El Salvador
Posts: 2
Vladimir - SV is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Quote:
Originally Posted by visualAd
What do you mean? It uses the multipart/form-data header in the HTTP request and sends the HTTP request as a multipart document.
Yes sorry, just notice that in the code, I got confused when see this:

VB Code:
  1. ' Content-Disposition: form-data; name="UploadName"; filename="FileName"
  2.  

Later I see this:
VB Code:
  1. ' Content-Type: multipart-form-data, boundary=boundary
  2.  

Quote:
Originally Posted by visualAd
I am not sure probably the size of a VB string 64k. However, with anything bigger, VB should use swap or other mechanisms to handle the string. I am no VB guru so cannot say for sure.in the HTTP request and sends the HTTP request as a multipart document.
Ok, lets say I want to send a 500KBs file, supossing that limit is 64KB, I should use a string class or there's a way to send chunks of data at time?

Quote:
Originally Posted by visualAd
In theory the ocx should be included. If not, you need to ensure that the control is installed on the OS you are running the program on and hope that if it is installed the version is compatible withh the one you've used.
Winsock is included by default from windows 98+, so I would imagain you'd be quite safe.
So it will be ok for most cases to do it with winsock.ocx rather than directly calls to winsock.dll?

Quote:
Originally Posted by visualAd
I should hope so, as this is exaclty what the Winsock control is a wrapper for
Thanks.
Vladimir - SV is offline   Reply With Quote
Old Jul 18th, 2006, 04:50 PM   #23
jedelvalle
New Member
 
Join Date: Jul 06
Posts: 1
jedelvalle is an unknown quantity at this point (<10)
What if

What if I need to send more data in the form. Like two other input type="text" in the same form to autenticate the user that is sending the file??? Please help.
jedelvalle is offline   Reply With Quote
Old Jul 19th, 2006, 12:20 AM   #24
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

You need to encode each variable as a part in the HTTP request. I.e:
Code:
--BOUNDARY
Content-Disposition: form-data; name="var1"

value1
--BOUNDARY
Content-Disposition: form-data; name="var2"

value2
--BOUNDARY
Content-Disposition: form-data; name="file"; filename="file.txt"
Content-Type: text/plain

File text.
--BOUNDARY--
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jul 19th, 2006, 12:22 AM   #25
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

I'll have a look at modifying the app to include other variables, it is easy enough to modify by yourself however. Also, have a look at the demo app for sending GET/POST HTTP requests.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jul 19th, 2006, 02:54 AM   #26
hellilyntax
Junior Member
 
hellilyntax's Avatar
 
Join Date: Jun 06
Location: Kedah, Malaysia
Posts: 28
hellilyntax is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

pls somebody..
why did i get this error msg..

HTTP/1.1 401 Access Denied
Server: Microsoft-IIS/5.1
Date: Mon, 19 Jun 2006 18:00:32 GMT
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
Content-Length: 24
Content-Type: text/html

Error: Access is Denied.
hellilyntax is offline   Reply With Quote
Old Jul 19th, 2006, 04:50 AM   #27
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

You need to authenticate yourself using NTLM (Microsoft Windows NT LAN Manager) authentication. It is possible to do this in VB but involves a lot of byte shifting and code.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jul 20th, 2006, 03:59 AM   #28
hellilyntax
Junior Member
 
hellilyntax's Avatar
 
Join Date: Jun 06
Location: Kedah, Malaysia
Posts: 28
hellilyntax is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

thanks 4 ur reply visualAd,
pls gimme more detail, how to do so..in policy setting?
im using winxp as webserver(just for development)..

im going to host my webserver at hosting company...
what do i need to tell them to do?

ill buy u a pasta then..hehe..
hellilyntax is offline   Reply With Quote
Old Jul 20th, 2006, 10:40 AM   #29
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

Quote:
Originally Posted by hellilyntax
thanks 4 ur reply visualAd,
pls gimme more detail, how to do so..in policy setting?
im using winxp as webserver(just for development)..

im going to host my webserver at hosting company...
what do i need to tell them to do?

ill buy u a pasta then..hehe..
NTLM is a challenge response protocol. That means the client needs to make a connection containing a challenge and the server makes the response. No user name and password are ever transmitted to the server - the authentication takes place with the domain controller.

Like I say. I have never written an NTLM authenticator in VB and I do not plan to either. That doesn't mean the its not possible, just that its a complex and time consuming task.

If you want to do it yourself here is a detailed specification.

http://curl.haxx.se/rfc/ntlm.html
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Jul 21st, 2006, 03:39 AM   #30
hellilyntax
Junior Member
 
hellilyntax's Avatar
 
Join Date: Jun 06
Location: Kedah, Malaysia
Posts: 28
hellilyntax is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

thanks a lot visualAd,
it sound quite hard for that coding...
me either didnt plan to do so...hehe...

im better choose another solution...
im planning to update my sql server directly from my vb local client instead of upload the file then update at the server.

which one is better in terms of reliability?
hellilyntax is offline   Reply With Quote
Old Aug 25th, 2006, 07:46 AM   #31
secra4
New Member
 
Join Date: Aug 06
Posts: 1
secra4 is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Hi All,
problem
look at the picture
Attached Images
 
secra4 is offline   Reply With Quote
Old Aug 25th, 2006, 08:48 AM   #32
visualAd
Swine Buddy
 
visualAd's Avatar
 
Join Date: Apr 02
Location: Langley, Berks, UK Mode: Restructuring
Posts: 4,833
visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)visualAd is a splendid one to behold (700+)
Re: Winsock: HTTP File Upload

That is an HTTP error. It means you don't have permission to access the file.
__________________
PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

| PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


Spread happiness and joy. Rate good posts.
visualAd is offline   Reply With Quote
Old Aug 29th, 2006, 11:20 AM   #33
Budro
New Member
 
Join Date: Jun 06
Posts: 4
Budro is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

First of all, I want to thank you for the code. I've been using it for a while and it works great.

Now for my question. Has anyone used a progress bar with the winsock control for uploading files? I'm new to progress bars and want to add one to this code for my program users. Any suggestions, refrences or code would be greatly appreciated.

Thanks in advance
Budro is offline   Reply With Quote
Old Nov 29th, 2006, 11:19 PM   #34
JulieWSFI
New Member
 
Join Date: Nov 06
Posts: 1
JulieWSFI is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

This is fantastic.

Has anyone created an ASP version of the PHP code ?

Thank-you.

Juls
JulieWSFI is offline   Reply With Quote
Old Dec 18th, 2006, 01:38 PM   #35
iPrank
PoorPoster
 
iPrank's Avatar
 
Join Date: Oct 05
Location: in an island
Posts: 2,658
iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)
Re: Winsock: HTTP File Upload

Hey Visual,
any idea how to modify this code for imagesack.us or similar sites ? These sites redirects to another page (which contains the new links) after uploading.

I tried to upload google2.gif to imagesack usin your code and got this:

Upload URL:
Code:
tried these two:
http://www.imageshack.us/transload.php
http://imageshack.us/ie.php
HTTP Request:
Code:
POST /transload.php? HTTP/1.0
Host: www.imageshack.us
Content-Type: multipart/form-data, boundary=tf63uHQ4SWyMnYsVco1QyHEi5qlB08uv
Content-Length: 1739

--tf63uHQ4SWyMnYsVco1QyHEi5qlB08uv
Content-Disposition: form-data; name="file"; filename="google2.gif"
Content-Type: application/octet-stream

GIF89a4
HTTP Response:
Code:
HTTP/1.0 302 Found
Connection: close
X-Powered-By: PHP/4.4.2
location: http://www.imageshack.us/
Content-type: text/html
Content-Length: 0
Date: Mon, 18 Dec 2006 19:33:19 GMT
Server: lighttpd/1.4.8
1. How do I get the new links of uploade file ?
2. What changes need to be made for registered users ?
(Imagesack doesn't allow image deletion for unregistered users)
__________________
Usefull VBF Threads/Posts I Found . My flickr page .
"I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


Last edited by iPrank; Dec 18th, 2006 at 01:55 PM.
iPrank is offline   Reply With Quote
Old Dec 18th, 2006, 02:13 PM   #36
litlewiki
Frenzied Member
 
litlewiki's Avatar
 
Join Date: Dec 05
Location: Zeta Reticuli Distro:Ubuntu Fiesty
Posts: 1,162
litlewiki has a spectacular aura about (100+)litlewiki has a spectacular aura about (100+)
Re: Winsock: HTTP File Upload

Try the one from vbip.com.It detects redirects.I'm not sure though if this is what you asked for:
http://www.vbip.com/winsock/winsock_http_07_01.asp
__________________
__________________
________________0ооо___
___ооо0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
litlewiki is offline   Reply With Quote
Old Dec 18th, 2006, 10:47 PM   #37
iPrank
PoorPoster
 
iPrank's Avatar
 
Join Date: Oct 05
Location: in an island
Posts: 2,658
iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)iPrank is a glorious beacon of light (400+)
Re: Winsock: HTTP File Upload

Sorry for the confusion. I shouldn't have said 'redirection'.
I tried to mean, when you finish uploading files in imagesack (or YahooMail) they opens a new page that contains URL of the newly uploaded file. (In case of YMail, it is the 'finish attatching file and continue to message' page.)

Getting the HTML of this 'uploading-finished-and-here-is-your-URL' page is necessary. Without it I can't get URL of my own images.

When I tried to mix Visual's and VBIP's code, I got this as 'new URL'.
Code:
http://www.imageshack.us/2 Found
and there is still my second question. How to login to that site with Winsock and upload to that account. (OK, I can use Webbrowser control, but that would be slow.)

[I need this 'cause I want to make a smily collection app like the one Static was making, but want to store the images in ImageSack for easier sharing]
__________________
Usefull VBF Threads/Posts I Found . My flickr page .
"I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


Last edited by iPrank; Dec 18th, 2006 at 10:53 PM.
iPrank is offline   Reply With Quote
Old Dec 19th, 2006, 01:32 AM   #38
litlewiki
Frenzied Member
 
litlewiki's Avatar
 
Join Date: Dec 05
Location: Zeta Reticuli Distro:Ubuntu Fiesty
Posts: 1,162
litlewiki has a spectacular aura about (100+)litlewiki has a spectacular aura about (100+)
Re: Winsock: HTTP File Upload

You need to have cookies enabled for that and also it returns a 302(temporarily moved) which means it is not handling the redirects(not exactly redirects but kinda) properly.

I don't how far i can help you out but i can suggest these:

1.Get live http headers extension for Firefox.:
http://livehttpheaders.mozdev.org/

2.Check out the way things work in the background: Here is my output:

Code:
http://reg.imageshack.us/setlogin.ph...051795891XXXXX
GET /setlogin.php?login=eef5cc5e36b051795891XXXXX HTTP/1.1
Host: reg.imageshack.us
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 302 Found
Connection: close
X-Powered-By: PHP/5.1.2
Location: http://dev.imageshack.us/setlogin.ph...xxxxxxxxx&xml=
Content-Type: text/html
Content-Length: 0
Date: Tue, 19 Dec 2006 07:13:18 GMT
Server: lighttpd/1.4.8
----------------------------------------------------------
http://dev.imageshack.us/setlogin.ph...xxxxxxxxx&xml=

GET /setlogin.php?login=eef5cc5e36b051795891xxxxxxxxx&xml= HTTP/1.1
Host: dev.imageshack.us
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive

HTTP/1.x 302 Found
Date: Tue, 19 Dec 2006 07:09:08 GMT
Server: Apache/2.0.52 (CentOS)
X-Powered-By: PHP/4.3.9
Set-Cookie: myid=3733953; expires=Fri, 14-Dec-2007 07:09:08 GMT; path=/; domain=.imageshack.us
Set-Cookie: myimages=eef5cc5e36b051795891xxxxxxf3; expires=Fri, 14-Dec-2007 07:09:08 GMT; path=/; domain=.imageshack.us
Location: http://reg.imageshack.us/v_images.php
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------
http://reg.imageshack.us/v_images.php

GET /v_images.php HTTP/1.1
Host: reg.imageshack.us
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: myid=3733953; myimages=eef5cc5e36b051795891xxxxx90f3

HTTP/1.x 200 OK
Connection: close
X-Powered-By: PHP/5.1.2
Set-Cookie: myimages=eef5cc5e36b051795891xxxxxxxx; expires=Fri, 14-Dec-2007 07:13:21 GMT; domain=.imageshack.us
Content-Type: text/html
Date: Tue, 19 Dec 2006 07:13:21 GMT
Server: lighttpd/1.4.8
Transfer-Encoding: chunked
----------------------------------------------------------
3.Then use these api functions to set and get cookies accordingly.
http://support.microsoft.com/kb/q196062/

I suggest you use inet control for this or the class module from vbip.com .

If needed try the user agent extension and modify headers extension to play around with headers.
__________________
__________________
________________0ооо___
___ооо0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
litlewiki is offline   Reply With Quote
Old Feb 8th, 2007, 01:00 PM   #39
kelceycoe
Junior Member
 
Join Date: Feb 07
Posts: 16
kelceycoe is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Thanks for such a wonderful script. How do I cite you as a credit for when I use it?

I got this error:
HTTP/1.1 406 Not Acceptable
Date: Thu, 08 Feb 2007 19:12:41 GMT
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>406 Not Acceptable</TITLE>
</HEAD><BODY>
<H1>Not Acceptable</H1>
An appropriate representation of the requested resource /politicstestresults/post_dump.php could not be found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.37 Server at www.kelceycoe.com Port 80</ADDRESS>
</BODY></HTML>

I've uploaded the files to my upload directory as shown, and chomodded the directory and php files as 777. Is that right or am I doing something way wrong? Thanks.

Last edited by kelceycoe; Feb 8th, 2007 at 01:14 PM.
kelceycoe is offline   Reply With Quote
Old Feb 8th, 2007, 11:15 PM   #40
ashish ojha
New Member
 
Join Date: Aug 06
Location: Mumbai
Posts: 7
ashish ojha is an unknown quantity at this point (<10)
Re: Winsock: HTTP File Upload

Guys,

Me trying to upload file using VB HTTP Post method. Can successfully upload the files when my client machine is English OS . However , the problem occurs when am trying to upload the files from Chinese OS. It seems that the file uploaded is getting corrupted and could not be opened in correct format. This is applicable for binary files. The text files could be uploaded successfully.
I have tried setting content-type, charset,codepage etc properties to assemble the body.

Can anyone help me ? Its urgent ....Hope to find some VB GURU in this group.HELP !

Thanks in advance,
Ashish.0.










Quote:
Originally Posted by kelceycoe
Thanks for such a wonderful script. How do I cite you as a credit for when I use it?

I got this error:
HTTP/1.1 406 Not Acceptable
Date: Thu, 08 Feb 2007 19:12:41 GMT
Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>406 Not Acceptable</TITLE>
</HEAD><BODY>
<H1>Not Acceptable</H1>
An appropriate representation of the requested resource /politicstestresults/post_dump.php could not be found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.37 Server at www.kelceycoe.com Port 80</ADDRESS>
</BODY></HTML>

I've uploaded the files to my upload directory as shown, and chomodded the directory and php files as 777. Is that right or am I doing something way wrong? Thanks.
ashish ojha is offline   Reply With Quote
Reply

Go Back   VBForums > VBForums CodeBank > CodeBank - Visual Basic 6 and earlier


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:05 PM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.