|
Without knowing what exactly you're trying to achieve, it's a little hard to be specific.
Though, at a glance I'd say you want to do a GET via FTP to grab the file you'd like to put it in, followed by pasting the code into it, lastly by doing an FTP PUT to upload the modified file.
I'm assuming that it's an offsite hosting - that is to say, that it's a remote machine & not your dev machine.
You'd want to put it into whichever file made use of the variable $iFrameURL.
|
|
|
|
|
hi and thank you so much for help.
we have a website and we implement s travel booking system and when some one want to search a flight from http://milleniumtravel.ca/booking[^] then he should get the result on result page which is http://milleniumtravel.ca/result[^] for this reason we need to put the code i mentioned on the server side. DomainMecca.com hosing.
I will appreciate if you help me with this and i can even pay you fro your help.
please let me know so i can give you our FTP info. I will be doing this today so its kind a important.
thank so much
Oz
|
|
|
|
|
No worries mate. Just a word of advice - offers of money are generally poorly received on the forums here at CP, that'd be why you got 1 voted. Private email is less likely to offend.
Anyhow, it would seem that you just want to drop the code into the top of result(.php?) EDIT: /result/index.php (?)
So booking.php will have a form in it, with a field whose value is 'booking.php', perhaps something like so:
<form action='http://milleniumtravel.ca/result'>
<input type='hidden' name='booking.php'/>
</form>
Along with a several other inputs to pass the data that you're then turning into a url.
Does this help?
|
|
|
|
|
sorry about that, i wasn't sure how your forum really work. Thank yo for the advice I appreciate it very much.
my booking page in my word press site has: <iframe id="ifResults" style="margin: 100px; width: 1020px; height: 1020px;" src="http://milleniumtravel.ca/full_html_SV_form_gt"></iframe>
and
my result page in my WordPress site have; <iframe id="ifResults" style="margin: 100px; width: 1020px; height: 1020px;" src=""></iframe>
the actual booking company asked me to put this code:
<?php
If ($_POST["booking.php"]) { $iFrameURL = $_POST["booking.php"]; $i = 0; foreach($_POST as $key => $value) { $i++; if($i == 1) { $iFrameURL .= "?"; } else { $iFrameURL .= "&"; } $iFrameURL .= $key."=".$value;} }
?>
on the server side and i honestly don't know how to copy and paste this code on the server side or where to paste it or do i need to create a page in my word press and name it what then where do i copy and paste this page if i create one etc...
i am all lost and the booking company told me that have no clue about php but they are the .net guys and they are rally arrogant and choose to not help!
i can give you my WordPress site login info or ftp if you would like to help me on this.
I have done intensive research online and i cannot find any one knows what i am trying to achieve despite i have told them exactly like on this page.
Thank you so very much.
Oz
|
|
|
|
|
No stress, it does catch some people out that are unfamiliar with the customs. It seemed likely to be through lack of knowledge, rather than lack of caring, hence the friendly tip.
Cool, that extra information is most helpful. Perhaps we an even get the problem sorted owt for ya!
I'm not familiar with wordpress, so I before I go on, I'll say that I'm assuming it's a php page that has the code:
<iframe id="ifResults" style="margin: 100px; width: 1020px; height: 1020px;" src=""></iframe>
Whichever file that is, you need to edit that one. Put the php code they've supplied you with somewhere before the code for the iframe.
Next, edit the iframe code so that it includes your variable $iFrameURL, like so:
<iframe id="ifResults" style="margin: 100px; width: 1020px; height: 1020px;" src="<?php echo $iFrameURL;?>"></iframe>
This will put whatever is in the variable into the page as a string, to be used as the src of the iframe.
So, not knowing wordpress, I don't know if you can access(download & upload) the file
using your browser, or if you need to use ftp. I'm also unaware of whether it's php or asp, logically I expect it to be php, but I'm not going to bet a body part on it!
- Just seen an email notification that mention the pdf page. You've condensed the important information well - I can see nothing there that's useful to me with regards to this.
Here's an more-or-less unrelated question that demonstrates
1) setting a php variable to hold some info
2) using that variable in a page in the same way as I have here - using the echo statement. (note that it's a single file, with the php stuff before the html)
how to disable a button after click in php[^]
Everybody starts out new at sometime!
|
|
|
|
|
hi,
thanks for your help.
the wordpress is a cms and has its own admin panel.
i have endtered the code on ifram age and name it test: http://milleniumtravel.ca/test[^] but it's not working.
Can you please simply tell me how one would put a php code on a server side?
is there a place on a hosting server where i can enter this code:
<?php
If ($_POST["booking.php"]) { $iFrameURL = $_POST["booking.php"]; $i = 0; foreach($_POST as $key => $value) { $i++; if($i == 1) { $iFrameURL .= "?"; } else { $iFrameURL .= "&"; } $iFrameURL .= $key."=".$value;} }
?>
how one would enter this code on server side?
a- as a code as it is if so then where can i paste this code to on the server side?
b - create a php page and enter this code and save it and name it such as "page.php" and after use ftp and upload to somewhere but WHERE?
|
|
|
|
|
The way you've entered the code on the test page is as content, rather than source code - i.e the code has been copied into the visible part of the page. You need to be able to edit the page directly, rather than just using whatever editing tool it offers.
If you look at the source code for the test page, we can see that the editor has altered your code, commenting out the opening tag of the php block. Also, it's dumped it into a paragraph tag
<p>
<!--
If ($_POST["booking.php"]) { $iFrameURL = $_POST["booking.php"]; $i = 0;
foreach($_POST as $key => $value) { $i++; if($i == 1) { $iFrameURL .=
"?"; } else { $iFrameURL .= "&"; } $iFrameURL .= $key."=".$value;}
}<br>
?>
</p>
Since the page is displayed when the url is http://milleniumtravel.ca/result I'd guess that there's an index.php page inside that folder.
But it's really a bit hard to tell, since URL re-writing can map an address like that to something entirely different.
I'm sorry I can't provide better help. I'm certainly willing to, I just don't know how!
How did you create the test page? Was that from scratch/copy-paste, or was it via some kind of online editor? If it's an editor, then I've really got 3/5th and 5/8ths of no idea.
I've been up for about 17 hours now, so am far from my sharpest - though I guess I _could_ have a look around in the back-end if you really like.
Just send me another private email with some login details and I'll have a look for you - I must be in a good mood!
|
|
|
|
|
this is really bad coding practice anyways so maybe it's better it doesn't work?
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
i wanna site to create using php
|
|
|
|
|
Hi All,
Can Anybody help me in SMTP Setup for Bulk Emailing in PHP Programming.
Regards
www.ucsinfotech.com
|
|
|
|
|
Some suggestions[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
You want to send thousands of email with php? in this case you will have to ensure you don't do it web command base. you will have to execute your php code from your server using shell command. better yet crontab
I wish I could believe there is an after life.
|
|
|
|
|
This is the code I'm having a problem with:
$sql = "SELECT SQL_CALC_FOUND_ROWS * FROM " . TBL_MEMBERS . " ORDER BY $order LIMIT $startRow, $numRows";
try {
$st = $conn->prepare( $sql );
$st->bindValue( ":startRow", $startRow, PDO::PARAM_INT );
$st->bindValue( ":numRows", $numRows, PDO::PARAM_INT );
echo "sql string = " . $sql . "<br />";
echo "just before we hit the execute<br />";
$st->execute();
echo "just hit the execute<br />";
$members = array();
foreach ( $st->fetchAll() as $row ) {
echo "pre";print_r($row);echo "/pre";
$members[] = new Member( $row );
echo "pre";print_r($members);echo "/pre";
}
ok had to remove the <> from the pre tags to makes it easier to read...
Ok, if I run the non-commented out version of the SQL it works fine and I get the result I expect, however if I run the commented out version I get the following error:
Query failed 1: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''5'' at line 1
I printed this out at the start of the function to check the values:
startRow = 0 and numRows = 5
I'm sure it's something stupid as I only spend about 5 - 10 hours a month doing PHP, so thank you in advance!
oh yeah:
mysql> select version();
+-------------------------+
| version() |
+-------------------------+
| 5.5.24-0ubuntu0.12.04.1 |
+-------------------------+
1 row in set (0.00 sec)
modified 20-Jul-12 13:55pm.
|
|
|
|
|
I figured it out... I checked the type of the variables and it thought the second was a string so I made some code changes and it's now a INT. Love those descriptive error messages, guess they have learned a few things from M$
|
|
|
|
|
hi there
how can i rebind and reuse a port that i make it busy in perior session?
in typical we close a busy port with socket_close() in php but when i click on X button on my browser for exit, the port left busy and i cant use it for next time.
by the way how can i close a socket when user click on X button for exit?
Thank you for your thoughts on this
|
|
|
|
|
i could not solve my problem
no body can help me?
|
|
|
|
|
I don't think you understand how client/server HTTP applications work. You cannot tell when a browser disappears, because HTTP is stateless and request/response based.
And if you're opening sockets in the server side code you're almost certainly doing something wrong. PHP is not the right tool for a stateful persistent TCP connection.
|
|
|
|
|
thanks for your reply BobJanova
i solve my problem with this code:
<?php
$fp = fsockopen("127.0.0.1", 26002, $errno, $errstr, 30);
fclose($fp);
?>
by this i could close my last open port, maybe is not a good solution
i found it here:http://php.net/manual/en/function.fsockopen.php[^]
PHP is not the right tool for a stateful persistent TCP connection.
so, what is good for do this?
and what are the chatroom that creates on php?
|
|
|
|
|
hi there
im new in php and want to create a chat server/client service for my project
so, do i have to start from socket programming in php for start?
what topics i must know?
should I use a specific framework like cake , zend , ... or it is soon to use theme?
by the way does php/mysql has offline help like msdn for asp or sth like SQL SERVER help?
please help me
thanks so much
modified 12-Jul-12 13:17pm.
|
|
|
|
|
excuse me but why nobody answer me?
i need your helps
plz answer me
tnx
|
|
|
|
|
|
Welcome to php world!
Here you will find many examples of what you are trying to achieve, but you got to look for the best rated one -
chat app[^]
It will be too early for you to use any framework.
Yes, you can download php manual here - php manual download[^]
Hope this helps!
|
|
|
|
|
You almost certainly want to use AJAX for this, and some form of data store for the 'chatrooms'. That way it will work in browsers and be resource-light. Alternatively, if you want a client/server non-HTTP chat, you don't want to be using PHP to write it.
|
|
|
|
|
thanks so much
BobJanova wrote: , if you want a client/server non-HTTP chat, you don't want to be using PHP to write it.
but my project title is "create a server/client chat service in php"
this is why that i want to create it in php
|
|
|
|
|
BobJanova wrote: if you want a client/server non-HTTP chat, you don't want to be using PHP to write it.
I hope you'll find the above added emphasis clears your doubt.
|
|
|
|