dwest100 Posted February 23, 2017 Share Posted February 23, 2017 Suffering from code blindness and sleep dep...help pls. Hi, This itty bitty function is driving me nuts with concatenation! PHP Code: function set_auction_visit_at_job($postid, $auction_end_delayed, $permalink){ `curl https://www.jamewswestpaintings.com/west-fork-river/ | at 23:50`; //curl $permalink | at $auction_end_delayed; add_post_meta( $postid, 'post_auction_visit_set', '1', true ); } As it is now, it does precisely what is expected. It executes the uncommented commands. I can see the at job on the server using atq on the command line. What I NEED it to do is execute the line that is commented out. However, no matter what I do to concatenate it together, it executes the at job repeatedly on the server. I go check if it worked each time and atq reveals multiple at jobs created. I remove them. I try a different concatenation use exec() instead of backticks...same result. Now my brain is fried lol! I have tried every way but the correct way :/ I assigned the concatenated string to a variable and tried executing that...same problem. I know this is simple concatenation but I am not seeing it. Any input would be GREATLY appreciated ! Quote Link to comment https://forums.phpfreaks.com/topic/303273-concatenation-diving-me-nuts/ Share on other sites More sharing options...
Jacques1 Posted February 23, 2017 Share Posted February 23, 2017 (edited) This is an awful hack even for WordPress standards. Dumping variables straight into a shell and accepting arbitrary commands from a remote(?) server is a sure way to get compromised. Tell us what you want to do, not how you think it should be done. What's the matter with those shell commands you want to execute? Edited February 23, 2017 by Jacques1 Quote Link to comment https://forums.phpfreaks.com/topic/303273-concatenation-diving-me-nuts/#findComment-1543259 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.