infinite
04-02-2002, 06:29 PM
Hi,
does anyone know how I can run a php script, at certain time intervals, say every hour, to look up and see if a domain has expired, like snapnames does?
I could use a kron job, but how do I run a php file on linux without a browser? any other ideas?
any replys appreciated :)
The general idea is like this:
#!/bin/sh
whois domain > result.net
diff result.new result.old
mv result.new result.old
infinite
04-02-2002, 07:04 PM
but my code is in php, and I don't think I could re-write it easily.
is there a way of calling php from the command line, and put output to /dev/null , and just rely on emails form the script?
Use lynx. I don't know what the command is but a cron job that calls something like:
/usr/bin/lynx yourphppage.php
Should work..shouldn't it?
JDF
you can also use CGI build of php and call it from command prompt.
#!/your/path/to/php.cgi -q
<?
php code here...
?>
all of this in one file with #! << first line of code.
you can also call it from cron :)
jakis
04-03-2002, 10:26 AM
whois didn't show you domain availability. Go apply to opensrs resellers and write script to check from their port. Domains being expired will be re-registered in no longer than 1 hours. where whois will update in the next one day or more.
infinite
04-03-2002, 02:57 PM
masood: I think this should work, thanks!
jakis: do I have to join opensrs to do this? do they not just check their own whois server?
jakis
04-03-2002, 03:24 PM
Hi, forget whois, opensrs has other system that does real-time update with registry server while whois doesn't. and only their resellers are allowed to use this system. I just hope nobody abuse it since their server was unavailable from time to time.