The Dishonor of Kaln


"Quickly, my Queen, we must away!"
the white-cloaked young Knight calls;
sounds of battle grow ever close
down grey stone-pillared halls.

"Protect my Love, and keep her safe"
ordered his Sovereign Lord.
Yet rash heart yearns to stand with King,
to wield unbloodied sword.

Red-robed Queen walks with hurried poise,
guards try to not show fear,
all stop and as one group they froze,
at unearthly scream quite near.

Swiftly they go through stone-arched gate,
towards stables where escape await.

Within stable, hearts fill with hope,
welcome scent of fresh straw.
As all make ready to depart,
Knights fervor does still gnaw.

Escape in sight, the Knight did speak,
"I must defend my King."
The Queen upon her horse looked down
and sadly touched her ring.

"If you must, you must."she quickly said
and spun around her steed.
With clear command, "Onward!" she spoke.
They rode away at speed.

Towards throne room and King, Knight does head,
Where glory, honor lie ahead.

Round last corner, young Knight turns,
into a ghastly scene.
Knights and guards litter the floor,
Of Throne room once serene.

Dark-armored figures press forward,
toward fearless sword-drawn King.
As Knight rushes towards desperate fight
Kings sword halts in mid-swing.

He shouts "You should have kept her safe!"
Face shows his trust betrayed.
Distracted thus, his heart is pierced
Ran through by black-swords blade.

The young Knight pales; what has he done?
Towards Queen and duty he doth run.

Footfalls echo in empty halls
as Knight retraces route.
With sword in hand, his keen eyes scan,
aware of foes about.

With caution peeks in stable door,
no enemies inside.
To Queens escape, southern moon gate.
Upon black steed he rides.

At silvery gate he leaps from horse,
the steed, in protest neighs.
He runs past bodies, broken spears.
In shock he stops, dismayed.

On road, Queens robe is torn in parts.
In tatters, matching Knight Kaln's heart.

How to get the final url after redirects

Sometimes, you have a link. And you want to save the actual, final url that link points to. A great example of this is trying to archive something on twitter. You’ll want to store final urls for ones that are tweeted, not their url shortened one.

Anyway, I wrote this really quick in PHP and it works!


$d['initial_url'] = 'https://t.co/NOKpf0iHpR';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $d['initial_url']);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, $d['initial_url']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_exec($ch);
$d['final_url'] = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
print_r($d);

This outputs:

Array
(
    [initial_url] => https://t.co/NOKpf0iHpR
    [final_url] => https://tim.hithlonde.com/2016/announcing-js-space/
)

I just installed Counter-Strike: Source, and I am not sure why. I think it’s because I want to see cs_italy again and hear that music just one more time..

I spent my lunch break filling out my ballot. There are still a couple local measures I need to research more.

Woke up this morning and everyone in my family is sick, including me. Definitely taking a sick day.