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.
Comments
Post a Comment