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

<?php
// 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
// 'http://127.0.0.1/noah/echo.php|http://127.0.0.1/noah/echo.php';
//URLstring example for no agent URL
//'http://127.0.0.1/mcc/multiurl.php?URLstring=http://127.0.0.1/noah/echo.php|http://127.0.0.1/noah/echo.php';
//This string above is what gets copied to the no agent url feature of the campaign detail view. Replace the http://127.0.0.1/noah/echo.php 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_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,FALSE);
$response = curl_exec ($ch);
// print_r($response);// Print the url
curl_close ($ch);
}
?>
MyCallCloud.com - Cool Vici Customizations - Hosted - Configured - Supported
Web: https://mycallcloud.com
P: 888-663-0760
E: sales@mycallcloud.com
Noah
 
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!

Chris
Alma Linux 9.3 | Version: 2.14-911a | SVN Version: 3815 | DB Schema Version: 1710 | Asterisk 18.18.1
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WhatsApp: +19549477572 -:- Skype: live:carpenox_3
carpenox
 
Posts: 2230
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 40 guests