Solved

Two great scripts! :)

Posted on 2000-04-13
19
180 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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

13 Experts available now in Live!

Get 1:1 Help Now