I am working on a page that demands that a certain php code is included at runtime - however, at some point in the code below, the variable in that included file is to be rewritten by a remote curl POST request, so I need to re-include the file to read the new value of the variable.
Can I "include" it again to reload the new value? Or is a double include of the same file within the same code not allowed?
EDIT:
Here's what I'm doing exactly:
include a file, that contains 1 variable
run a check in an online API to make sure the URL from the variable is not in the database
if it is, initiate a cURL POST request to a page on my second domain, that starts a chain of events there
after that chain is completed, the second page sends a cURL request to another page on my first domain - the request contains another URL which it passes to a page on my first domain, which in turns grabs that and overwrites the initially included file with the new value for the variable
back to my initial code - I now have a new value for that previously included variable, so I need to "reload" it somehow, because I will be using it a bit later in the code of the same page; won't re-including the file be best?