PHP - Online Tool To See What Php Outputs Server Side?
Sorry if this is a silly question lol.
I want to know if there is an online tool I can use to check and see what PHP code will ouput server side. For example: <?php $tomorrow = mktime(0, 0, 0, date("m") , date("d")+1, date("Y")); ?> Similar TutorialsSo I am trying to make my life easier at work. I have this idea that I can automate the sales quote via a simple website. I have the entire product list in MySQL and I can query for the individual catagories etc etc and get them to display. The display shows the SKU, Description, Price, and a third field to select quantity. The issue is that once they select a quantity of a paticular line item I need that line item (sku, description, and price fields) to be carried over to the final quote page where the math is done. Not sure how to key the paticular line item fields off the quantity field. Any ideas greatly appreciated... Code: [Select] <?php $query = "SELECT * FROM tbl_prods WHERE cat = 'fruit'"; $target = mysql_query($query); confirm_query($target); while($row = mysql_fetch_assoc($target)) { ?> <form action="quoter.php" method="POST"> <tr> <td><input name="sku" type="text" value="<?php echo $row[sku]; ?>" size="20" /></td> <td><textarea name="desc" cols="150" rows="2"><?php echo $row[desc]; ?></textarea></td> <td><input name="price" type="text" value="<?php echo $row[price]; ?>" size="20" /></td> <td><input name="quantity" type="text" value="0" size="3" maxlength="2" /></td> </tr> <?php } ?> </table> <input type="hidden" name="cust" value="<?php echo $cust; ?>"></p> <input type="hidden" name="reg" value="<?php echo $region; ?>"></p> <input type="submit" name="submit" value="Submit"></p> </form> I have a web portal which is scripted using client side scripting language i.e HTML. I want to create a login page in .php and want the other pages to be in .hmtl. Can i do so? I want to do this because i want the login password to be stored in a database. Also I want the password to get encrypted (by either MD5 javascript or OpenSSL ) when user enters it inside the login form. I cannot create the entire portal in php because my portal makes use of C code. And php doesn't have an interface with C language. Can a user get directed to a .html page after a secure login from login.php page ? My main aim is to secure the access to my web portal using a password. I tried to authenticate the login using javascript where the password was stored in an array. But i feel any one having moderate knowledge can easily break that password. Any help would be greatly appreciated!! is it true that all the server side code runs before the client side code when accessing a webpage? if that is true, what about PHP code that is embedded inside HTML tags? wouldn't that result in an error a lot of times? I wish to create validation rules once which are used both on the client and on the server.
For instance, I will start off with the following PHP object:
stdClass Object ( [rules] => stdClass Object ( [email] => stdClass Object ( [required] => 1 [email] => 1 [remote] => stdClass Object ( [url] => check-email.php [type] => post [data] => stdClass Object ( [username] => function() {return $( '#username' ).val();} ) ) ) ) [messages] => stdClass Object ( [email] => stdClass Object ( [required] => an email is required ) ) )When the edit page is downloaded to the client, I will include this object in some format suitable to the client. The client will then use the jQuery Validation plugin (http://jqueryvalidation.org/) along with the validation object, and client side validate the page. When the form passes client side validation and is uploaded, PHP will use the same validation object to serverside validate the form (I have this part working as desired). My question is how should I pass this data to the client? Originally, I would just use PHP to write some JavaScript. exit('var myObj='.json_encode($myObj));Note that when I json_encode the object, the value of $myObj->rules->email->remote->data->username is a string with quotes around it, however, I can easily use PHP to strip these tags before sending it to the client. As Jacques1 pointed out in http://forums.phpfre...ascript-client/, I should never ever use PHP to generate JavaScript, and should use AJAX to download the JSON directly. I tried doing the later, but found that a callback function could not be included in the JSON. Please advise on the best way to accomplish this. Thank you Code: [Select] Hi, I am calling the sms service provider server with the following code $url = $urlAccount_home."?username=".$userAccount."&password=".$passAccount."&number=".$number."&sender=".$userSenderSMS."&msg=".$msg; if (!($fp =fopen($url,"r"))) echo "<br><center>خطا في الاتصال </center><br>"; $result =fread($fp,10); fclose($fp); When sending sms to 1 person no problem, but when sending sms to more than 1 person example for a group, i will poll the serve in loop... what am afraid is calling the server more than once continuously, wont affect the service? I've been looking for a simple script that would connect to a game server to see if it is still online. I've found many, but not one of them work. They will permanently send back the text "Online", or "Offline". This is the simplest code I have found: <?php $ip = "66.79.190.40"; $port = "27960"; if (! $sock = @fsockopen($ip, $port, $num, $error, 5)) echo '<B><FONT COLOR=red>Offline</b></FONT>'; else{ echo '<B><FONT COLOR=lime>Online</b></FONT>'; fclose($sock); } ?> I'm also looking into getting it to pull the map name and player-list, but I should be able to figure that out on my own once I get this working. If it helps, this script is supposed to connect to the original Quake games(One, two, and three). Hi, I have a some online backup software call ahsay, I' am looing to create a API call with a form in PHP Please check out this link www.123-backup.com/obs-admin-guide.pdf this is the guide to create a api for the online backup (page 69) Would some be intrested in creating this api call and php form for me ? p.s please see attached image this is something i'am looking for. if so how much would it be please email me if you want more info! Is it possible to simply fetch from the server(mySql) and then dump it online through a PHP page? Is there some link that you can share? I'm trying to learn how to validate a form using the php server side method. Everything I search is very different and old. Anyone have knowledge of a good tutorial or source that I could use? None of my books have anything about it either! Thanks! I have a text box and a submit button. I want that when the submit button is pressed, the value on the text box will be checked if it matches the values that are on my server before proceeding, and if they don't match it should give an error report and stop. All I can make myself is the text box and the submit button, I have tried for hours to find a way to do the rest, but all I can find on the internet are vague explanations and information that a novice like me cannot use. It would be a shame to let me web site that I have worked hard on to go to waste because I cannot do this myself Thank you in advance I am doing server side validations using php and jquery.Its validating properly.But problem is the erros messages are displaying on the top of the page.I want to display side of field.All of the validations store in array.How to display errors to side of the field. hello, since php is run server side, can i launch a program (.exe) on the server from a link? Hello,
I want to grab some data using a script from this site.
But I am stuck right at the beginning. If you make a selection with the drop down boxes you get some output. For example you select:
Selecteer competitienaam: Najaarscompetitie 2014 Selecteer competitiegroep: Eredivisie dames Selecteer weergave: Programma (incl. uitslagen en stand) Optioneel poule filter: De Treffers R Selecteer poule(s): Eredivisie - Poule A I want to grab this output. When I look at the page source it is inside an iframe: <iframe src="http://www.nttb-competitie.nl/" width="100%" height="1200" scrolling="yes" frameborder="0" name="NTTB_Competitie"></iframe>I figured out: The script on the site first it gets url: http://www.nttb-competitie.nl/selectie.php?anr=0And after last selection it gets url: http://www.nttb-competitie.nl/web_programma.php?reset=0&pidString=1009267&sc=0&vastgesteldeAfdelingsnr=0&cnid=10085&cid=10704&view=programma&pf=1269&pid=1009267My problem is when I copy those URL's in a webbroser I get a page with only the words: Ongeldige aanroep!Which means "Invalid Call!" So my question is: How can I grab the data instead of this stupid message. Is it even possible or is it somehow protected? Please help! Basically what I am trying to achieve is making sure any $page called originates from my server, but if no $page is defined, to include a default page I have set up. This is my code, and I cannot figure out what's wrong with it. Code: [Select] <?php $path = 'pages/'; $extension = '.txt'; if ( preg_match("#^[a-z0-9_]+$#i",$page) ){ $filename = $path.$page.$extension; include($filename); } if (!$page) include 'pages/main.txt'; ?> An example URL I am using is www.mywebsite.com/index.php?$page=pages/tester What am I doing wrong? I hope I'm posting in the correct forum. If not, I'm super sorry! Anyways, I need help with a website I'm working on. We have been asked to redesign our "Apply Online" page. My supervisor has asked that I find the correct code to make an upload button that will allow users to upload their resumes to our server, and send a copy to the specific branch they indicate (we have 17 branches). Could any of you point me in the correct direction for this code? I've seen several sites for Uploads to servers, but I'm worried this isn't exactly what we are looking for. Hey guys just thought I'd introduce myself as it's a polite thing to do.
My name is Nick I am currently a front end developer and love learning new technologies so it looks like PHP is my next step.
I hope to learn and give whatever knowledge I can back
Hi I am presently writing a code which does the following steps given a site 1) get some keywords (written a function for it) 2) search google for these keywords (I have used curl and getURL functions for these) 3) perform keyword search in the first page of googles results. Presently I have used curl and curl_multi_getcontent but when i run the code it consumes 100% of my server. My server will not respond in this case if someone else pings. I have been trying to do pcntl_fork, but could you let me know how to optimize this code by threading and forking. I am a newbe in PHP please let me know the structure of how to invoke multiple threads and process the same. If you have someother suggestions please let me know that too. Hi all. I have a video upload page utilizing ffmpeg to convert to .flv format via ajax with progress bar. Currently I am having an issue where the user uploads the video however the same upload script also converts to .flv format (exec("ffmpeg -i etc..")) after the file is uploaded. This is working fine however if the user selects to move away from the page after the video is uploaded it is causing the users browser to lockup (and sometimes crash). How can I make the exec() command to convert the video format strictly run server side and allow the user to move away from the page even though the conversion is still processing? Thanks for any advise on how to handle this issue. |