Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:24:54+00:00 2026-05-23T12:24:54+00:00

I had this code that help me fetch the URL of an actor page

  • 0

I had this code that help me fetch the URL of an actor page on IMDB by searching “IMDB+Actor name” and givng me the URL to his IMDB profile page.

It worked fine till 5 minutes ago and all of a sudden it stopped working. Do we have a daily limit for google queries (would find it very strange!) or did I alter something on my code without noticing (in this case can you spot what’s wrong?) ?

function getIMDbUrlFromGoogle($title){
    $url = "http://www.google.com/search?q=imdb+" . rawurlencode($title);
    echo $url;
    $html = $this->geturl($url);
    $urls = $this->match_all('/<a href="(http:\/\/www.imdb.com\/name\/nm.*?)".*?>.*?<\/a>/ms', $html, 1);

    if (!isset($urls[0]))
        return NULL;
    else
        return $urls[0]; //return first IMDb result

}

function geturl($url)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1");
    $html = curl_exec($ch);
    curl_close($ch);
    return $html;
}

function match_all($regex, $str, $i = 0)
{
    if(preg_match_all($regex, $str, $matches) === false)
        return false;
    else
        return $matches[$i];
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:24:55+00:00Added an answer on May 23, 2026 at 12:24 pm

    They will, in fact, throttle you if you make queries too fast, or make too many. For example, their SOAP API limits you to 1k queries a day. Either throw in a wait, or use something that invites this kind of use… such as Yahoo’s BOSS. http://developer.yahoo.com/search/boss/

    ETA: I really, really, like BOSS, and I’m a Google fangirl. It gives you a lot of resources and clean data and flexibility… Google never gave us anything like this, which is too bad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had this working in an old code that I didn’t end up using...
I had posted a question in regards to this code. I found that JTextArea
A co-worker asked about some code like this that originally had templates in it.
Perl newbie here...I had help with this working perl script with some HASH code
Okay, so I've had this code that used to work just fine. I recently
I had this code: int foo(void){ return 1; } int main(void){ static const int
I was looking at an authentication system which had this code: # prevents a
I had tested this code: http://support.microsoft.com/kb/316383 It works, but a Word application is opened
Answer solved in edit below I had this piece of code Dictionary<Merchant, int> remaingCards
I was looking at the php.net manual and it had this line of code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.