/    Sign up×
Community /Pin to ProfileBookmark

Executing a remote function for inserts in DB

Hello!

I have managed to read a remote file into a variable and now made it a function using function_create, but the parameters im passing to it are not being loaded:

[code=php]
// in remote file
if( $thisIp == ”
|| $license == ”
|| $currUrl == ”
|| $comment == ”
){echo “<br><hr>They are empty!:<br>thisIp: $thisIp<br>license:$license<br>currUrl:$currUrl<br>comment:$comment<hr>”;} // return false;
// ….. much more code
[/code]

And in a local file:

[code=php]
$remFile = $this->readRemoteFile($remPath);
$doRemLog = create_function(‘$thisIp, $license, $currUrl, $comment, $isAttempt’,$remFile);
[/code]

The purpose of the remote file is to hold the code to connect to a remote database and do a simple insert from the parameters given, and in fact all [U]the insert is happening[/U] without errors, so it is connecting fine and everything but the parameters given to that function are not being loaded, if it [U]was [/U]a local and simple thing it would look like this:

[code]
function doRemLog($pa1,$pa2,$pa3){//code…}

doRemLog(1,2,3);
[/code]

but now I dont know what is wrong with this code, if you need to look at more code I can supply it.

Thank you for your insight

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @purefan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...