『壹』 VC++編寫連接FTP伺服器程序,編譯的時候報錯
m_pInetsession=new CInternetsession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS);
這一行 中的 CInternetSession中的session應該是大寫吧
『貳』 如何用VC開發SFTP的客戶端
一、路由器下的FTP服務端:
路由器下的FTP服務端,需要解決一個「安全驗證」問題,IE客戶端會核對服務端的IP
地址,因為服務端是內外兩個IP,而使IE客戶端安全驗證失敗,但專業FTP客戶端CuteFTP9、LeapFTP3
可以不核對IP驗證,而使訪問成功,但用戶總是喜歡IE做客戶端,為此需要找一個解決「安全驗證」
的FTP服務端,FileZilla FTP Server就是最實用小巧的FTP理想服務端,只有1M多一點,非常小巧。
二、路由器下的FTP服務端要被外網IE訪問的因素:
1. FTP服務端WINDOWS電腦要關閉自帶的防火牆或設成FTP服務程序為「例外」;
2. 路由器下的電腦伺服器要設成路由器的DMZ主機,這樣服務端埠就.開.放在外網,
才能被外網所訪問,所以,服務端電腦要設成靜態IP如 192.168.1.10,並把路由器的
DMZ主機設為此IP,設DMZ後就不需要再設.端.口.映.射.了;
3. FileZilla FTP SERVER要設成被動方式PASV,並要指定一個外網IP,以解決NAT的安全驗
證問題,否則,客戶端不能被WINDOWS的IE所訪問,但能被CuteFTP訪問;
4. 外網的端.口不能被運營商所封或者不能是共享外網IP地址的NAT代理,埠會因NAT改變;
三、FileZilla FTP Server需要的設定:
1. 需要設定為 Passive被動模式:埠范圍可為設為 10000-10050
2. 指定的IP要設為外IP:以解決「安全驗證」問題
這個外IP就是將要被訪問的FTP://外IP
3. 用戶增加 anonymous,密碼不設,這是匿名方式;
4. 共享文件夾設成你的一個被訪問目錄;
5. 其它21號服務埠等預設參數不需改動。
四、程序說明:
一、FileZilla server.exe 這是後台服務程序,運行後啟動服務就可;
二、FileZilaa Server Interface.exe 這是界面管理程序,讓管理員設定參數的。
『叄』 怎樣用VC在vs2008環境下編寫一個可以訪問ftp伺服器下的目錄文件的程序,求:詳細步驟
對不起,我對FTP不怎麼理解。
我可以告訴你方法:
1)、仔細研究下FTP協議,FTP是應用層的協議,可以直接建立套接字應用程序,直接將需要訪問的目錄信息發給伺服器。
2)、建立套接字時,服務埠一般是21,IP即是伺服器的IP。
3)、遵循FTP通信協議和伺服器進行通訊,這樣別說是訪問FTP下的目錄,就是直接上傳下載文件都是可以的。
『肆』 怎麼用VC++編寫一個檢查網路連接的程序,以及是否能連接外部ftp伺服器
gethostname()函數可以 滿足你1 的要求,
2,就復雜了,如果你在程序中指定了IP 比較好辦 GetSocketName()就可以檢測出來,不成功就返回0.0.0.0 。
如果你是想隨便就想知道能不能連一個隨意的FTP那可麻煩了。不能做一個掃描器吧。
『伍』 在VC程序中如何用FTP與伺服器連接並從伺服器上下載文件
我要回復《在VC程序中如何用FTP與伺服器連接?並從伺服器上下載文件?》
能夠在如此精彩的帖子後面留下自己的網名是多麼驕傲的一件事啊!
『陸』 求用vc6.0編寫的ftp伺服器和客戶端 通過客戶端鏈接伺服器 可以用ls命令查看文件屬性和get命令實現文件傳輸
才這么點分兒,切~鬼才給你寫啊!!!!
『柒』 C語言實現從FTP下載、上傳文件
FTP 是File Transfer Protocol(文件傳輸協議)的英文簡稱,而中文簡稱為「文傳協議」。
1.C語言可以使用CStdioFile函數打開本地文件。使用類CInternetSession 創建並初始化一個Internet打開FTP伺服器文件。
CStdioFile繼承自CFile,一個CStdioFile 對象代表一個用運行時函數fopen 打開的C 運行時流式文件。
流式文件是被緩沖的,而且可以以文本方式(預設)或二進制方式打開。文本方式提供對硬回車—換行符對的特殊處理。當你將一個換行符(0x0A)寫入一個文本方式的CStdioFile 對象時,位元組對(0x0D,0x0A)被發送給該文件。當你讀一個文件時,位元組對(0x0D,0x0A)被翻譯為一個位元組(0x0A)。
CStdioFile 不支持Duplicate,LockRange,和UnlockRange 這幾個CFile 函數。如果在CStdioFile 中調用了這幾個函數,將會出現CNoSupported 異常。
使用類CInternetSession 創建並初始化一個或多個同時的Internet 會話。如果需要,還可描述與代理伺服器的連接。
如果Internet連接必須在應用過程中保持著,可創建一個類CWinApp的CInternetSession成員。一旦已建立起Internet 會話,就可調用OpenURL。CInternetSession會通過調用全局函數AfxParseURL來為分析映射URL。無論協議類型如何,CInternetSession 解釋URL並管理它。它可處理由URL資源「file://」標志的本地文件的請求。如果傳給它的名字是本地文件,OpenURL 將返回一個指向CStdioFile對象的指針。
如果使用OpenURL在Internet伺服器上打開一個URL,你可從此處讀取信息。如果要執行定位在伺服器上的指定的服務(例如,HTTP,FTP或Gopher)行為,必須與此伺服器建立適當的連接。
『捌』 登陸FTP伺服器後怎麼顯示伺服器端的操作界面 vc
我也沒經驗,可以討論一下。
登陸流程:
1、伺服器開啟。
2、客戶端登陸,向伺服器發送登陸信息,伺服器驗證登陸信息,存儲用戶信息,返還當前用戶列表,斷開連接。
驗證用戶是否存在流程:
1、客戶端每隔一定時間,向伺服器端發送「alive」報文,伺服器端認為用戶仍然登陸,並且返還當前可用用戶列表。
2、如果客戶端超過一定時間不向伺服器發送"alive"報文,則伺服器端認為用戶已經掉線,從可用用戶列表中刪除該用戶。
發送消息流程:
客戶端A發送報文給伺服器端,伺服器端轉發報文給客戶端B,如果客戶端B成功接收,則返回報文給伺服器端,伺服器端將客戶端B成功接收的信息返回給客戶端A。
你說的每隔用戶連接都開一個線程是什麼意思呢?
按照我剛剛說的,伺服器端肯定是只存在一個偵聽線程,然後接收到報文以後,根據報文類型,創建不同的工作線程去進行處理。瀚斯寶麗顯示器質量頂呱呱
戴爾顯示器質量好但是價格硬
三星顯示器屬於中高檔
華碩顯示器很少見
聯想的顯示器不拆開賣
瀚視奇顯示器是瀚斯寶麗的一個下屬品牌
清華同方是大眾品牌
飛利浦顯示器質量很好
『玖』 多線程FTP程序用VC/C++如何設計
這是codeproject的關於ftp的實現,你可以去down源代碼
Introction
StuffFTP is a free for life FTP client. This FTP client will allow you to connect to FTP servers and upload and download files.
Motivation
Why did I create and continue to support StuffFTP? First it is a learning experience, and since I just got laid off from my company, I decided to use some of the tools they have provided, its legal as I technically bought them and they do not have other programmers following in my footstep nor do they plan on hiring any, to create something for the community. I also used another FTP program that was freeware for a while and then became pay to use software with little to no notice. That irked me and a friend suggested I create my own FTP client. So I am.
Progress
This is currently a work in progress and I would be the first to say there is a lot of work to do. Since I am laid off, I have lots of time on my hands. And this is an excellent chance for me to learn some of the concepts of C++ that I wanted to, but never had the chance while I was working. I was hoping to get a job in San Jose, CA, but decided to hold off and live on saving for a while.
Guarantee
I will support this program as best as I can. I have already setup a website and forum for it, here. I use the forum because I have trouble responding to email especially when I get a whole bunch of SPAM everyday. There is no adware or spyware in the program, and I guarantee that it will be free for the life of the program.
Some people have already asked why I don't open source the project. The main reason is I do not know if I can. StuffFTP uses some proprietary third party libraries. I do not know if I can post the source code or header files to those libraries. So everyone will have to wait until I can get rid of those libraries or hear back from the companies concerning my question about releasing header and associated help files.
Tools
* MS Windows XP Professional
* MS Visual Studio .NET C++/MFC
* Clickteam Install Maker
* Clickteam Patch Maker
* Betaone.net forum members
* CXListCtrl by Hans Dietrich
3rd Party Libraries
The application uses Catalyst Socket Tools Library Edition and Professional UI GUI library. So far the support has been fair with Prof-UI and outstanding with Catalyst. The Catalyst tool is for the actual FTP connection and, as the name suggests, Prof-UI is being used for the GUI.
Updates
You can find the latest updates here and you can also find my latest ramblings, blogs, and support here. This is where you can find out all the latest versions and information.
How to contribute
Money! Just kidding you can contribute by downloading, using, and giving feedback on the program. That way I can determine which path to take with the application and which features to prioritize or not. Graphics is also where I need lots of help. I am left brained and can not draw a good stick figure to save my life. If you can help with graphics or anything else, please let me know. Also talk to me, I am bored. I have no job at the moment so I can use the company.
Features
* Able to upload/download from server/computer
* Connect to FTP sites using login
* Connect using other ports besides 21
* Delete, rename, and CHMOD a file
History
* 12/10/2003 - Version 0.11a
* 12/07/2003 - Version 0.10a
『拾』 vc 模擬ftp 有伺服器端和客戶端
...........
建議你去專業一點的網站.....