Jump to content

r3gan

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

r3gan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It will work for any page that has the ability to set a default or initial value to the form field. 
  2. Yeah it is possible, and yes you need to have access to an SMS Gateway machine.  It's basically a machine configured to receive & send SMS messages to mobile numbers.  The other way you could send SMS messages is if you knew the cellular provider for the destination phone number.  Most cellular companies allow you to send an SMS message as an email.  For example, if the destination phone number is 555-555-5555 and the cell provider is Telus (and you have a simple SMTP server running on your PHP machine), then you could send an email via php to 5555555555@msg.telus.com and the cell phone would receive an SMS containing the contents of your email.  Of course you can't send attachments or anything.
  3. This can be done by including a form on your page that submits to a PHP page running on your server.  This can be the same PHP page as the form exists in or not.  Here's a simple example: [code] <?php // // uploaded file processing // if (is_uploaded_file($_FILES["flImage"]["tmp_name"])) {     $newName = "some/path/filename"     if (!move_uploaded_file($_FILES["flImage"]["tmp_name"], $newName)) {       $pAction1Result = -1;     }     else {       $pAction1Result = 1;     } } ?> <form id="frmImgUpload" name="frmImgUpload" enctype="multipart/form-data" method="post" action="<? print $_SERVER["PHP_SELF"];?>"> <input type="file" name="flImage" id="flImage" size="90" class="text"> <input type="button" name="btnImgSubmit" id="btnImgSubmit" value="Upload Image" onclick="document.frmImgUpload.submit();"> </form> [/code] Files uploaded from a form are stored in the $_FILES superglobal variable, and can be checked/moved with the is_uploaded_file() and move_uploaded_file() pre-defined PHP functions.  Check out [url=http://ca3.php.net/manual/en/features.file-upload.php#features.file-upload.post-method]this PHP manual[/url] page for detailed explanation / reference.
  4. You might be able to accomplish this by simply finding out the variable names of the target site's form, and then passing the variables to that page.  For example, if the form's text field is named "userName", then you might be able just point to http://www.example.com/page?userName=myusername
  5. The copy & paste idea works for local files being required, however it doesn't seem to behave the same way for my remote file.  Here's the setup: [pre][size=10pt]------------------------------------------------------------------------- Local file: <?php // // some php code here // require("http://www.example.com/myDir/myFile.php"); if (isset($myVar))   print $myVar; else   print "variable does not exist"; ?> ------------------------------------------------------------------------- Remote file: <?php $myVar = "variable exists"; ?> -------------------------------------------------------------------------[/size][/pre] The example above prints "variable does not exist".  So the variable being created in the remote script is not sent back for use in the local php script.  Am I doing something wrong?
  6. Can anyone give me some help on using a require() statement to include a PHP script from a different machine?  I am able to call & run the script via the require() statement because there are print() statements in the remote script that are echoed to the browser when I run my page, however I cannot get it to return anything from the remote script back to my local script.  The remote script is a .php extension and the remote machine is configured to parse PHP scripts, so the code is being processed on the remote machine.  How do I set up that remote script so that it will pass results / variables back to my calling script that I can use??
×
×
  • 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.