473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

refresh page

Hi,
I have just started using PHP and am from a non computing background. But i wanted to learn a bit of programming so started with PHP.

i was just trying to make a integration tool, using PHP, JavaScript and HTML.
to explain the senario,

i am submitting user data to multiple web servers as query and extracting output to display it to the user.
for this i am using cURL. But one of the pages needs to be refreshed continously to get the final result.

i searched the net to help me out but most of the places give me codes to refresh a html page

i was wondering if i could do that with php or best using cURL.

thanks
Dec 18 '06 #1
6 2496
ronverdonk
4,258 Expert 4TB
Hi,
I have just started using PHP and am from a non computing background. But i wanted to learn a bit of programming so started with PHP.

i was just trying to make a integration tool, using PHP, JavaScript and HTML.
to explain the senario,

i am submitting user data to multiple web servers as query and extracting output to display it to the user.
for this i am using cURL. But one of the pages needs to be refreshed continously to get the final result.

i searched the net to help me out but most of the places give me codes to refresh a html page

i was wondering if i could do that with php or best using cURL.

thanks
Have you looked at an Ajax type of solution for this problem? Or another method using HTTPRequest?

Ronald :cool:
Dec 18 '06 #2
mainul
51
hi

put the code inside <Head> tag

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META HTTP-EQUIV="Refresh" CONTENT=120>

in the code CONTENT=120 value indicate after how many seconds you want to refresh the page. change it according to ur requirement.

best regards,
Mainul
Dec 18 '06 #3
subash
33
Hi,

I think AJAX methods (Its simple to learn and implement) will be helpful for this.
Dec 18 '06 #4
Thanks a lot guys for helping.......
I will surely have a look at Ajax...
I cannot use the <meta> solution...becuase i dont want to refresh all the pages that i access only 2 of them....... as this web page accessess and executes different tools available over the internet. It displays all these results in different tabs....incase i use the meta solution it will keep refreshing the whole page which is unnecessary.....i guess....i will try AJAX though and have a look and let you guys know if it is ok
Dec 30 '06 #5
i think a code sample will give you guys a better understanding
[php]
if ($_POST['searchType'] == 'xxx') {
if(isset($_SESSION['xxx_out']) &&
isset($_SESSION['xxx_input']) &&
$_SESSION['xxx_input'] == $_POST['usr data']) /* usr submitted data */
{
print $_SESSION['xxx_out']; /* display output */
} else {

$n = ($_POST['usr data']);
$_SESSION['xxx_usr data'] = ($_POST['Sequence']); /* submitted usr data */

$ch = curl_init(); /* initiate curl */

curl_setopt($ch, CURLOPT_URL, "url"); /* set target url */

curl_setopt($ch, CURLOPT_POST, 1); /* insert number of parameters to POST */

curl_setopt($ch, CURLOPT_POSTFIELDS, "n1=v1&n2=v2"); /* write parameter name and its value for curl to submit */

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);

"I WANT TO WRITE A CODE HERE TO REFRESH THIS PAGE ONLY there are around 10 code on similar lines but only this piece has to be refreshed so i cant use the meta solution"

$_SESSION['xxx_out'] = curl_exec($ch);
print $_SESSION['xxx_out'];

curl_close($ch);
}[/php]
Dec 30 '06 #6
ronverdonk
4,258 Expert 4TB
Please read the Posting Guidelines before you post in this forum!.
Especially the part about enclosing any code within code, html or php tags.

moderator :cool:
Dec 30 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
1
by: Marco Maroni | last post by:
How to force image refresh on client browser ? Is ti possible to force the refresh of the same image (tha was changed server-side) to the client, without user press Contrl+F5 in IE ? - Marco
2
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an...
1
by: francois | last post by:
I have a ASPX form with a dropdownlist that makes a post back (to the same page of course, just a normal asp.net postback) That page also has an auto refresh javascript as it needs to refresh its...
9
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
0
by: Brad White | last post by:
Overview: I have a custom web app that has an 'Inbox' that refreshes every 30 seconds. One user uses Outlook to host the web page. Using IE, the refresh works fine. If the user is working in...
3
by: Kevin | last post by:
Hi guys, I want to refresh some pages every 2 seconds. however, these html pages are not in my site, they could be any pages from yahoo.com or msn.com. I can create a page, which redirect to...
8
by: Jason S | last post by:
Hi, is there any way of getting my VB (6.0) program to automatically 'Refresh' an IE window that might be active (window status not applicable). It needs to be able to determine which active IE...
10
by: phforum | last post by:
Hi, I wrote a PHP page for user input the information to search the database. And the database data will update every second. I want to set the auto refresh to get the data from database every...
5
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, I used the following code to refresh the parent page, and it works very well (Thanks to Peter Bromberg "). Response.Write("<script language='javascript' type='text/javascript'{...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.