Archive for the ‘Downloads’ Category

Send Email with attachments in PHP

Although there are ways to send email in PHP using PEAR and other libraries, sometimes you’ll get stuck in a situation where that either isn’t possible or just too much of a faff.

The other day I decided to create a function for this purpose that I can use in my own library of code.

It can be dropped into your include files and used for simple emails without attachments, HTML emails or complex emails with multiple attachments.

I haven’t spent a great deal of time on this so it might not be 100% but works well for me so let me know if there are any flaws that need to be taken care of.

You can download the function (and supporting functions) from here: send email with attachments in PHP

PageRank tool walkthrough

I’ve added a video on YouTube to walkthrough using the PageRank checking DLL you can download from my website.

 (by the way, there is no audio).

 

Using the PageRank DLL in your applications (VB.NET)

To complete this walkthrough you’ll need to download the PageRank DLL.  This is included in the PageRank Checker download on the downloads page.

Extract the ZIP file.  The DLL file is in the path: GetPageRank.zip\PageRank\bin\Debug

Make a note of the path as you’ll need it later.

 

Start by opening up Visual Studio (or Developer Express etc) and creating a new project of type: Windows Application.

Then add the following controls to the main form:

Label: Text = “Website URL”

Label: Text = “Google PageRank:”

Label: Name = “lblResult” and Text = “-”

Textbox: Name = “txtURL”

Button: Name = “btnGo” and Text = “GO”

 

The next step is to add a reference to the DLL into your project.  Generally you would right-click on the Project in the Solution Explorer and select “Add Reference”.

When the dialog box eventually opens up, select the “Browse” tab and find the DLL file which should be called “PageRank.dll”, then click OK.

 

OK, double-click on the button you’ve labelled “GO” which will create an event handler for the button’s OnClick event.

I’ve provided the code in C# and VB.Net

Directions for C#

Add the following line to the top of the file:

using PageRank;

Then inside the event handler:

TGooglePR prCheck = new TGooglePR();
lblResult.Text = prCheck.ReturnPageRank(txtURL.Text);

and you’re done.

Directions for VB.Net

Add the following line to the top of the file:

Imports PageRank

Then inside the event handler:

Dim prCheck As New TGooglePR()
lblResult.Text = prCheck.ReturnPageRank(txtURL.Text)

and you’re done.

Just run the project and enter a full URL in the textbox before clicking on “GO”.  The Google PageRank will be shown in the label within a second or so.

Enjoy.

Plus I’ve done a video walthrough in C# and posted it on YouTube: http://www.youtube.com/watch?v=F9MgNVmJnro

Recover FileZilla FTP Passwords

I needed to recover my FTP passwords from a copy of FileZilla today but I either didn’t trust the various downloads or didn’t want to pay to use them.

So here is the free-to-use code for recovering your FileZilla FTP passwords.

You will need to copy the “Pass” variable from the FileZilla.xml file or registry into the textbox when you run. Unlike the other versions out there, this doesn’t go looking for the password files or search the registry. I think you can take care of that, the difficult part of deciphering the password is taken care of for you.

Code as usual is in C#

Download FileZilla Password Recovery Code here

Page Rank tool in VB.Net and C#

A couple of weeks ago another chap named Aaron asked me if I had done a copy of the PageRank code but this time in VB.Net

I said I’d take a look because the versions out on the Internet that he had seen didn’t work. Well this evening I found the time to do the VB.Net version.

I started by manually converting my C# code to VB.Net – bear in mind I haven’t worked in VB.Net for over 2 years now. When the conversion was complete I found that VB.Net was converting and handling integer types slightly differently to C#.

When my code failed to work I resulted to using a free online C# to VB.Net conversion utility on devfusion. The conversion was pretty much word for word what I had put and still didn’t work.

I then went through the process of stepping each iteration and for-next loop until I found the cause of the differences in values being retured. Turns out in the end it was simply the “integer division” operator that I needed to use in place of the standard division operator.

So here it is: go to download pagerank tool code in VB.net and C#

Also bear in mind this is .Net v2 code – I haven’t tested it on previous versions of VB.Net

If you use this in your code or on your website, I’d appreciate you linking back to my website.

Enjoy

Full code for PageRank tool in C#

I’ve uploaded a copy of the code in a demo website for the pagerank tool in C#.

You can download it from: Full PageRank code with demo site

I’ve tried out a few websites and URLs that people have posted to me and got mixed results. I will be updating it if I can find fixes. In particular the hash seems to fail on some sub-directories.

Download it and try it out for yourself. Feedback is always welcome and drop a comment while you’re here.


UPDATE

The previous code was being blocked by Google for some requests due to a mis-calculated hash. This has been fixed now and the download updated.

You can also checkout my online demo at (not currently live)


UPDATE

I’ve been asked by Aaron Brown to provide a VB.net version of this code or at least of the StrToNum part. I’ll take a look at this shortly. Or if you have partly-working code, send it over and I’ll see if I can help out.

C# Google PR Checker

I’ve had some feedback about the google PR checker I have written in C#.

Basically I will be adding a property that allows you to select the datacentre to query and I will be randomising the PR requests where this property is not set.

Additionally I will be adding an automatic double-check facility so if a site ending in a slash doesn’t return a PR it will check again without the slash and vice-versa.

I will post again once the updates are made and post a link to the download.

For those of you wanting to download the current version, you can find it here:PageRank tool in C#

Thanks,

AR

C# PageRank Tool

After much trawling of the Internet all I could find for automated PageRank gathering was a PHP script or two.

Now since I don’t like to write in PHP, I wrote a version in C#. I haven’t included the source code but I have created a downloadable ZIP containing the C# dll and a test project.

In order to use the dll, simply reference it in your project as follows:


using PageRank;
...
private void btnPR_Click(object sender, EventArgs e)
{
try
{
TGooglePR _pageRank = new TGooglePR();
string _PR =
_pageRank.ReturnPageRank(txtSiteURL.Text);

lblPageRank.Text = “PageRank: ” + _PR;
}
catch (Exception ex)
{
lblPageRank.Text = “Fault Occurred!”;
}
}

Have fun with it!

Go to downloads page

Return top