ASP Problem to CRONTAB + file_get_contents [Expert]

Discussion in 'ASP General' started by Pseudonyme, Mar 24, 2010.

  1. Pseudonyme

    Pseudonyme Guest

    Hi all !

    I have some questions to experts that relate to ASP SERVERS.

    1. Is that possible to recognize the platform of a website ?
    From example : If I take this website : http://www.latimes.com
    How do I know if it is PHP or ASP ?
    Is there a trick ?

    2. The CRON TAB. Monitoring the server through CRON tables is very
    useful.
    A CRON command that would execute a script every 10 minutes is :
    */10 * * * * sh /etc/cron-script/read-latimes

    Is that the same configuring a CRON event in ASP ?

    3. The Get-Web-Content function.
    To avoid the client-algo to be played by client browsers, we have the
    algo played one time by the server. (decrease the electricity bill of
    the user).
    How to get the content using ASP script ?
    In PHP : it is like this :

    $homepage = file_get_contents(''http://andersen.times.com/adveruser/
    adverpay.php?country=1270331545&time=1236928998');
    echo $homepage;

    What about in ASP ?




    Thank you very much dear Madams and Sirs, for your answer.

    ....

    By the way :"MSFT do not propose a tool to convert PHP code into ASP
    code. As an initial opinion, our consultant said that is a big mistake
    may be explaning why the stock price stays flat since the last 10
    years. A lack of new client acquisitions he said".

    ....
    Cougloff
     
    Pseudonyme, Mar 24, 2010
    #1
    1. Advertising

  2. Pseudonyme

    Dan Guest

    "Pseudonyme" <> wrote in message
    news:...
    >
    > Hi all !
    >
    > I have some questions to experts that relate to ASP SERVERS.
    >
    > 1. Is that possible to recognize the platform of a website ?
    > From example : If I take this website : http://www.latimes.com
    > How do I know if it is PHP or ASP ?
    > Is there a trick ?


    You can look for identifiable headers to try and figure it out, but as the
    code is executed server side in most cases it's not possible to tell. Given
    that most of the pages on the LA Times site have .aspx extensions it's most
    likely the home page is ASP.NET as well (.aspx is ASP.NET, .asp is Classic
    ASP). ASP.NET is not relevant to this newsgroup.

    > 2. The CRON TAB. Monitoring the server through CRON tables is very
    > useful.
    > A CRON command that would execute a script every 10 minutes is :
    > */10 * * * * sh /etc/cron-script/read-latimes
    >
    > Is that the same configuring a CRON event in ASP ?


    ASP doesn't have CRON events. It's a server side platform for executing code
    in response to HTTP requests through IIS. You could use a scheduled task to
    fire up a browser or a component that makes a HTTP request to the server
    running ASP, but that is outside the scope of discussions about ASP.

    > 3. The Get-Web-Content function.
    > To avoid the client-algo to be played by client browsers, we have the
    > algo played one time by the server. (decrease the electricity bill of
    > the user).
    > How to get the content using ASP script ?
    > In PHP : it is like this :
    >
    > $homepage = file_get_contents(''http://andersen.times.com/adveruser/
    > adverpay.php?country=1270331545&time=1236928998');
    > echo $homepage;
    >
    > What about in ASP ?


    In ASP you would use a COM component, such as ServerXMLHTTP, to process the
    request. ASP does not natively have a way to request contents from URLs.

    > Thank you very much dear Madams and Sirs, for your answer.
    >
    > ...
    >
    > By the way :"MSFT do not propose a tool to convert PHP code into ASP
    > code. As an initial opinion, our consultant said that is a big mistake
    > may be explaning why the stock price stays flat since the last 10
    > years. A lack of new client acquisitions he said".


    Your consultant is an idiot. Converting code between platforms is inherently
    problematic - not all language compilers have the same features. And there
    is no such thing as "ASP code" - ASP is a platform that can handle any
    compatible language, by default runs VBScript and JavaScript
    (JScript/ECMAScript), but it's also possible to use Perl or TCL if you have
    the appropriate parser installed.

    --
    Dan
     
    Dan, Mar 24, 2010
    #2
    1. Advertising

  3. Pseudonyme

    Pseudonyme Guest

    Thank you Don for your information that I carefully read.

    - configuring a CRON event in ASP ?

    Automatic events are very important to our friend-partner. Every 10-20
    minutes, he must do 3-4 jobs that only an AS-IS CRON event for ASP can
    do.... We will inquire regarding that feature.

    - retrieving HTML pages

    It sounds very important to retrieve HTML pages. Many example of use.
    We will search about ServerXMLHTTP for an AS-IS file_get_contents
    function from PHP.

    - PHP into PERL ?
    The Perl Language seems to be more powerful that PHP ? What do you
    think about that ?
    An automatic tool to convert ?
    A translator like translating italian into english ... some tools work
    so well in that matter !

    Thank you for your answer and comments, we will give your info to the
    consultant if we meet him again.

    Cougloff.
     
    Pseudonyme, Mar 24, 2010
    #3
  4. Pseudonyme

    Dan Guest

    "Pseudonyme" <> wrote in message
    news:...
    >
    >
    > Thank you Don for your information that I carefully read.


    It's Dan, not Don.

    > - configuring a CRON event in ASP ?
    >
    > Automatic events are very important to our friend-partner. Every 10-20
    > minutes, he must do 3-4 jobs that only an AS-IS CRON event for ASP can
    > do.... We will inquire regarding that feature.


    Then you'll have to find something else to do this for you - as I said, this
    something outside of the remit of ASP.

    > - retrieving HTML pages
    >
    > It sounds very important to retrieve HTML pages. Many example of use.
    > We will search about ServerXMLHTTP for an AS-IS file_get_contents
    > function from PHP.


    You'll find plenty of examples if you search.

    > - PHP into PERL ?
    > The Perl Language seems to be more powerful that PHP ? What do you
    > think about that ?


    I use VBScript, never used Perl on ASP. Tried Perl years ago, couldn't get
    to grips with it. I use PHP on Linux boxes, don't even use Perl on them.

    > An automatic tool to convert ?
    > A translator like translating italian into english ... some tools work
    > so well in that matter !


    I've never found one that doesn't end up making a mess of things. 100%
    conversion is in most cases not possible.

    > Thank you for your answer and comments, we will give your info to the
    > consultant if we meet him again.


    Given his advice to you so far, I'd find another consultant.

    --
    Dan
     
    Dan, Mar 24, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vuk

    log4j & crontab

    Vuk, Nov 17, 2004, in forum: Java
    Replies:
    3
    Views:
    1,156
  2. rbt
    Replies:
    3
    Views:
    372
  3. Replies:
    2
    Views:
    583
  4. Martin Marcher

    crontab library

    Martin Marcher, Oct 24, 2007, in forum: Python
    Replies:
    0
    Views:
    371
    Martin Marcher
    Oct 24, 2007
  5. Guilherme Polo

    Re: crontab library

    Guilherme Polo, Oct 24, 2007, in forum: Python
    Replies:
    0
    Views:
    431
    Guilherme Polo
    Oct 24, 2007
Loading...

Share This Page