Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent curl or file_get_contents for access my page out side server

I am facing one problem about 2 hour. Can anyone give the solution I will appreciate.

http://mydowmin.com/userdatapage.php Note: i do not want to access this page out side world using Curl function

how to avoid it 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 curl and file_get_content for access out side. If you access this url direct on browser it should be execute but should not in Curl and Fgc function.

like image 419
Bikash Nayak Avatar asked Oct 03 '22 09:10

Bikash Nayak


1 Answers

Browser can be simulated easily. this is not possible
php curl: how can i emulate a get request exactly like a web browser?

like image 122
Avi Fatal Avatar answered Oct 07 '22 19:10

Avi Fatal