homepage Welcome to WebmasterWorld Guest from 54.167.96.124
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Defer for php
Gemini23




msg:4440111
 5:29 pm on Apr 12, 2012 (gmt 0)

I have a php script that brings in a search box (and results) from an external website... a problem arises when the external website is down for maintenance and my website takes 'forever' to load while it is waiting for the php script... (which won't run) is there a 'defer' equivalent for php so that the page will at least load without the search box php query

Any suggestions on how to resolve this?

 

enigma1




msg:4440246
 10:38 pm on Apr 12, 2012 (gmt 0)

If you're connecting say with fsockopen or curl you can specify a timeout for the request. If you don't specify anything the default is something like 30secs. So you could change it to be few secs instead.

incrediBILL




msg:4440270
 12:25 am on Apr 13, 2012 (gmt 0)

Another thought might be to put this content in an iframe, so then your page load speed would seem snappy and their content, however slow or even a timeout, wouldn't impact the rest of your page.

Gemini23




msg:4440274
 12:37 am on Apr 13, 2012 (gmt 0)

But surely iFrames are not good with search engines?

incrediBILL




msg:4440301
 2:07 am on Apr 13, 2012 (gmt 0)

You said it was a search box from an external website, so I assumed that content wasn't your actual content and having it indexed opposed to pages load speed wasn't a primary concern. If I'm wrong, then other timeout limiting solutions listed above would probably work better but page load time will always be a concern. Besides, these aren't your dads search engines, they can handle frame content unlike back in the day, but it's still not optimal results.

More importantly, aren't you concerned with dupe content by including a 3rd party sites search results or are the search results directly derived from your site?

Gemini23




msg:4440938
 10:01 pm on Apr 14, 2012 (gmt 0)

Thanks incrediBill.. the off-site content is taylored for my site and comes from a database... the alternative is to bring the content in via xml... every day and usually in the early hours of the morning in my time zone (but we sell world-wide)the php content goes off-line for a minute or two... but becoming more frequently is an extended period of being off-line which then slows down the loading of my site considerably.

Gemini23




msg:4440939
 10:01 pm on Apr 14, 2012 (gmt 0)

Thanks incrediBill.. the off-site content is taylored for my site and comes from a database... the alternative is to bring the content in via xml... every day and usually in the early hours of the morning in my time zone (but we sell world-wide)the php content goes off-line for a minute or two... but becoming more frequently is an extended period of being off-line which then slows down the loading of my site considerably.

Gemini23




msg:4440950
 10:43 pm on Apr 14, 2012 (gmt 0)

Could an "Object" be used to contain this php external content? and would that then load AFTER the page load?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved