title: use parse_url to get entire url instead of part of it
body: <p>I was trying to make this function more comprehensive to parse more of a url</p>
  
  <p>Currently the function I have is this </p>
  
  <pre><code>function _pagepeeker_format_url($url = FALSE) {
  if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
  return FALSE;
  }
  
  // try to parse the url
  $parsed_url = parse_url($url);
  if (!empty($parsed_url)) {
  $host = (!empty($parsed_url['host'])) ? $parsed_url['host'] : '';
  $port = (!empty($parsed_url['port'])) ? ':' . $parsed_url['port'] : '';
  $path = (!empty($parsed_url['path'])) ? $parsed_url['path'] : '';
  $query = (!empty($parsed_url['query'])) ? '?' . $parsed_url['query'] : '';
  $fragment = (!empty($parsed_url['fragment'])) ? '#' . $parsed_url['fragment'] : '';
  return $host . $port . $path . $query . $fragment;
  
  }
  
  return FALSE;
  }  
  </code></pre>
  
  <p>This function turns urls that look like this </p>
  
  <p><a href="http://www.google.com/url?sa=X&amp;q=http://www.beautyjunkiesunite.com/WP/2012/05/30/whats-new-anastasia-beverly-hills-lash-genius/&amp;ct=ga&amp;cad=CAcQARgAIAEoATAAOABA3t-Y_gRIAlgBYgVlbi1VUw&amp;cd=F7w9TwL-6ao&amp;usg=AFQjCNG2rbJCENvRR2_k6pL9RntjP66Rvg" rel="nofollow">http://www.google.com/url?sa=X&amp;q=http://www.beautyjunkiesunite.com/WP/2012/05/30/whats-new-anastasia-beverly-hills-lash-genius/&amp;ct=ga&amp;cad=CAcQARgAIAEoATAAOABA3t-Y_gRIAlgBYgVlbi1VUw&amp;cd=F7w9TwL-6ao&amp;usg=AFQjCNG2rbJCENvRR2_k6pL9RntjP66Rvg</a></p>
  
  <p>into this </p>
  
  <p><a href="http://www.google.com/url" rel="nofollow">http://www.google.com/url</a></p>
  
  <p>Is there anyway to make this array return the entire url instead of just part of it ?</p>
  
  <p>I have looked at the parse_url php page and it helps and searched the stackoverflow and found a couple of things I am just having a bit of trouble grasping the next step here. </p>
  
  <p>Let me know if I can clarify in any way</p>
  
  <p>thanks!!</p>