Jump to content

oracle765

Members
  • Content Count

    218
  • Joined

  • Last visited

Community Reputation

1 Neutral

About oracle765

  • Rank
    Advanced Member
  1. ok i understand but still confused If i load the iframe from the .com.au domain to the 3rd party subdomain IE motorhomes. is the cname all for .com.au i get really low page speed saying preload key requests <iframe src="//motorhomes.compareandchoose.com.au/affiliates.html?rel=search&selected_country=US&pickup_location=Orlando&dropoff_location=Orlando&style=https%3A%2F%2Fwww.compareandchoose.com.au%2Fcss%2Fmotor.css"></iframe> So basically this on on the same domain above produces the perload key requests error but if i load it where the source is from the .com.au domain but pointing it to the com domains code there is no preload key requests error <frame src="//motorhomes.compareandchoose.com/affiliates.html?rel=search&selected_country=US&pickup_location=Orlando&dropoff_location=Orlando&style=https%3A%2F%2Fwww.compareandchoose.com%2Fcss%2Fmotor.css"></iframe> So i guess with the motorhomes. cname on its own server the browser is thinking its the same place and asking for the preload am i totally wrong here
  2. ok i am trying to load the iframe, the below works fine <iframe title="campervanhire" height="400" src="https://MYSUBDOMAIN.compareandchoose.com.au/affiliates.html?rel=search&selected_country=AU&style=https%3A%2F%2Fwww.compareandchoose.com.au%2Fcss%2Fmotor.css"></iframe> I tried pre-loading the frame and then the css IE <link rel="preload" href="https://MYSUBDOMAIN.compareandchoose.com.au/affiliates.html?rel=search&selected_country=AU" as="document"> <link rel="preload" href="https://www.compareandchoose.com.au/css/motor.css" as="style" /> but i get stuck there because it breaks the layout/styling of the iframe, so not sure if there is another way around this
  3. hi professionals, not sure if i have posted in the right section as i am stuck with some css and iframe Basically i am trying to use a third party iframe from my sub domain which works fine but i am failing the lighthouse speed check with the message Preload Key Requests My iframe when i try to put preload doesnt work and breaks CSS, just wondering if there is a way around it <iframe title="campervanhire" height="400" src="https://MYSUBDOMAIN.compareandchoose.com.au/affiliates.html?rel=search&selected_country=AU&style=https%3A%2F%2Fwww.compareandchoose.com.au%2Fcss%2Fmotor.css"></iframe> Anyone have any ideas
  4. Thanks Barand for the prompt response
  5. I have a holiday program which has suddenly stopped working, please see log file error and piece of code. Any ideas? ERROR LOG FILE [19-Jul-2019 09:46:53 UTC] PHP Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '&lt;' not found in /home/ccuk/public_html/low-cost-holidays.php on line 877 [19-Jul-2019 09:46:53 UTC] PHP Warning: SimpleXMLElement::__construct(): EADSDatabaseError error raised, with message : Error 3011: Unknown identifier f in /home/ccuk/public_html/low-cost-holidays.php on line 877 [19-Jul-2019 09:46:53 UTC] PHP Warning: SimpleXMLElement::__construct(): ^ in /home/ccuk/public_html/low-cost-holidays.php on line 877 [19-Jul-2019 09:46:53 UTC] PHP Fatal error: Uncaught Exception: String could not be parsed as XML in /home/ccuk/public_html/low-cost-holidays.php:877 Stack trace: #0 /home/ccuk/public_html/low-cost-holidays.php(877): SimpleXMLElement->__construct('EADSDatabaseErr...') #1 {main} thrown in /home/ccuk/public_html/low-cost-holidays.php on line 877 and this is the code around line 877 865 if (isset($_GET['btnSearch'])) { // NEW SEARCH 866 $_SESSION['offers'] = []; 867 $tempOffers = []; 868 869 foreach ($urlArr as $provider => $ua) { 870 if ($ua['active']!=1) continue; 871 $search_url = $ua['url'].'?'; 872 $search_params['page'] = $ua['page']; 873 $path = $search_url . http_build_query($search_params); 874 file_put_contents('cacurl.txt', "$path\n", FILE_APPEND); 875 $rawxml = get_data($path); 876 if ($rawxml) { 877 $xml = new simpleXMLElement($rawxml); $providerOffers = $xml->xpath("//Offer"); foreach ($providerOffers as $po) { $po['logo'] = $ua['logo']; } $tempOffers = array_merge($tempOffers,$providerOffers); } }
  6. ok thanks Barand I will look into this, as you are probably already aware they are in an ini file which sets them to active or none active for each holiday provider, and if i keep adding them it keeps getting slower I will look into this ajax call to see if i can run in parallel many thanks
  7. hi ginerjm I dont know what you mean by that many thanks
  8. hi yes ginergem All travel agents provide the same url structure from the same api provider and take around the same time to return
  9. Hi Guys We have had a holiday program written in php in the past by an experienced developer but we are experiencing problems now. So I am curious to try and resolve the best approach Here goes 1: We query multiple APIs to return holiday results to our users 2: This can take up to 20 seconds to return results but sometimes its much quicker depending on the volume of API returned results 3: Other users seem to be locked out of even visiting our website if an API call is running So initially without posting any code, I have a couple of questions which are A: Is there a way to maybe poll a process or allow partial results to the users browser while things run in the background ( similar to what other holiday providers seem to be doing ) B: Is there a way to speed this up or maybe some sort of better technology to utilise Many thanks professionals
  10. ok update managed to get the port open and it works fine now... thanks for the advice
  11. hi there I have tried that and get this error Fatal error: Uncaught Exception: String could not be parsed as XML in /home/ccuk/public_html/holiday-test.php:18 Stack trace: #0 /home/ccuk/public_html/holiday-test.php(18): SimpleXMLElement->__construct('') #1 {main} thrown in /home/ccuk/public_html/holiday-test.php on line 18
  12. I am looking for someone on a short term basis to extract information from an API we have access too
  13. I see no output still this is what i now have ini_set("display_errors", 1); error_reporting(E_ALL); $holidays_url="http://87.102.127.86:8103/search/searchoffers.dll?page=Resort&countryid=7"; $holidays_curl = curl_init($holidays_url); curl_setopt($holidays_curl, CURLOPT_ENCODING, "gzip"); curl_setopt($holidays_curl, CURLOPT_URL, $holidays_url); curl_setopt($holidays_curl, CURLOPT_RETURNTRANSFER, true); $debugme=curl_exec($holidays_curl); echo $debugme; exit(); //$holidays_xml = new SimpleXMLElement(curl_exec($holidays_curl)); $holidays_xml = new SimpleXMLElement(curl_exec($holidays_curl),null,true); $holidays_stdclass=json_decode(json_encode($holidays_xml)); echo "<pre>"; print_r($holidays_stdclass); and not even an error message now? i know when i click the url i can see results but can seem to extract info from it
  14. ok i have this now ini_set("display_errors", 1); error_reporting(E_ALL); $holidays_url="http://87.102.127.86:8103/search/searchoffers.dll?page=Resort&countryid=7"; $holidays_curl = curl_init($holidays_url); curl_setopt($holidays_curl, CURLOPT_ENCODING, "gzip"); curl_setopt($holidays_curl, CURLOPT_URL, $holidays_url); curl_setopt($holidays_curl, CURLOPT_RETURNTRANSFER, true); //$holidays_xml = new SimpleXMLElement(curl_exec($holidays_curl)); $holidays_xml = new SimpleXMLElement(curl_exec($holidays_curl),null,true); //echo $feed->SHOPITEM[0]->ID_PRODUCT; $holidays_stdclass=json_decode(json_encode($holidays_xml)); echo "<pre>"; print_r($holidays_stdclass); i am getting error message SimpleXMLElement::__construct(): I/O warning : failed to load external entity "" in /home/ccuk/public_html/holiday-test.php on line 53 Fatal error: Uncaught Exception: String could not be parsed
  15. ah sorry never realised it had to be in front
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.