function [message]=kp
wingkp=webread('http://services.swpc.noaa.gov/text/wing-kp.txt'); % loads the wingbkp data
n=0; % variables for loop to remove header from data
k=0;
while k~=1 || strcmp(wingkp(n),'-')==1 % the last thing in the header is a long line of dashes, so the loop runs until there are no more dashes
    n=n+1;
    if strcmp(wingkp(n:n+2),'---')==1 % makes sure there are several dashes in a row, so that the loop doesn't end early 
        k=1;
    end
end
wingkp=wingkp(n+1:length(wingkp)); % the data file without headers
    
k=fopen('wingkp.txt','w'); %opens a text file and grants write access
fprintf(k,wingkp); %sends the ovation data to the text file
fclose(k); %closes the file
wingkp=load('wingkp.txt'); %loads the text file; when it reloads, it will come in as a vector because the header is gone

kp1=num2str(wingkp(length(wingkp),10)); %extracts the most recent one hour kp prediction
kptime=num2str(wingkp(length(wingkp),9));
message=strcat({'The kp prediction for '},kptime,{' UTC is '},kp1);