Solved

Two great scripts! :)

Posted on 2000-04-13
19
185 Views
Last Modified: 2013-12-25
hi...
I was visiting yahoo.com .... while i was searching for books (as much as i remeber), i accdently pressed the stop button (exactly after the first 3-4 search results)

Below the shown search results, i found the famouse words:
" Transfer Interrupted! "   BUT, unlike the other normal "Transfer interrupted"   this one was clickable, when i clicked on it it transfared me into internet visa site?

try it by yourself, in the search page, to see that the "Transfer Interrupted!"  are clickable!  

THE QUESTION: how did they do this? does anyone know a cgi script or so, that does this when the page viewing is "Interrupted"? Is it easy to write such a script?


The other question is about another cgi "trick"  i was visiting a site (thought i bookmarked it but i didn't :( ,  and at their front page i found this statemnt: " There are 547 visitors on this server NOW! "  to be frank, i am 100000% sure that they did not recive this number of visitors since they have launched their site!

I reloded the page and bingoooo  the number was 18 visitor only, reload again (immdeiatly) and the number was 410, the 900, then 13, then 45 etc.....  I checked their source, just to find that there are NO JAVA SCRIPT! , just a simple one-line code that says: <!--#exec cgi="/cgi-bin/numbers.cgi" -->  :)

so the trick is that they are useing a cgi script the prints a number (randomly) sellected from a group of numbers!
THE QUESTION: how did they do this? does anyone know a cgi script or so, that randomly prints a number from a givien group of numbers?
Is it easy to write such a script?
Thanks
0
Comment
Question by:windowsssss
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 4
  • +3
19 Comments
 
LVL 16

Expert Comment

by:maneshr
ID: 2712129

Answer to Question 2...

To make random numbers in a given range, inclusive,  you can use Perl's rand function.

here is a small  PERL script that does the above.


#!/usr/local/bin/perl

$lower=25;
$upper=50;
$random = int( rand( $upper-$lower+1 ) ) + $lower;
print $random,"\n";
0
 

Expert Comment

by:x25
ID: 2712888
Answer for Question 1:

 They didn't, a cgi is stdin/stdout language, it cannot do such thing like that, unless HTML tag is available.

 Netscape Navigator 4.x always Adds:

<PRE>
&lt;H3&gt; Transfer Intrrupted ! &lt;/H3&gt;
</PRE>

To the end of every incompleted HTML request.

 it is possible that that tag was presented in link tag (Search Results?)
or Ads (VISA?).

 x25
0
 

Expert Comment

by:x25
ID: 2712920
seems EE don't process HTML.

>> ..
>> Netscape always adds:
>> <H3> Transfer Intrrupted ! </H3>
>> ..
0
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

Expert Comment

by:smiale
ID: 2713556
To answer the first question:  you probably interrupted the transfer in the middle of an anchor that pointed to that site.  So while normally you'd display

<A HREF="adbanner">get your visa now!</A>results:...

you get:
<A HREF="adbanner">get you<H3>Transfer Interrupted!</H3>

The "Transfer Interrupted" is inserted by the browser.  But since it happened in the middle of an anchor, the message also points to that web page.

0
 

Accepted Solution

by:
d32coder earned 45 total points
ID: 2716876
TO make a link in Delphi, such as a clickable status bar...

Include ShellAPI in your Uses statement.

Create your text.

Set your OnClick Event for that component to a procedure.

In that procedure, use the ShellExecute command to launch the default browser to that site.

You can find help on ShellExecute parameters in the Windows SDK.



0
 

Author Comment

by:windowsssss
ID: 2717384
maneshr , thanks for your small perl script... wonted to ask you if you can work on it for some more time?
i have an idea about this script and wanted to ask if we can do it?

Thanks for your time, and thanks for the other's time
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2717426
sure i can work on the code for some more time.

i believe that your 2nd Q is answered.
however i would suggest that you wait till your 1st Q is answered too and split the points between the people who provided the answer to you.

Meanwhile, you can open a fresh questions which would pick up from where we left off here.

That way other experts can also provide input to your Q.

let me know your thoughts.
0
 

Expert Comment

by:x25
ID: 2717536
So, how will get the points ? me or maneshr ?
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2717613
in case you want to split the points (as i think you might want to), you can post your query in the "Community Support" forum (http://www.experts-exchange.com/Customer_Service/Experts_Exchange/)


they can then distribute the points to the appropriate people, as per your recommendation.
0
 

Author Comment

by:windowsssss
ID: 2718814
I will split the points, between x25   ,   smiale ,    d32coder , 30 points each... thanks foe all of you.

maneshr, i will post a new question... what do you suggets as a title? :)
0
 

Author Comment

by:windowsssss
ID: 2718816
Adjusted points from 88 to 90
0
 

Expert Comment

by:x25
ID: 2719027
so i guess i have no problem ..

 but i think smiale has just restated my answer in a better way, i acknowledge his efforts, but i still the one who answered it and deserve the points, not him !

 you have to be more fear, give me 50 pts, and him 10.
0
 
LVL 3

Expert Comment

by:darinw
ID: 2719544
Reviewing question.

darinw
Customer Service
0
 

Expert Comment

by:x25
ID: 2720309
No need to review ..

 i dnt  want my pointd . keep it . im "withdraw"-ing my answer ..

 im getting out of this stuped mess .
0
 
LVL 3

Expert Comment

by:darinw
ID: 2720645
Community Support has reduced points from 90 to 45
0
 
LVL 3

Expert Comment

by:darinw
ID: 2720646
Reducing points to one half to allow for split.

You can now accept one of the comments in this thread as an answer. To award the other Expert, you can create a new question in this topic area with a title of 'For ExpertName -- 1032769' using that Experts username.

Remember, the Accept Comment as Answer button is in the header of the comment.

darinw
Customer Service
0
 

Author Comment

by:windowsssss
ID: 2721218
Thanks for your answer.....
smiale: i have posted anotherquestion for you, please comment on it to have the other points.
the subject is : For smiale- 10327649
0
 
LVL 16

Expert Comment

by:maneshr
ID: 2722849
"maneshr, i will post a new question... what do you suggets as a title? :)"

i would suggest you use "To make random numbers in a given range" as the title.
0
 

Expert Comment

by:x25
ID: 2723153
[Edited by Community Support shortly after closing the x25 account]
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question