Jump to content

how change include path on diffrent select option


Recommended Posts

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')....


<script type="text/javascript">

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)


$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">

<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>Software / Download</option>

<tr><th>Site Language<td>
<select size="1" name="website_language">

<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">


below is get url code

    $yourdomain = $_SERVER['HTTP_HOST'];
    $yourdomain = preg_replace('/^www\./' , '' , $yourdomain);
    $yourdomain = ucfirst($yourdomain);

Link to comment
Share on other sites

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.


Windows 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.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.