Get page title of view and panel page via url
For pannel you can pass the page title in url
let say xyz/page_title
then add content to panel and choose New custom content in the body field your code will somewhat look like

&lt;?php
  $title = arg(1);
  drupal_set_title($title);
?&gt;


check screenhot for better understanding:

For views its a simple 2 step process
step1: Set the view path to take the title as wildcard
i.e. your view path will be view_path/%


step2: now change the title field on views to use the title wildcard by changing it to %1 as this is the first argument in the url


hope it helps you :)