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 3938426
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:11:00+00:00 2026-05-20T00:11:00+00:00

I am attempting to create a code snippet for a specific group of people

  • 0

I am attempting to create a code snippet for a specific group of people that have earned the right to put our seal on their website. The idea seemed simple enough at first until I tried to implement it through a different website for testing.

basically i want the user to have a code snippet like:

//include jquery for post
<script type="text/javascript" language="javascript" src="http://www.mysite.com/jquery.js"></script>

<script language="javascript">
    $.post("http://www.mysite.com/test.php", {requesting_id:"12345", requesting_address:window.location.host}, function(data){
    document.write(data);
  });
</script>

test.php checks the passed variables against an sql db. If the id they pass matches the web address asking for the file and if we have agreed to continue serving our logo to their page (true/false), it returns the image.

This works great as long as all of the files live on my server. It appears that the problem has to do with the fact that the php file seems to run not on my server but on the requesting server so the query doesn’t run.

Is there a simple way of doing this? I have spent hours searching for a method and I am out of ideas.

Thanks for the help!

  • 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-20T00:11:01+00:00Added an answer on May 20, 2026 at 12:11 am

    I would not use javascript for that and definitely not require all these sites to include jquery.

    If you are using php, the easiest thing is to serve an image from a php file. The image would look like:

    <img src="http://yoursite.com/image.php?request_id=XXXX">
    

    and you make a php script that serves an image based on the request_id.

    You would have to read an image from your server in php and serve it with a header("Content-type: image/jpeg") (in case of a jpeg…).

    If you have an image in a variable, the output (for a jpeg…) would simply be something like:

    header("Content-type: image/jpeg");
    imagejpeg ($image);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to create a MySQL snippet that will analyse a table and
I'm attempting to create a Please wait UIAlertView that will appear while my code
I'm attempting to create a new user using the following code snippet. using (var
I have some code where I'm attempting to create a temporary file to be
I am attempting to create a code that will move an actor to a
I am attempting to create a web page that will allow a user to
Consider this code attempting to create an Active Directory account. It's generating an exception
I'm attempting to create a text-based version of this game . Code: #include <iostream>
I am attempting to create python bindings for some C++ code using swig. I
I'm attempting to create an array of strings that represent the directories stored in

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.