Solved

Two great scripts! :)

Posted on 2000-04-13
19
181 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
  • 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
 

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Running a powershell task to call exe while logged off 8 63
exchange, scripts 3 61
Combine DSQuery result into loop script 6 52
Need to Modify a Script I found 5 93
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
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 while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

862 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now