Meta Helper - 20 Downloads and Counting!
The Meta Helper file is extremely easy to use! Pending a valid url, it returns a random an array with the meta tags associated with that url!
Download Meta Helper
Note: All functions included in the original Meta Helper are still available
Loading this Helper
This helper is loaded using the following code:
$this->load->helper('meta');
The following functions are available:
grab_meta()
Lets you fetch all existing meta tags on a remote website. Example:
$meta_array = meta_info();
usage
So how can I actually use this, you ask? We're assuming you're using the form helper, url helper, and input library.. With that said, let's take a look...
$form = form_open('meta');
$form .= form_label('Valid URL: <br />', 'url');
$form .= form_input('url');
$form .= form_submit('submit', 'Grab the tags!');
$form .= form_close();
// Was the form submitted?
if($this->input->post('url'))
{
$url = strtolower($this->input->post('url'));
$results = grab_meta($url);
// Let's see what's going on
if(is_array($results))
{
echo '<a name="results" id="results"></a><h6>' . $url . '</h6>';
echo '<strong>URL:</strong>' . $results['url'];
echo '<br />';
echo '<strong>Title:</strong>' . $results['title'];
echo '<br />';
echo print_r($results['tags']);
echo '<br />';
echo $form;
}
else
{
echo "<h6>Invalid URL</h6>";
}
}
else
{
echo $form;
}
Try It!
Download META Helper