Results for "Category: Internet/ Browsers/ HTML"
This article describes using Windows Internet API for atomic clock sites connection and synchronization PC clock. C++ code is included.
A sample on how to create a simple TCP server that is Multi Threaded and accepts more then one Client Connect in MFC using SOCKS.
Simple FTP DOS/WIN32 application that checks the machine day of the week, then goes and downloads the appropriate file for that day. I warn you, I stink at C/C++ and other languages and have only toyed with simple stuff. First, let me say this. I am a Network Engineer, MCSE, CNE, CCNA and work with routers, servers, Novell/NT some database apps/servers, firewalls, security, yada yada.. I wanted to learn C/C++ to be able to read, and understand hopefully, security applications, exploits etc...since I have taken more of an interest in security lately. Of course, in my day-to-day activities, something always comes up that requires me to make a task transparent to the end-users. It seems nobody can start an FTP from a Windows command prompt, login and download a file without it becoming a major ordeal, so they scream to the Information Technology department and make it our job (sound familiar?). So, this is what really prompted me to write something useful in C++. There are probably better ways to handle the checking of the day and firing up your Internet FTP session other than the way I did it, any comments are greatly appreciated on how to streamline this code. First, finding information on search engines/news groups and even MSDN is very difficult. Documentation to a novice is very cryptic, especially when there is very little of it to begin with on Microsoft's site. I had a heck of a time actually getting the simple FTP connection to work and scramble for days working on it. Hopefully, this will make it very apparent on how to get started with WININET to make FTP connections and lead you to bigger and better things. Please comment on the code.
In this article you will find out why you just can't call a few WinInet functions and expect them to download a file for you. You will learn the proper way to download a file from the Internet, and display its progress and download speed!
This code shows the source ip and port the flags of the packet and the sequence number
When you work with cookies, you always run into paranoid types who disable their cookies. If you don't detect and deal with them, your code may not work. This code detects the user's cookie settings using the ASP Session object. Unlike some other implementations, it requires only one script page.
You can send an Email with attachment(s) from your ASP page using CDONTS. There is some code here on planet-source-code, but it does only work on the webserver itself, because the code does NOT first upload the attachment to the WebServer. This is neccesary, because the webserver the ASP is on cannot access your harddrive and pick up the file you want to send as attachment. If you don't, you get "Unspecified Error 80004005" Make sure you have IIS with CDONTS (standard under IIS5) installed and the SMTP virtual server is running on the webserver. The magnificent code to upload a file to a webserver is from Karl P. Grear and can be found on planet-source-code (Form Based File Upload Using Pure ASP).
Using the Windows Scripting Host this VBScript retrieves the users favorites folder and loads the url links into an array, then goes to each site for three minutes.
My purpose for this was educational. I was trying to learn the Scripting.FileSystemObjects which were not documented well at the time. You can use it for educational purposes, or to test the security and see how well your server's NT user permissions are locked down (for instance, if your anonymous user can browse and download files from your WinNt directory (which is usually the case!), your permissions are probably not quite up to snuff)
This is a basic redirection script based on the domain name. It is usefull if you are hosting multiple sites from one IP address.
Search in the site for any word
You can send e-mail whom ever you want from who ever you want, using wich ever server you want This program uses my own control Active X, in the zip you can find the source code.
When working with HTML forms and ASP the order of the tags CAN and WILL make a difference! This article details some traps that HTML newbies can run into when designing ASP pages.
This a tutorial I wrote because I had so much trouble learning how to write a COM object, I wanted to put it in simple terms for anyone else who might want to get into it.
This Banner Rotator stores The Image URLs, Links, Tracking URLs, Views, adn Clicks in a database. When the banner loads it update the views for that banner in the database. when a user clicks the banner it updates the clicks in the data base. On the stats page(type http:/yoururl/ad.asp?fadmin=True to get there.) you can sort banners by ID, Views Or Clicks. It displays 10 banner stats per page. A sample database is included. make sure you change the gblConnection String at the top of the asp file to the location of the database. Please post your comments/questions.
Resize and position the browser window
Since you are using VBScript, that should mean that either you have separate versions for Netscape and Internet Explorer users, make pages which tailor themselves to the client's browser, use VBScript only for non-essential page features, or are developing only for people using Internet Explorer. I have provided an example of a forwarding page which separates users capable of VBScript from others, and also a script which calls extra features if the client is using Internet Explorer. Note that they both use JavaScript, so that they will function in either NN of IE.
This piece of code FORCES the user to save known file types (ie: *.mpg, *.gif, *.jpg, *.htm... you get the idea). Normally these (known file types) are opened in the browser, if you wish to bypass this feature in the browsers and allow the user to save a copy to their local computer without telling them to "right click" on the file and select "save target", this is the way. This code is REAL SIMPLE. I commented EVERY line so you know exacly what purpose it serves. If you have any enhancements to make to it, please let me know I'd love to see them. Please vote good or bad, 'cause I'd like to know.
Polls Admin is back. Custom number of questions, customizable layout, emailing, printing.
This class demonstrates how you can request the HTML of a URL from another website using the XMLHTTP object to spider the web page. (Simular to the methods of the ASPHttp object). The data is parsed and made available through a class object. This code is great if you are thinking about creating a Search Engine - or you just want to verify that URLs exist that users may place in there profiles. Also handy for finding broken links. If your server has IE5, or XML objects from Microsoft installed on it, then you should be able to use this demonstration without any problems.