从PHP中的URL获取pdf文件名

I want to get the pdfname from a URL generating the pdffile.... here is the link

$pdflink = "http://example.com/a.php?action=getSubmissionPDF&sid=".$sid."&formID=".$formid;

$pdflink is having the sid i.e form submission_id... with this sid name of the pdf file is generated

when i click on this url the pdf is generated with the name of $sid.pdf like 34556677.pdf

how I got the pdf name from this url??

I want to save this pdf file in infusionsoft filebox..

$filename=$_GET['sid'].".pdf";// filename
$contactId=5865;//contactid
$dataEncoded = base64_encode($pdflink);
$uploadFile = $app->uploadFile($filename, $dataEncoded, $contactId);

from this code the file is opladed in filebox bt not able to open the file because it shows the file is damaged and error msg it generates

when i download the file from filebox then it displays file is damaged not able to open the file in adobe...

use this to get sid value from url $_GET['sid']