Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google pagerank curl call using php

i read an article regarding google rank and i wanted to create a php script that get the page rank using curl in php - i endded up using this script:

http://www.brightyoursite.com/blog/2010/06/01/use-php-to-get-google-page-rank/

now when i run it i get on my ubuntu:

Fatal error: Call to undefined function curl_init() in /var/www/googlerank.php ....

like image 771
Adéline Avatar asked Jan 25 '12 12:01

Adéline


1 Answers

You have to install php5-curl.

On Ubuntu or Debian, you can do this by running either apt-get install php5-curl or aptitude install php5-curl depending on which command you use to manage your packages.

You can see whether it is currently installed or not using the command aptitude show php5-curl.

It is always good to keep a PHP script with only this code:

<?php phpinfo() ?>

The above code will print a lot of information about server, the request, installed packages, etc. that are useful for diagnosing issues. If php5-curl is installed, you should find a section for 'curl' in the output here.

like image 124
Susam Pal Avatar answered Oct 20 '22 17:10

Susam Pal