Abhishekphp Posted September 10, 2013 Share Posted September 10, 2013 i have want to include external geturls.php located in other domain, on select option of omain in same forum single sub,it button how to switch include include('domain1.com/geturl.php')include('domain2.com/geturl.php').... <body> <? include('geturl.php'); ?> <script type="text/javascript"> function ismaxlength(obj){ var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "" if (obj.getAttribute && obj.value.length>mlength) obj.value=obj.value.substring(0,mlength) } </script> <?PHP $id = md5(rand(6000,99999999999999991000)); ?> <td style="text-align: right;" colspan="21"> <font size="-1"><span style="font-family: Helvetica,Arial,sans-serif;"> <form method=post action="http://order.<?php echo $yourdomain?>/register2.php"> <table id="regtab"> <tr><th>Username<td><input type=text name=username size=30 value="" maxlength="16" onkeyup="return ismaxlength(this)" ><select size="1" name="website_category"> <option>domain</option> <option>domain1</option> <option>domain2</option> <option>domain3</option> <option>domain4</option> <option>domain5</option> <option>domain6</option> </select> <tr><th>Password<td><input type=password name=password size=30 maxlength="8" onkeyup="return ismaxlength(this)" > <tr><th>Email Address<td><input type=text name=email size=30 value="" > <tr><th> <td> <tr><th>Site Category<td> <select size="1" name="website_category"> <option>Personal</option> <option>Business</option> <option>Hobby</option> <option>Forum</option> <option>Adult</option> <option>Dating</option> <option>Software / Download</option> </select> </td> <tr><th><td> <tr><th>Site Language<td> <select size="1" name="website_language"> <option>English</option> <option>Non-English</option> </select> </td> <input type=hidden name=id value="<?PHP echo $id; ?>"> <tr><th>Security Code<td><img src="http://order.<?php echo $yourdomain?>/image.php?id=<?PHP echo $id; ?>" width="200" height="75"> <tr><th> <td> <tr><th>Enter Security Code<td><input type=text name=number size=30> <tr><th> <td> <tr><th colspan=2><input class="tempbut" type=submit value="Register" name="submit" align="left"> </table> </form> </body> </html> below is get url code <? $yourdomain = $_SERVER['HTTP_HOST']; $yourdomain = preg_replace('/^www\./' , '' , $yourdomain); $yourdomain = ucfirst($yourdomain);?> Quote Link to comment https://forums.phpfreaks.com/topic/282034-how-change-include-path-on-diffrent-select-option/ Share on other sites More sharing options...
Abhishekphp Posted September 10, 2013 Author Share Posted September 10, 2013 i want to include external geturls.php located in other domain, on select option of domain in select option single submit how to switch include include('domain1.com/geturl.php')include('domain2.com/geturl.php').... Quote Link to comment https://forums.phpfreaks.com/topic/282034-how-change-include-path-on-diffrent-select-option/#findComment-1448951 Share on other sites More sharing options...
.josh Posted September 11, 2013 Share Posted September 11, 2013 include Quote Link to comment https://forums.phpfreaks.com/topic/282034-how-change-include-path-on-diffrent-select-option/#findComment-1449097 Share on other sites More sharing options...
Abhishekphp Posted September 11, 2013 Author Share Posted September 11, 2013 how to change include path when user selects different Quote Link to comment https://forums.phpfreaks.com/topic/282034-how-change-include-path-on-diffrent-select-option/#findComment-1449126 Share on other sites More sharing options...
Muddy_Funster Posted September 11, 2013 Share Posted September 11, 2013 Since you clearly cant be bothered helping yourself what's the point? Josh gave you the link to answer your question, did you read the page? No, or you would have found this : When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags. If "URL include wrappers" are enabled in PHP, you can specify the file to be included using a URL (via HTTP or other supported wrapper - see Supported Protocols and Wrappers for a list of protocols) instead of a local pathname. If the target server interprets the target file as PHP code, variables may be passed to the included file using a URL request string as used with HTTP GET. This is not strictly speaking the same thing as including the file and having it inherit the parent file's variable scope; the script is actually being run on the remote server and the result is then being included into the local script. WarningWindows versions of PHP prior to PHP 4.3.0 do not support access of remote files via this function, even if allow_url_fopen is enabled. You need to be on a *nix box and have the propper settings and use the propper wrappers, even then the behaviour is different from a local system include using a file path. Now, untill you show some work on your end, like they say on Dragons Den - I'm out. Quote Link to comment https://forums.phpfreaks.com/topic/282034-how-change-include-path-on-diffrent-select-option/#findComment-1449128 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.