Multi URL posting for NO AGENT URL feature campaign detail

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Multi URL posting for NO AGENT URL feature campaign detail

Postby Noah » Wed Jul 27, 2022 6:46 pm

// This script is designed to take a pipe separated group of urls and post them to each url as they exist.
// Here is an example string separated by a pipe
// '|';
//URLstring example for no agent URL
//This string above is what gets copied to the no agent url feature of the campaign detail view. Replace the with your first URL and same for the second
//The file name is multiurl.php
//Have fun!

if (isset($_GET["URLstrings"])) {$URLstring=$_GET["URLstrings"];}
elseif (isset($_POST["URLstrings"])) {$URLstring=$_POST["URLstrings"];}

// Split the urls into each
$parts = explode("|", $URLstring);

// Run the urls through a post
foreach ($parts as $urlmcc) {
// echo $urlmcc ."<br /><br /><br /><br />";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$urlmcc);
curl_setopt($ch, CURLOPT_POST,$urlmcc);
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$response = curl_exec ($ch);
// print_r($response);// Print the url
curl_close ($ch);
?> - Cool Vici Customizations - Hosted - Configured - Supported
P: 888-663-0760
Posts: 90
Joined: Tue Feb 08, 2011 7:14 pm

Re: Multi URL posting for NO AGENT URL feature campaign deta

Postby carpenox » Tue Aug 02, 2022 6:13 pm

Great contribution. You rock!

Alma Linux 8.6 | Version: 2.14-865a | BUILD: 220831-0850 | SVN Version: 3636 | DB Schema Version: 1666 | Asterisk 16.17.0-vici -:- 725-22-CYBUR -:- My Blog: -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3
Posts: 1923
Joined: Wed Apr 08, 2020 2:02 am
Location: Coral Springs, FL

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest