Server IP : 149.202.105.228 / Your IP : 216.73.216.18 Web Server : Apache System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : atfycaf ( 116275) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/atfycaf/www/pdf/ |
Upload File : |
<?php include "../globalVars.php"; if (isset($_GET["pageURL"])) { $eventURL = $_GET["pageURL"]; $registerURL = $url . "pdf/". $eventURL ."-registrants.html"; $localPDF = $_SERVER['DOCUMENT_ROOT'] . "/pdf/event-registrants.pdf"; $PDFurl = "https://www.modsnetwebsitedesign.com/fab/eventsCreate.php"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $PDFurl); curl_setopt($ch, CURLOPT_TIMEOUT, 90); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type:multipart/form-data" )); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array( 'method' => "create", 'registerURL' => $registerURL )); curl_setopt($ch, CURLINFO_HEADER_OUT, true); $pdfResponse = curl_exec($ch); curl_close($ch); if($pdfResponse === false) { echo 'Curl error: ' . curl_error($ch); } else { $displayResponse = json_decode($pdfResponse, true); $eventsPDFURL = $displayResponse["eventsPDFURL"]; $getPDF = curl_init($eventsPDFURL); $fp = fopen("$localPDF", "w"); curl_setopt($getPDF, CURLOPT_FILE, $fp); curl_setopt($getPDF, CURLOPT_HEADER, 0); curl_setopt($getPDF, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") ); curl_exec($getPDF); curl_close($getPDF); fclose($fp); if (file_exists($localPDF)) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $PDFurl); curl_setopt($ch, CURLOPT_TIMEOUT, 90); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_HTTPHEADER, array( "Content-Type:multipart/form-data" )); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, array( 'method' => "destroy" )); curl_setopt($ch, CURLINFO_HEADER_OUT, true); $pdfResponse = curl_exec($ch); curl_close($ch); } } $pdfFile = file_get_contents($localPDF); header('Content-type: application/pdf'); header('Content-Disposition: inline;'); echo $pdfFile; } ?>