Jump to content

Quasense

New Members
  • Posts

    3
  • Joined

  • Last visited

Quasense's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi , I wrote this code with C # And 50 of Google's search results will show c# code GwebSearchClient client = new GwebSearchClient("WWW.blogfa.com"); IList<IWebResult> results = client.Search(" Test ", 50); // foreach (IWebResult result in results) { listBox1.Items.Add(result.VisibleUrl); } The PHP code is the same as C # code ,But why only 4 examples displays? What changes should I do in the PHP code? php code <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php /** * google_search_api() * Query Google AJAX Search API * * @param array $args URL arguments. For most endpoints only "q" (query) is required. * @param string $referer Referer to use in the HTTP header (must be valid). * @param string $endpoint API endpoint. Defaults to 'web' (web search). * @return object or NULL on failure */ function google_search_api($args, $referer = 'http://localhost/test/', $endpoint = 'web'){ $url = "http://ajax.googleapis.com/ajax/services/search/".$endpoint; if ( !array_key_exists('v', $args) ) $args['v'] = '1.0'; $url .= '?'.http_build_query($args, '', '&'); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // note that the referer *must* be set curl_setopt($ch, CURLOPT_REFERER, $referer); $body = curl_exec($ch); curl_close($ch); //decode and return the response return json_decode($body); } $rez = google_search_api(array( 'q' => 'Test', )); //results[$x]->url; print_r($rez); ?>
  2. Hi friends, Thanks for taking the time to help The problem is there is no Persian characters in the page source. you can check it yourself! so how can I extract the Persian words? Thanks in advance
  3. hello. In this page has been most words search in Persian How can I extract the Persian words and links of these words ? Good Luck
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.