Jump to content

Rollins

Members
  • Posts

    36
  • Joined

  • Last visited

About Rollins

  • Birthday 11/06/1976

Contact Methods

  • Website URL
    http://Projectrollins.com

Profile Information

  • Location
    The Netherlands, Achterhoek
  • Interests
    Persons...
    Sleeping...
    Internet...

Rollins's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I Registered on http://www.mywebcron.com/home.php ....made a page that inserts a date and time in a DB when hit. tested it...works. setup the cron...tested it through their "execute" link, "check" wich gets the html wich worked...... and let it go for a day. Out of the 1200+ crons registered on their site i was hit....2 times. after 2 days still no reply from support... i think i will check some other sites...
  2. oke...thanks for those replies! ignore_user_abort is more used for keep running scripts already started...by what or who ever? i just found this site...did you ever hear from it? or anything like that? http://www.mywebcron.com/home.php
  3. hmm i would rather not leave my laptop on the entire day..and i travel sometime so... could it be triggered from a other website? and the code...could it run...with ignore_user_abort(true);set_time_limit(0); it should right?
  4. Hey all! i was wondering if you could help me with the following... I want to pull some data/file from a foreign server at a specific time, every day. data would be inserted in a DB for users to search data they require. i did some research and came on cronjobs....not supported by my provider unless i get a upgrade and that would more then tripple my costs. don't wanna do that.... then i figured that i could create a page that would run through even when the browser was closed....so i wrote this but it is unstable and fails on me more than halve of the time. the next step for the script would be checking conditions(read time) where right it would execute code to retrieve the files. session_start(); //ignore user abort ignore_user_abort(true);//error report ini_set('display_errors', 1); error_reporting(E_ALL);/get time $date = date_create();//echo time echo $date->format('Y-m-d H:i:s');//check//+1 every refresh //get count $counter = $_SESSION['counter']; //add 1 if($counter > 0 ){ $counter = $counter; } else{ $counter = 0; } $counter++; $_SESSION['counter'] = $counter; echo '<br><br>'.$counter.'<br><br>'; //refresh every 60 sececho '<meta http-equiv="refresh" content="60; url=http://www.some.link.com/GetDataFromURL.php">';?> there is one fault (afik) in this code and that is the time limit...not able to set it unless i turn of "save mode" in the provider settings wich limits the php-enigine to run harmfull scripts...(roughly translated). i have read about the socalled "poor mans cron"...run it on users pages but that would limit the users and i don't want that either...and there is no guarantee that there will be a user every day. is there hope for the script that i wrote? if so, how can i improve it? Is there a alternative/scripting for cronjobs? can the DB(mysql) trigger events? any thoughts and comments are welcome! Roll.
  5. Rollins

    foreach loop error

    assign a value to a key? foreach ($passerrors as $error=>$message) { echo '.$error.' is '.$message.' ; }
  6. how did you resolve this? i went for a second query to get the id after the insert because it was the easiest solution for me at that time...
  7. you can store the inserted data in a session....echo that in meme.php or use data as a reference for the query on you.php. you can do a second query on you.php to request the id with the inserted as reference in the where clause....store that in a session. guess if you use 'SELECT LAST(id) you could get back the wron id... there are other functions in sql but i never used any....check the answers from stackoverflow.com. looks quit complete....
  8. some googlin....presto! this looks like the same issue. http://www.qianqin.de/qtranslate/forum/viewtopic.php?p=5988#p6142
  9. filter_validate_url should catch a http://random.com type url from what i have found.... the example you posted has a double dot...if u use that to test it could screw up the results aswell. i think.... "That said www.xxxx..com will not PASS the filter."
  10. and i was wondering what you use for error reporting....
  11. it looks like you are comparing a extension against a entire array.... elseif(($vtype == $vall)){ echo 'this format is not allow';} maybe someting like this....?? elseif(($vtype != "mov") && ($vtype != "wmv") && ($vtype != "mp4") && ($vtype != "mpeg") && ($vtype != "flv") && ($vtype != "avi")){ echo 'format is not allowed'; }
  12. i would try replacing the "www." with "http://www.".... function add_http($text){// set http: on www. $text = preg_replace( '"www\."', "http://www.", $text );// remove duplicates after set $text = preg_replace( '"http://http://www\."', "http://www.", $text ); $text = preg_replace( '"https://http://www\."', "https://www.", $text );}
  13. what would this do? single quotes... if(result_lv.n == 'ben'){ trace('hit');
  14. i am not very familiar with your coding but....Q: Does n have value in the if-statement? this looks lika a echo and does not seem to give value to n... echo"&n=".$username;
  15. thanks for that example! that also means there is a distinct difference between a variable and the content of a variable....i always looked at them as just one thing. i think i will look at the sort functions at a later point....
×
×
  • Create New...