Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6590969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:21:57+00:00 2026-05-25T17:21:57+00:00

I would like to have a submit button on other people’s HTML pages (with

  • 0

I would like to have a submit button on other people’s HTML pages (with permission). When it is clicked I would like the code on that page to grab the url of that page, and send that URL to my server (the user will not be sent/linked to another page). Is this possible using only HTML and PHP?

— Edit —

I COULD link to another page as long as my server receives the url first, if that helps.

Is there any way to do this with just the html on the client page and php on my server?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:21:57+00:00Added an answer on May 25, 2026 at 5:21 pm

    assuming that you have jQuery there:

    <div id="track_button">Send URL</div>
    
    <script>
        function send_url(){
            $("body").append("<iframe src=\"http://yourdomain/script.php?url=" + encodeURIComponent(document.URL) + "\" style=\"width: 0px; height: 0px; border: none;\"></iframe>");
        }
        $(document).ready(function(){
            $("#track_button").button().click(function(){
                send_url();
            });
        });
    </script>
    

    “When it is clicked I would like the code on that page to grab the url of that page” this sentence implies following:
    1) there is element, published on the person’s X site
    2) “click” is usually made by human, most of the browsers support javascript – cannot you really use it?
    3) “grab url” — there are two methods: 1) use javascript; 2) relay on http_referrer as others suggested

    So, I have provided solution, where javascript (+jQuery) is used. jQuery can be dropped, and same effect can be achieved with plain JavaScript. If you are not permitted to put JavaScript, http_referrer is only thing that you can relay on. But it’s quite unreliable, as quite a few people have that feature turned off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a button that I would like to disable when the form submits
I would like to have a form that can submit to two different action
For example, would like 5 checks boxes to have their own submit button and
I have a button in my webpage with below code - HTML: <button type="submit"
I have a problem that I would like have solved via a SQL query.
I've created a php page with two forms but I would like to have
I would like to show a radio button, have its value submitted, but depending
I have two divs, one inside the other and I would like the small
While my code calculates, Id like the submit button to go from the RUN
I would like to have a reference for the pros and cons of using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.