This snippet helps you to make buttons etc.. I have been using this for Download Buttons.
Home » All posts
Jarvis : an Artificial Intelligence Operating System
How To Make A Port Scanner in PHP
Port scanners are created to find opened/closed ports in a host, you can get the same results in this Port Scanner coded in php by the way I wouldn't take all the credits to this because i am a php beginner so I had to make this from scratch also there are many more open source advanced Port Scanners. You can also easily add Ports if you need to.
Snippet : Base64 Encode and Base64 Decode in PHP
This snippet helps you to encode and decode your text with base64.
Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The Base64 term originates from a specific MIME content transfer encoding. - Wikipedia
Snippet : TinyURL API in PHP
This snippet helps you to shorten your URLs with TinyURL API(Function with usage)
- <?php
- function TinyURL($url){
- return file_get_contents('http://tinyurl.com/api-create.php?url='.$url);
- }
- echo TinyURL('http://www.ultimateprogrammingtutorials.info');
- ?>
You need to replace http://www.ultimateprogrammingtutorials.info with the URL you want to shorten
Snippet : HTTP Redirection In PHP
This snippet helps you to redirect to another website/webpage.
- <?php
- header('Location: http://www.example.com');
- ?>
Replace http://www.example.com with your website URL/webpage URL
Snippet : Detect HTTP User Agent in PHP
The code below helps you to detect the HTTP user agent I mean the browser version.
- <?php
- $useragent = $_SERVER['HTTP_USER_AGENT'];
- echo "<b>User Agent </b>: ".$useragent;
- ?>
Return
User Agent : Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36
User Agent : Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36
Down For Everyone Or Just Me in VB.NET
Down for everyone or just me is a website that can check whether your website is down or up.
Required components
Required components
- One Button
- One TextBox
Coding :
Add these codes to Button click_event & don't forget to add the namespace Imports System.Net.'Imports System.Net 'defining strin as a string & setting it to download strings from the website & the URL Dim strin As String = New WebClient().DownloadString(("http://downforeveryoneorjustme.com/" + TextBox1.Text)) 'checking string If strin.Contains("It's just you.") Then 'return MsgBox(TextBox1.Text + " is up", MessageBoxIcon.Information, MessageBoxButtons.OK) 'checking string ElseIf strin.Contains("It's not just you!") Then 'return MsgBox(TextBox1.Text + " is down", MessageBoxIcon.Information, MessageBoxButtons.OK) 'checking string ElseIf strin.Contains("Huh?") Then 'return MsgBox("Invalid website", MessageBoxIcon.Error, MessageBoxButtons.OK) End IfNow to check you can just enter the URL you want to check in TextBox and click on the Button you added.