WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-29-2008, 10:16 AM
TrafficProducer TrafficProducer is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,688
TrafficProducer RepRank 0
Question cURL, embed PHP into HTML

Embeded PHP in HTML refuses to display. A direct PHP call functions.

HTML with Embeded PHP does not display

A direct PHP call functions

I've tried various .htaccess, using AddType application/x-httpd-php .htm .html at this time

and various httpd.conf, this is blank for PHP at this time.

My new host say it is using cURL because of security, (Is it this is causing problems).

So how, easy way please, I get PHP to display embeded withing HTML pages?

Any help, gratefully received
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
  #2 (permalink)  
Old 01-30-2008, 08:10 AM
DaveSawers's Avatar
DaveSawers DaveSawers is offline
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 332
DaveSawers RepRank 1
Default Re: cURL, embed PHP into HTML

You have to rename the page to use the .php extension. It doesn't matter if the content is mostly (or even all) HTML.

So rename your test_php.html to test_php.php and it'll work just fine.
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #3 (permalink)  
Old 01-30-2008, 08:21 AM
TrafficProducer TrafficProducer is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,688
TrafficProducer RepRank 0
Default Re: cURL, embed PHP into HTML

The issue I want .html (with PHP in them)

I just think this is more user, (and maybe search engine), frendly

Thany You
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
  #4 (permalink)  
Old 01-30-2008, 09:59 AM
wige's Avatar
wige wige is offline
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,648
wige RepRank 4wige RepRank 4wige RepRank 4
Default Re: cURL, embed PHP into HTML

Because of cURL, I think you need to use AddHandler, instead of just AddType. AddType changes the MIME type of the document, and the server should process the document according to that new MIME type. Because the MIME type does change, this is not the issue. The issue is that the server doesn't know what to do with a document of type application/x-httpd-php, so it simply serves the document to the client. AddHandler creates a specific link between the file extension and the script handler. I would still recommend trying the following:

AddHandler php5-script .html
__________________
The best way to learn anything, is to question everything.
Interestingly Average Security Blog
Reply With Quote
  #5 (permalink)  
Old 01-30-2008, 10:50 AM
TrafficProducer TrafficProducer is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,688
TrafficProducer RepRank 0
Default Re: cURL, embed PHP into HTML

I've triesd a few AddHandler ... but no joy. I'm looking for a different host, (yet again)

Have tried:-

AddHandler x-httpd-php .html .htm

AddHandler php5-script .html

Thank you
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
  #6 (permalink)  
Old 01-30-2008, 03:36 PM
DaveSawers's Avatar
DaveSawers DaveSawers is offline
WebProWorld Veteran
 

Join Date: Dec 2006
Location: Calgary, Alberta, Canada
Posts: 332
DaveSawers RepRank 1
Default Re: cURL, embed PHP into HTML

Quote:
Originally Posted by TrafficProducer View Post
I just think this is more user, (and maybe search engine), frendly
Really? Why?
__________________
Dynamic Software Development
www.activeminds.ca
Reply With Quote
  #7 (permalink)  
Old 02-04-2008, 10:21 PM
carbonize carbonize is offline
WebProWorld Veteran
 

Join Date: Jul 2003
Location: Bristol, UK
Posts: 965
carbonize RepRank 0
Default Re: cURL, embed PHP into HTML

The extension of your web page makes no difference to neither your users nor search engines. If the php scripts you are trying to include are on your site then I recommend using include or require over cURL as they put less demand on the resources and are faster.
__________________
Carbonize
Reply With Quote
  #8 (permalink)  
Old 02-05-2008, 06:18 AM
TrafficProducer TrafficProducer is offline
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: United Kingdom
Posts: 1,688
TrafficProducer RepRank 0
Default Re: cURL, embed PHP into HTML

I've moved to a better host, without these issues.

Thanks everyone
__________________
Videos to Watch and Video Publishing
Affiliate Program! Our Affiliate Program Pays 50.00% Business Support
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Tags: curl, html



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you embed a PHP, ASP Microsite with an HTML Site? melchapman Web Programming Discussion Forum 7 04-15-2007 10:30 AM
Page Curl Effect WPW_Feedbot Graphics & Design Discussion Forum 0 03-09-2005 12:31 AM
Embed flunks -- now what do I do? Weedy Lady Graphics & Design Discussion Forum 4 03-02-2005 01:57 PM
Page Curl WPW_Feedbot Graphics & Design Discussion Forum 0 01-19-2005 01:01 AM
php - curl - proxy ? help plz AjiNIMC Web Programming Discussion Forum 1 10-04-2004 07:12 AM


Search Engine Friendly URLs by vBSEO 3.0.0