Hi Dears!
I am thinking about working with remote data and receive or send data actually in external web sites. we have a large amount of examples in World Wide Web are working. For example: free online web tools like web stats OR Google's Ad Scene .... .
you know in such web services some code will generate for publishers and the publisher put generated code in her BODY of web page document( HTML file) and the system after that will work.
we can have count of visits for home pages, count of clicks on advertisements and so on.

now this is my question: How such systems Work? and how can I investigate and search about them to find out how to program them? can you suggest me some keywords? Which Titles should I looking for?

if my Q is not Clear I will Explain it more...

Dani AI

Generated

As noted, implementations vary. For the useful mental model is that most remote integrations use one of a few building blocks and a small surface for publishers to drop into their pages: a client-side widget (a tiny <script> that loads remote JS), an isolated iframe (sandboxed UI + postMessage for interaction), pixel/beacon requests for impressions, or a server-to-server REST API for feeds and management. The widget/iframe approach pushes work to the browser and is how many ad and analytics providers minimize publisher effort. For browser cross-origin rules see the CORS summary on MDN (https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS). For iframe messaging see postMessage (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage).

On the ASP.NET side you can either emit the small client widget into pages or call remote APIs server-side and render results yourself (useful to avoid CORS or to cache responses). A typical server call uses HttpClient; for example:

using System.Net.Http;
using System.Net.Http.Json;

var client = new HttpClient();
var data = await client.GetFromJsonAsync<MyDto>("https://api.example.com/publisher?id=YOUR_ID");
// render data into your view or serialize into JSON for the page

Practical cautions: sign or authenticate requests (API keys, OAuth), validate and escape any remote HTML to avoid XSS, follow Content Security Policy rules, and implement consent for tracking to meet privacy laws. For impression/click tracking providers commonly use 1x1 pixel beacons or redirect-tracking URLs; those are implementation details worth studying once you pick the pattern you want to build. For implementation reference and security guidance consult the linked MDN pages above.

Recommended Answers

All 2 Replies

Actuallly, it differs for each external site. I use three right now and each one is a tad bit different. You need to search the particular site for the code to use to include their information. Usually it is only one or two lines of html code that is needed.

Actuallly, it differs for each external site. I use three right now and each one is a tad bit different. You need to search the particular site for the code to use to include their information. Usually it is only one or two lines of html code that is needed.

I know about codes generated but i want to know how these codes work? how can i write a program(actualy an engine) that uses and connects to these codes in publishers page sources? how can i get some information about these and what technologies should i use?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.