How to prevent curl or get_contents_file to access an external server on the page side

I ran into one problem for about 2 hours. Can someone give a solution that I will appreciate.

http://mydowmin.com/userdatapage.php Note: I do not want to access this outside world of the page using the Curl function

how to avoid this script

$ch=curl_init("http://mydowmin.com/userdatapage.php"); 
curl_setopt ($ch,CURLOPT_CERTINFO,1);
curl_setopt ($ch,CURLOPT_VERBOSE,1);
curl_exec($ch) or die;
print_r( curl_getinfo($ch) );

http://mydomain.com/datapage.php

I want to block the page for curling and file_get_contentfor access to the side. If you access this URL directly in the browser, it should be executed, but should not work in the Curl and Fgc functions.

+4
source share
3 answers

, , .

+2
+1

Ip . Ip , . awstats Ip, apache, .

order allow,deny 

deny from 137 141 003 101 //the ip address

allow from all
0

All Articles