Google News RSS problem
Posted: Wed Aug 24, 2005 12:28 pm
I am parsing the news from google just fine, but I notice that when I click some of the links, if it doesn't think I am from google, it gives me a registration page. So, I am triyng to figure out how to send a custom referer when a user clicks a news link. What I have so far is:
I added an onclick statement to the link to execute the getlink($link), however as soon as the page loads, it pulls up the article (not reg form, so we know that it is sending the referer) within my page (at the placement of the getlink() statement. I was hoping to open it in a new window or just not in my page.
Thanks,
Brian
Code: Select all
function getlink($link)
{
$ch = curl_init("$link");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://news.google.com");
$data = curl_exec($ch);
curl_close($ch);
}I added an onclick statement to the link to execute the getlink($link), however as soon as the page loads, it pulls up the article (not reg form, so we know that it is sending the referer) within my page (at the placement of the getlink() statement. I was hoping to open it in a new window or just not in my page.
Thanks,
Brian