Jump to content

mr_zhang

Members
  • Posts

    46
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mr_zhang's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi cooldude832, Thanks for replying. Well, it's somehow kindda spidering and indexing service like Search Engines. So the script will go to the internet and parse the content of pages of websites out there (my client owns them, don't worry about yours. For some reason, which I can't share here, they don't allow me to put any script on the existing sites to make the job easier and faster), then do it's own calculation based on those pages. I'm hoping that it could parse like millions of pages in one go. I've also set the script to sleep() here and there to reduce the server load. I guess the sleep() won't affect the run time, will it? Last time I checked it needs around 2 to 5 seconds to get one page (yes, one whole page) with file_get_contents() so it really needs a lot of time to complete. So, I'm hoping that I can split the script into smaller chunks but still run them all in one go. Any suggestion? Regards,
  2. It's a cron job. Can't really tell you the program since it will break the agreement with my client. So, how to do it?
  3. Hi guys, I'm currently developing a php program that has a very long run time. I understand that I'm able to extend the run time. However, my hosting provider (it's a shared hosting) has somehow turn the option off so that I'm not able to change the run time of a php script. They said it's a security issue and they won't budge. So I have a question: Is it possible to separate a long file so that they have each own run time but called in one go? I think include() is not the solution of this, although I'm not sure. e.g. I have a cron.php that needs 20 minutes to finished while my hosting only allowed 5 minutes for php run time. This long file could not be executed fully. Then, I would like to separate them into 5 files: cron1.php, cron2.php, cron3.php, cron4.php (each 1/4 of cron.php functions) and cron.php (calls those 4 files) so that they all finished. So, it's like I'm running 4 files with their own run time. Is this situation possible? What is the solution? Regards,
  4. Hi Fenway, Thanks for the reply. Yeah I've met the page before when I searched through Google. Problem is, I can't put any file or modify anything with the source page. It's a merchant and affiliate relationship thingy. So, I have the right to display the content but I can't modify or upload anything. Any solution for this?
  5. thanks for replying. I want it to auto resize because some of the contents are long and some are short. So, moving from pages to pages might be "strange". I currently using a long 400px height to avoid the scroll bar. If it could be auto resize the height, then it would be "nice looking". Many restrictions? So it's impossible?
  6. Hi, I'm looking for a JS code that enables me to resize the height of iframe. The iframe is from external domain. So far I've found codes that enables from same domain. I understand php, but practically blind about JS, so codes would be appreciated. Regards,
  7. Thanks infid3l, That's great, it seems to be what I'm looking for. I'll try it. However, it brings me to another questions: - If I have several domains in several hostings, do I have to put the script on each and every domain? - or just each and every host? If so, how to determine which error log belongs to which domain? - Could I just put the script on 1 domain and let the script get all the error logs from all domains (which are in different hosting companies)? If so, how to do that? I mean how to determine the domains? Regards,
  8. Ok, thanks. But, how to access that path? Is it something like: fopen("http://www.site.com/var/log/error.log","r"); Won't it give a file/directory not found error? Regards,
  9. Don't worry of being a total noob. I'm also a noob, and as far as I can remember my 1st post is also a question If after checking that your host has php support like infid3l recommended, you need to do... First of all, FTP can NOT copy database. So when you downloaded all the files you still left the database out. You need to search for the web hosting control panel login address, along with the username and password to the web hosting control panel. Normally current web hosting control panel has an attached tool, mostly PHPMyAdmin, that is able to create backup or copy of the database. You also need to upload the database the same way to the new server, using the control panel, not the ftp. Second of all, some files can NOT be copied by FTP because you "filter" it, accidentally or not. E.g. CuteFTP has a normal and default "list" command to list all the files on the server. This won't copy the .htaccess file for example. You need to activate "list -a" command on the FTP software to copy ALL the files. Try to reconfigure your FileZilla. Lastly, you need to manually search all those .php files and see the database login information. Probably on login.php or something similar. You need to change 4 things: the database host, username, database name, and password according your new web host. Try doing those. Most of the time, because of the missing database or .htaccess file, all kind of problems will arise. Probably after doing those things all your problems will just gone. After you copy all the files and DB, come back here if you still have problems. Regards,
  10. Ow, sorry. You mean, simple autoresponder? I'm getting the impression that you want to have a complete autoresponder like GetResponse.com For simple autoresponder, which only sends emails back to the user without storing the data (and nothing else actually), you could just: form.php <form action="process.php" method="post"> name: <input type="text" name="name" /><br /> email: <input type="text" name="email" /><br /> <input type="submit" /> </form> process.php if ($_POST) { $name=$_POST['name']; $email=$_POST['email']; $message_body='Text you want'; mail($email,$message_body); } Why don't you set it up with your host. I mean most web hosting nowadays have simple autoresponder pre-set. You just type the message and done. Regards,
  11. Creating auto-responder, although easy, is quite time consuming, so I doubt you'll get snippet of codes here. Basically: - Create form.php where you ask people's name and email - Create process1.php where you get those data and put it into (e.g. mysql database) temporary table. - Process1.php then send an email using mail() to ask for confirmation. Include link to process2.php along with the appropriate parameter (the data). - Process2.php will be activated when user click the confirmation link. - Process2.php will then record the data(name and email), plus the time of registration to permanent table. - Process2.php also erase the data from the temporary table. - Lastly, process2.php echo the success message to the user. Done. - Next you create a back-office system where you get all the emails from permanent table and send them one by one. (so that you are able to send emails to them) - That's it, basically. If you have zero idea what to do, you could get many free autoresponder scripts out there ready made for you. Just install it and you're done. Try google it.
  12. Hi guys, I understand that we can log on to our host and download the access.log and error.log (or similar file) for our website. Is there a certain path where I can access those logs without actually logging in to host control panel? I mean, is there a path where my program can get those files without downloading it to my computer? Regards,
  13. OK, I've asked my host about this. After long "conversation" (they don't provide programming support) they said the problem is because the PHP in their server is executed via CGI. That means the "Options" directives are set automatically. Thus if I set it manually it will give error 500 (server error). Anyone know who to fix .htaccess for my problem?
  14. Hi sKunKbad, Following your suggestion I made the .htaccess into Options FollowSymLinks RewriteEngine on RewriteRule ^(.*).php /parser.php?this_file=$1 It gives error 500 Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think this is a server error, please contact the webmaster. Error 500 sub.site.com Wed Jul 11 03:27:53 2007 Apache/2.0.54 (Debian GNU/Linux) mod_auth_pgsql/2.0.1 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_perl/1.999.21 Perl/v5.8.4
  15. Thanks for the suggestion sKunKbad, however the code gives error 404 file not found. When I try to erase the "/" in front of "/parser" it reads the parser.php correctly however it still gives "parser" as the result of "this_file" parameter instead of the correct parameter. Any idea how to fix this? Regards,
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.