
dwest100
Members-
Content Count
14 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout dwest100
-
Rank
Member
Recent Profile Visitors
1,269 profile views
-
Thanks much!
-
Hi, I have this curl string required by an email verification vendor I use. Inside my php file I wish to run it. Apparently there is a problem with the syntax as I’m getting the following error in the browser: ”Parse error: syntax error, unexpected '--' (T_DEC) in /var/www/html/wp-content/plugins/dw_functionality_plugin/dw_functionality_plugin.phpon line 398 Here is the code string: < curl --request POST\ --url 'https://api.neverbounce.com/v4/single/check?key={' . api_key . '}&email={' . email . '}; > any help much appreciated!
-
Debug_backtrace notice-what’s causing it in my code?
dwest100 replied to dwest100's topic in PHP Coding Help
Got it squared away! Thanks! -
Debug_backtrace notice-what’s causing it in my code?
dwest100 replied to dwest100's topic in PHP Coding Help
Thanks much! I will do that 🙂 -
I have this function which works except it throws a Notice regarding the 3rd line of the function. The Notice reads "Only variables should be passed by reference..." What am I doing wrong in that 3rd line—$caller = next(debug_backtrace()) [‘function’]; ? Thanks for any assistance! //EMAIL_ADMIN //Sends email to site admin if email testing services fail. //Only occurs if both primary and secondary services have failed. //Calls no other function. //Called by test_email function. //*************************************************************** function email_admin($email){ global $ful
-
Trouble with variable insertion in backticked curl command
dwest100 replied to dwest100's topic in PHP Coding Help
Good answer! After much searching and sifting on Google this works very simply: `curl "MY_WEBSITE.com/process_emails.php?url={$full_site_url}&domain={$domain}&site={$site_title}&title={$title}&permalink={$permalink}"`; Enclose entire php command string in backticks —same as typing shell_exec(command string)— Enclose entire argument to curl command in double quotes so the shell interprets the ENTIRE command. Enclose variables in {} instead of concatenating. Simpler and easier to read. The shell was halting the command after the first & because that's what -
Trouble with variable insertion in backticked curl command
dwest100 replied to dwest100's topic in PHP Coding Help
Obviously, I have reasons or I would not have bothered posting here. The two isolated strings are within my php code. To make a long story short, I am running the curl command to execute a separate php emailing process outside of my Wordpress site whenever there is a new post. There are 5000+ subscribers each getting an email notification. This technique will let them process in the background...safely. It's no more unsafe than Wordpress site itself. So can you simply answer the question? Which is about syntax I believe? -
When this code runs in my php file... `curl https://inklines.art/process_emails.php?url={$full_site_url}&domain={$domain}&site={$site_title}&title={$title}&permalink={$permalink}`; This is all that is sent to the shell: https://MYSITE.COM/process_emails.php?url={$full_site_url} What am I doing wrong in building the command??
-
I have the following object returned as a response to an external service request: QuickEmailVerification\HttpClient\Response Object ( [body] => Array ( [result] => invalid [reason] => rejected_email [disposable] => false [accept_all] => false [role] => false [free] => false => *********** [user] => ****** [domain] => ******* [safe_to_send] => false [did_you_mean] => [success]
-
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
-
Code: function set_server_jobs() { $permalink = 'https://www.jameswestpaintings.net/about/'; $auction_end_delayed = '23:40'; $curl_command = 'curl ' . $permalink . ' | at ' . $auction_end_delayed; shell_exec("'" . $curl_command . "'"); //echo $curl_command; } add_shortcode('test_curl', 'set_server_jobs'); Question: (Using Wordpress, thus the shortcode) I'm trying to get $curl_command to execute on the server but it isn't working. I echoed the command for testing and it is concatenated correctly. When I run atq on the bash shell no job is listed...meaning none was cr