0

Is there a way to set a cookie throught a require from another website?

Lets say that I set on the first page of the following website "www.test.com" a require code like:

require('http://www.mycode.com.br/code.php');

And then make this require to set a cookie and perform some codes. Is there a way to do this?

Facebook does that, but they set a cookie on their website that integrates with the user's website. How can I perform something like this?

The "http://www.mycode.com.br/code.php" will also get the cookie and work with it to perform its actions.

Andre
  • 13
  • 6

1 Answers1

0

You can use curl in particular curl_setopt.

Read this question as an example:

PHP Curl And Cookies

Community
  • 1
  • 1
borracciaBlu
  • 4,017
  • 3
  • 33
  • 41