[Solved] Redirect to URL with variable inside php

<?php if(isset($_POST[‘action’]) && $_POST[‘action’]!=””) { if(isset($_POST[‘username’]) && $_POST[‘username’]!=””) { header(‘Location: some_other_page.php?username=”.$_POST[“username’]); exit; } } ?> <form action=’index.php’ method=’post’> <input name=”username” type=”text” value=”” placeholder=”Insert username here”> <input type=”submit” value=”Go” name=”Go”> <input type=”hidden” name=”action” value=”do_redirect”> </form> 1 solved Redirect to URL with variable inside php

[Solved] How to solve this issue in a URL? [closed]

Your question is not clear. what i understand that seems u want to restrict user to modified url. you can user URL Referrer check on page load if Request.UrlReferrer.AbsoluteUri == null { Response.redirect(“home page”) } If someone tried to modify url it will alway return null and you can redirect to home page or some … Read more

[Solved] How do i check if my string contains certain words

It should work like that <button onclick=”myFunction()”>navigate</button> <script> function myFunction() { var url = document.URL; if (window.location.href.indexOf(‘brand’) > -1) { alert(‘yes’); } url = url.replace(‘.html’,’.php’) window.location.href = url; } </script> solved How do i check if my string contains certain words

[Solved] Get url as www.abcd.com?curr=USD

<form action=’www.abcd.com/aboutus.php’ method=’get’> <select name=”curr” id=’test’> <option value=”USD”>USD</option> <option value=”Euro”>Euro</option> </select> <input type=”submit” value=”submit”> </form> on your pages simply put <? $curr = $_GET[‘curr’]; ?> now on every link include abcd.com?curr=<? echo $curr ?> 9 solved Get url as www.abcd.com?curr=USD

[Solved] Remove only 3 characters after a specific string

You can use regex to selecting target part of string and run it in preg_replace(). $url = “http://aaa-aaaa.com/bbbb-bbbbbbbbbb-2/it/clients/”; echo preg_replace(“@(.*)\w{2}/([^/]+/)$@”, “$1$2”, $url); See result of code in demo solved Remove only 3 characters after a specific string

[Solved] Need php script just like used by mysmartprice dot com on Go To Store button (URL Cloaking) [closed]

I’m not 100% sure if I got your question right, but this is my guess of you mean: Use PHP’s header method like this: <?php if(!isset($_GET[“p”])) exit(“No parameter \”p\””); $p = $_GET[“p”]; header(“LOCATION: $p”); ?> Save the file as redir.php and then use it as http://mysite.com/redir.php?p=http://google.com/. 1 solved Need php script just like used by … Read more

[Solved] Find link URL in string not image

This will do it. Short explanations on how it works can be found in the codes comments: <?php # fixed syntax error string $string = “lorem ipsum http://google.com dolor sit amet <img src=\”http://img.com/img.png\” />”; function make_clickable($text) { # explode string on spaces to array $arr = explode(‘ ‘, $text); # test each array element if … Read more

[Solved] Download image from firebase to external sd Card using url [closed]

first of all create database ref and a File like this StorageReference downloadRef = FirebaseStorage.getInstance().getReference().child(“Wall/” + category + “https://stackoverflow.com/” + wall_id + “.jpg”); File localFile = null; try { String fileName = wall_id + “.jpg”; localFile = new File();//create your file with desired path } catch (Exception e) { e.printStackTrace(); } than call getFile on … Read more

[Solved] Encode string URL without using HttpServerUtility [duplicate]

var urlAbsoluteSample = “http://stackoverflow.com/questions/34075880/encode-string-url-without-using-httpserverutility?noredirect=1#comment55905829_34075880”; var labelText = “Encoded absolute URL: ” + Uri.EscapeDataString(urlAbsoluteSample); Encoded absolute URL: http%3A%2F%2Fstackoverflow.com%2Fquestions%2F34075880%2Fencode-string-url-without-using-httpserverutility%3Fnoredirect%3D1%23comment55905829_34075880 solved Encode string URL without using HttpServerUtility [duplicate]

[Solved] URL Redirect / URL Masking [closed]

Try creating .htaccess and putting the following in it: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^ICEEC$ viewjc.php?id=c5 [L] RewriteRule ^ICEEC/$ viewjc.php?id=c5 [L] </IfModule> Make sure that the viewjc.php is at the same directory as your .htaccess If you’re just trying to change URL address bar when someone visits particular page of your website, add this to … Read more

[Solved] How do I remove .html from my website pages? [duplicate]

You need URL rewriting. You need to go to your .htaccess file and write something like this. RewriteEngine On RewriteRule ^cv?$ cv.html [NC,L] If your user types in www.mysite.com/cv, it will show up contents of www.mysite.com/cv.html Last parts are flags. NC (case insensitive).L(last – stop processing rules) 0 solved How do I remove .html from … Read more