php - obsfuscate a request url inside javascript using Laravel/Ajax -


i'm not sure if great idea or can accomplished, need this. so, i'm trying obsfuscate url has used in javascript parameter. :

<script>  myfunction({   id : 'my-id',   url : 'http://www.my-open-url.com'  }); </script> 

now, want is, use other open url in way :

<script>  myfunction({   id : 'my-id',   url : 'http://myapp.com/url/encrypted'  }); </script> 

so have controller , method ready can return expected url if encrypted url hit :

route::get('url/encrypted' array('uses'=>'urlcontroller@returnurl')); 

the returnurl method can this

public function returnurl(){      //some algorithm obtain original url database goes here      return 'http://www.my-open-url.com'; //the actual url returned script  } 

to put simply, don't want users "view source" , see real remote url i'm using obtain other site.

so, possible use sort of ajax call inside script obtain url controller real-time ?

i'm not sure if make myself clear. advices , edits , moderation welcome :)

thanks lot in advance.

as far know, impossible. can correct me if i'm wrong.

but purpose of obfuscating url? can suggest other ways accomplish task.

when right click , view source, seeing original "text" of document before javascript alters structure ran.

when page loading or after page has loaded, can inspect element see final results of document after has been modified using javascript.

if going send decrypted url client, can see network traffic , inspect contents using google chrome.

enter image description here


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -