Jump to content

Doqrs

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    DoQrs

Profile Information

  • Gender
    Not Telling

Doqrs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks a lot, I had the ending heredoc bracket tabbed over and forgot it had to be aligned to the left
  2. thank you how would i be able to get the <<<EOF heredoc stuff to work if i also want to have actual php code and not just text? I wasn't able to get it to work with this: <?php $contents = <<<EOF header("location: somewhere"); EOF; $fp = fopen("dir/{$time}.php", "w+"); fwrite($fp, $contents); fclose($fp); ?>
  3. Hello I am looking to use fwrite to write a php script just as a counter opens up a .txt file. $filename = "dir/" . $time . ".php"; $filewrite = -My PHP script here with <? stuff ?>- $fp = fopen($filename, "w+"); fwrite($fp, $filewrite); fclose($fp);
  4. I've realized that the function i am attempting to do is similar to that of youtube converting your video to .flv format after you upload it. You can continue to browse the site with no functional adherents, but the server is still processing an assigned request on your behalf. .. maybe this helps?
  5. alright, so could you set up a basic layout of how the update_cron.php script would work? thanks a lot for your help
  6. I do want it to run every time someone is on uploaded.php (it only occurs after file uploads) because i want the server to transcode the file format but this takes a lot of time. During heavy traffic times, i think it would be a lot better to have multiple instances of updateID3.php running rather than have a cron job run every minute and pick up and transcode all of the uploads in the last minute (at 3am this could be none, where as it could be a dozen around 9pm).
  7. The only problem with that is it will be executing the function while the page is rendering. I want something similar to a cron job, which is independent of client actions. In the example i used above, when the user goes to uploaded.php, i want the server to run updateID3.php?id=123 regardless of whether the user closes out of uploaded.php or not, IE it is happening server-side. The functions on updateID3.php?id=123 are not quick, and would take a long time to render the page before uploaded.php is displayed if the file is simply included.
  8. any help is greatly appreciated. thanks
  9. so the question is: how do i do it?
  10. Hello Here is the scenario: I have a PHP page that a visitor visits after uploading a file. we'll call it "uploaded.php" within uploaded.php is some code which gets the $_FILES data, displays all the appropriate stuff, etc. In uploaded.php i would like to call another php file, example: updateID3.php?id=123, where id is a col in a mysql database. I want the updateID3.php file with params to be executed independent of the Client viewing the uploaded.php page. So the browser continues to parse and display the uploaded.php page while updateID3.php with parameters is running on the server (almost like a cron job but running instantly and only once) I hope i was descriptive enough. Thanks
  11. after much adjustment to suit the needs that i didn't list, i was able to get it to work. Thank you very much. :)
  12. Yes, I have actually run across this very script. Only problem i have with it is the $file variable and getting that to work. It doesn't seem to work when you give it the exact path (C:\Documents and....) but i am not very knowledgeable on what exactly the file form input is giving the php file. Thanks for the help
  13. Hello, I would like to have a file upload form with an action="upload.php". In the upload.php, i would like CURL or fsockopen to upload the file to a remote server via another file upload form and get/parse the output of the response page. I am fairly proficient with CURL but can not find out how to perform this task. Any help would be greatly appreciated. Thanks
  14. install phpbb, thats what i use for everything.. their session management is excelent. when you download it, only upload the following files/directories to your server: Directories: db, includes, language, templates Files: common.php, config.php, index.php, install.php, login.php This will give you the basic structure for a session management To make integration easier on other pages, make the following file (bbcon.php): [code] <? define('IN_PHPBB', true); $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); ?> [/code] Then on every page you want to require login stuff, do [code] include('bbcon.php'); [/code] to see if the user is logged in, use the $userdata array that is used through out the forum system [code] if( $userdata['session_logged_in'] ) {       echo "You are logged in as".$userdata['username']; } else {      echo "You are not logged in,<br>Please <a href=login.php>Login</a>"; } [/code] its a start, PM me if you have questions
  15. there really isnt anything 'unsafe' about anything you're talking about... i would suggest doing a switch, with all of the cases being the options that they can have. Then make the default case be an error if something went wrong. I'm not sure exactly what it is you're trying to do, but any number of things will work and nothing about them can be seen as unsafe or exploitable.
×
×
  • 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.