Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 778
  • Last Modified:

PHP urlize

Is there a way to change this HTML statement into a PHP statement -

<a href="jinzora_12-17/index.php">Search the Database </a>

maybe aurlize statement or something ?
1 Solution
I am not sure what you mean. If you simply want to print that string via a PHP script, you can use:

 echo '<a href="jinzora_12-17/index.php">Search the Database </a>';

If you mean something different, can you provide more details?
$url = "<a href=\"jinzora_12-17/index.php\">Search the Database </a>";

echo  $url;
mhoggatt1Author Commented:
Thanks for the replies. Let me check it and see if it's what I'm looking for.

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

if you mean to show the same line of code of HTML into PHP THEN

html code : <a href="jinzora_12-17/index.php">Search the Database </a>

in PHP : print "<a href=\"jinzora_12-17/index.php\">Search the Database </a>";

Is it your solution . Please let me inform otherwise we will tell you further . please explain it :)

Try it and All the best

mhoggatt1Author Commented:
Ok I'm back at my desk now so Ill try these out this afternoon.

mhoggatt1Author Commented:
Is there a way to disable the View Source Code for the browser ? I don't want the href to show up in the source code. I believe the hacker is using it to break into my jinzora directory. That's why I'd like to find a way to hide the link or have some other way to use a hyperlink that doesn't show up. Any ideas ?

If you want the hyperlink to be useful, it will eventually show up in the browser. You can encode it, but encoding can be reversed.

However, if you are trying to redirect a user to a different site, and don't want the site to show up as a link on your page, you can do something like this:

<a href="http://www.yoursite.com/redirect.php?linkid=123">Go to link 123</a>

Then in your redirect.php script, you will have a way to match linkid #123 to an actual link, and use

 header("Location: xxx");

to redirect the user to that location. If you will simply be linking to locations in your site, however, there will not be a way to mask the URL in such a way that it cannot be revealed or discovered eventually.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now