(location distance/proximityof drupal7 )not filtering nodes 100miles or km from source point(venue)

Posted: Fri, Apr 27, 2012 - 05:26pm

Hai ,

Kindly send me the details of how to  get the nodes(destination point at definite distance from source point ( say,100milesor km away))displayed in view results,if filtered by latitude and longitude of another view(ie.source point lat&long being selected by user)?

Hi Preetha, please do not

  • Wed, May 09, 2012 - 01:15pm

Hi Preetha, please do not expect ready-made answers.
And can you please detail how are you associating a latitude/longitude to a node?

In any case, there are plenty of ways to calculate distance between 2 poitns, both server-side and client-side (including support from google maps):


Rahul Singla

node save with image fields

  • Fri, Jun 01, 2012 - 06:08pm


  i want to add a node using node_save . i have a doubt  about images adding  into node . i want to images add to node without download to the local server . image url taken from remote .iam doing like this way...


global $user;
$node = new stdClass();
         $node->type = 'hotel_image';
         $node->language = 'und';
       $node->field_image_hotel_id[$node->language][0]['value'] =123456;
 $url = 'http://m.travelpn.com/images/ari_atoll/hotel/0/080043/Guest_room_B_1.jpg';
$url= file_stream_wrapper_uri_normalize($url);
$filesize=remotefilesize($url) ;
function remotefilesize($url) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE); // 200
$filesize = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD); //filesize
if( 200 != $status )
throw new Exception('File not found!');
return $filesize;
$file = new stdClass();
  $file->fid = NULL;
  $file->uri = $url;
  $file->filename = basename($file->uri);
  $file->filemime = file_get_mimetype($file->uri);
  $file->uid = $GLOBALS['user']->uid;
  $file->status = FILE_STATUS_PERMANENT;

but i got an error  

Warning: filesize() [function.filesize]: stat failed for http://m.travelpn.com/images/ari_atoll/hotel/0/080043/Guest_room_B_1.jpg in file_save() (line 573 of /var/www/divya/travel-dev/includes/file.inc). ..

pls help me..


Hi preetha, please see my

  • Tue, Jan 01, 2013 - 09:56pm

Hi preetha, please see my reply here:


Rahul Singla