Jump to content

403 Forbidden !


d.shankar

Recommended Posts

Hi freaks !

 

I am stuck up in a crossdomain issue i suppose :-\

 

 

I have a file in a remote server that displays that has the code like this

 

<?php

 

$var=$_GET['val'];

echo $var;

 

?>

 

Assume that this file can be accessed by www.remotedomain.com/test.php?val=12345

 

Now i need to access this file from my domain www.mydomain.com using cURL by sending the variable 12345 so that it processes and gets displayed into my page.

 

<?php

$nh=curl_init();
curl_setopt ($nh, CURLOPT_URL,"http://www.remotedomain.com/test.php?val=12345");
curl_setopt ($nh, CURLOPT_RETURNTRANSFER,1);
curl_setopt ($nh, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt ($nh, CURLOPT_TIMEOUT,15);
$source = curl_exec($nh);
echo $source;

?>

 

 

I have uploaded.. crossdomain.xml file in remote server too..

 

But when i run this code, i get a 403 forbidden error page.

 

 

Link to comment
https://forums.phpfreaks.com/topic/125050-403-forbidden/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.