Created
June 21, 2010 21:21
-
-
Save devrim/447511 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_4sq_venue_name($url){ | |
$curl_handle=curl_init(); | |
curl_setopt($curl_handle,CURLOPT_URL,$url); | |
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); | |
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1); | |
curl_setopt($curl_handle,CURLOPT_FOLLOWLOCATION,1); | |
curl_setopt($curl_handle,CURLOPT_HEADER,1); | |
$buffer = curl_exec($curl_handle); | |
curl_close($curl_handle); | |
$buffer = explode("</title>",$buffer); | |
$buffer = explode("<title>",$buffer[0]); | |
$buffer = explode("::",$buffer[1]); | |
$buffer = trim($buffer[1]); | |
return $buffer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment