I have one url which is for sending and retrieving json data. Now I want to hide that url in such a way that it shows the something different but able to send and receive json data like http://freeprojects4u.com/setubandhmultiaction/setubandh.setubandh, this url is also sends and receives json data from this app: https://play.google.com/store/apps/details?id=com.setubandh&hl=en (Setubandh). but I think this site is in asp but I want to do same thing in php. Please help me doing this or suggest any guide or way or any link from where I can do this. Thanks. I had tried so many methods but it is not so satisfactory. Please suggest me any best way. (I had tried url masking using .htaccess)
Asked
Active
Viewed 343 times
1
-
Please give me any suggestion, your any kind of suggestion will be appreciated. – Ravi Bhalodiya Jan 06 '15 at 04:33
-
Hi Ravi, can you elaborate your need - "I have one url which is for sending and retrieving json data. Now I want to hide that url in such a way that it shows the something different but able to send and receive json data like" .. what exact type of url you want. I mean if you can share here the sample raw URL and the URL you expect to be. – Rakesh Lamp Stack Jan 06 '15 at 04:46
-
now url is like http://example.com/sendandreceive.php but I want this to be http://example.com/sendandreceive/sendand.sendand. also when http://example.com/sendandreceive/sendand.sendand is opened in browser it must need to be return null, means I don't want my data exposed to public.. Please help me. – Ravi Bhalodiya Jan 06 '15 at 04:50
-
look into [cURL](http://php.net/manual/en/function.curl-exec.php), it will make a request to a url without actually sending the browser there. the request will show up in the network portion of the browser's developer tools but there's no way to sanitize that unless you use signatures that require timestamps. – iam-decoder Jan 06 '15 at 04:58
-
@RaviBhalodiya So did you release your app? Kindly send the link I want to download – krv Apr 18 '17 at 06:39
1 Answers
0
Looking at what you have mentioned/elaborated in the further comments:
- Requirement#1 - Now url is like example.com/sendandreceive.php but I want this to be example.com/sendandreceive/sendand.sendand.
-> I think what you can do here is you can rewrite rule for the same in the .htaccess.
- Requirement#2 - Also when example.com/sendandreceive/sendand.sendand is opened in browser it must need to be return null, means I don't want my data exposed to public.
-> This also you can do in your .htaccess file where you can check the request's user agent and restrict it to only the mobile user agent access. You can create one page for the message saying request from a particular source/browser is not allowed (This page you can redirect to from your htaccess where you check your user agent. Refer this it may help - https://wordpress.org/support/topic/how-to-redirect-links-for-mobile-using-htaccess

Rakesh Lamp Stack
- 490
- 4
- 14
-
MAY I DO IT USING OS (lIKE ANDROID) MEANS IT ONLY NEED TO BE WORKED FOR ANDROID. This helped me. – Ravi Bhalodiya Jan 06 '15 at 05:04
-
Yes you can allow the access for only android like below in htaccess RewriteCond %{HTTP_USER_AGENT} ^.*Android.*$ RewriteRule ^(.*)$ http://android.davidwalsh.name [R=301] Replace this http://android.davidwalsh.name with your respective service url. If does not work you can explore a bit for this only Reference link : http://davidwalsh.name/detect-android – Rakesh Lamp Stack Jan 06 '15 at 05:10