Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP Problem to CRONTAB + file_get_contents [Expert]

Reply
Thread Tools

ASP Problem to CRONTAB + file_get_contents [Expert]

 
 
Pseudonyme
Guest
Posts: n/a
 
      03-24-2010

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









 
Reply With Quote
 
 
 
 
Dan
Guest
Posts: n/a
 
      03-24-2010

"Pseudonyme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> 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

 
Reply With Quote
 
 
 
 
Pseudonyme
Guest
Posts: n/a
 
      03-24-2010


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.





 
Reply With Quote
 
Dan
Guest
Posts: n/a
 
      03-24-2010

"Pseudonyme" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
>
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
log4j & crontab Vuk Java 3 2 Weeks Ago 02:48 AM
Re: crontab library Guilherme Polo Python 0 10-24-2007 07:37 PM
crontab library Martin Marcher Python 0 10-24-2007 07:12 PM
still get a <defunct> using a python script in the crontab martijn@gamecreators.nl Python 2 09-19-2007 03:02 PM
appended crontab entries with py script rbt Python 3 09-20-2005 02:50 PM



Advertisments