Question/Help with PHP

4 views
Skip to first unread message

Bill Petersen

unread,
May 26, 2013, 12:14:59 PM5/26/13
to nlug...@googlegroups.com
I have a question that I can't seem to figure out. I am not sure where to go, so on the advice of a NLUG member I am asking the mailing group.

First let me state that I know very little about jscript and even less about PHP although I think PHP is what I need to complete my task. I now CSS and HTML very well though.

What I want to be able to do is This:

I have a website that basically embeds another website into an iFrame. My site is ran by wordpress displays sponsor logos and event logos in small iFrames on the bottom and left sides of the page. The main area of the page is an iFrame that displays real time content powered by a SQL database from someone else. I do not control the SQL site or real time content. I only control the WordPress site with logo's etc. 

I can go into the individual pages and paste the URL into the iframe manually and make it work. This method is much more complex then my administrative user base can be expected to do. 

What I want to be able to do is populate the iFrame that shows the real time content by typing in the link for the real time content website into a form field on another html page of my WordPress site within the same domain. This method would allow my user base to actually be able to administrate which real time content stream that they want to display. 

I have been able to create a java script to do this within the same html page, but I can't seem to figure out how to carry the variable from the form to a different page. I believe that this is a limitation of the client side language (please correct me if I am wrong), hence why I think this may need to be done in PHP. I know this is possible as it is done so much throughout WordPress; however, I can not find the answer or direction I need to go to make this work. 

I would love just to have the answer, but a thrown bone in the right direction would be equally as valued. 

Thanks 

--
Bill Petersen

Toth, Csaba

unread,
May 26, 2013, 2:36:35 PM5/26/13
to nlug...@googlegroups.com
This is a little blurry for me. So the site is basically just a WordPress skeleton, it's a mash-up of other sources? Does the WordPress itself contains any real content?
I'm very curious about the site address.

Anyhow, whatever you end up doing be extremely cautious:
1. About SQL injection attacks
2. XSS (Cross Site Scripting) attacks
3. Other attacks
The user will type in something, and that supposed to be an address, or direct indicator of an address. Sanitize the input very well, use best practices and control everything.

My other advice: (Let me tell in advance that I'm mainly an application developer and I wouldn't define myself as web developer) when I tried to do similar thing, more specifically: pull-in contents from other sources using JavaScript asynchronous/AJAX requests, I ran into the "same origin" limitation. Google that, it supposed to prevent XSS, but that maybe the thing which block your efforts also.
http://stackoverflow.com/questions/4686497/same-origin-policy-javascript-jquery-ajax-and-retrieving-an-rss-xml-feed

Finally: consider reaching out to the Nashville PHP user group (yes there is one!) or Ruby on Rails UG or other web development related UG. There are some developers here on NLUG, but I'm sure that the PHP UG folks has much more knowledge about this topic than me.

Csaba


From: nlug...@googlegroups.com [nlug...@googlegroups.com] on behalf of Bill Petersen [peter...@gmail.com]
Sent: Sunday, May 26, 2013 9:14 AM
To: nlug...@googlegroups.com
Subject: [nlug] Question/Help with PHP

--
--
You received this message because you are subscribed to the Google Groups "NLUG" group.
To post to this group, send email to nlug...@googlegroups.com
To unsubscribe from this group, send email to nlug-talk+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/nlug-talk?hl=en
 
---
You received this message because you are subscribed to the Google Groups "NLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nlug-talk+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Bill Petersen

unread,
May 26, 2013, 7:54:29 PM5/26/13
to nlug...@googlegroups.com
Thanks for the Tips. I'm not extremely worried about the attacks, as this is an event based website and all of the SQL stuff is done elsewhere. 

The WordPress site actually is a multisite WordPress so the base domain does have quite a bit of content however the the sub domain's do not. A subdomain is what I am attempting to change using Iframes. I will certainly look at the Nashville PHP group. I appreciate the time of telling me about it, and I will head there with my question.

Thanks again 

andrew mcelroy

unread,
May 26, 2013, 8:24:07 PM5/26/13
to nlug...@googlegroups.com
this all sounds like you are trying to re implement ajax + maybe websockets.

When you say:

" What I want to be able to do is populate the iFrame that shows the real time content by typing in the link for the real time content website into a form field on another html page of my WordPress site within the same domain. This method would allow my user base to actually be able to administrate which real time content stream that they want to display. "

This could be a lot of things. It doesn't sound like iframes are needed for anything you are trying to accomplish.

Andrew McElroy.

Bill Petersen

unread,
May 26, 2013, 8:54:54 PM5/26/13
to nlug...@googlegroups.com
You may very well be correct. iFrames may not be what I need. 

I need a URL (outside URL) that i have absolutely no control over to display on 85% of my webpage, I need to change this outside URL as the competitive events change. . The only way that I could think to do this iwas with iFrames;however, there is a good chance that this is the wrong rabbit hole all together. 

The outside URL is just columns of Data with the competitors name and current standings in the competition displayed in HTML with a set screen size. 

Like I said before. I know HTML and CSS forwards and backwards. I know nothing of programing. I'm actually starting to try self teach myself PHP with lynda.com


I can't straight out give url's to everything i'm trying to do on an open forum. 




Reply all
Reply to author
Forward
0 new messages