The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
CronJob / Execute PHP file question?
I have a very simple php file I have created that dumps some table data to a file on my server. Can some one point me to some instructions on what needs to be added to the PHP file and what I should do in the scheduled tasks section of VBulletin to run the file automatically? I just need a nudge in the right direction...
If I direct my browser to the PHP page the script runs correctly and the dump file is created, but I am unsure on what to do to get VB to execute it automatically for me. Thanks, Code:
<?php $host = "localhost"; $mysql_user = "????"; $mysql_password = "?????"; $sdatabase = "????"; $slink = mysql_connect("$host", "$mysql_user", "$mysql_password") or die('Database Connection Failed. Wait a moment.'); mysql_select_db ("$sdatabase", $slink); $file = fopen("linkimages.pvc", "w"); fwrite($file,"/cmp=90 \n"); fwrite($file,"/bts=1200 \n"); fwrite($file,"/cdo=IvFxjSUmbcorg \n"); fwrite($file,"/irp=15 \n"); fwrite($file,"/ift=JPEG \n"); $urls = mysql_query("SELECT linkid,linkurl FROM adv_links ORDER by linkid ASC"); while ($urlrow = mysql_fetch_array($urls)) { fwrite($file,"| URL="); fwrite($file, $urlrow[1]); fwrite($file, " | "); fwrite($file,"ifn="); fwrite($file, $urlrow[0]); fwrite($file,"_t.jpg |\n"); } fclose($file); ?> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|