I have an website that loads an iframe through javacsript, now i want to fetch the content of the iframe in my php cron job how can i do that?
i already tried a few things like puphpeteer and jonnyw/php-phantomJS but both do not work with laravel 9.45.0
Related
I have web with php Codeigniter. Try to call iframe from different domain on it.
I want to do something such as show popup when process inside the iframe is finished.
How can the web inside iframe call my web (parent), so I know the process is finished inside the iframe?
Should i implement notification in my website or is there another way to implement something like this?
I never do this before on website, so please help, thanks
I want to crawl a site which pagination's are loaded by ajax. I'm using FriendsOfPHP/Goutte for crawling in laravel 5.
Is it possible to do this with Goutte?
I tried out the following code,
$link = $crawler->selectLink('Next>')->link();
$crawler = $client->click($link);
but its not working.
How can I crawl ajax site using PHP/ Laravel 5?
Crawler usually works without any hitch on rendered HTML content (which you see on view-source option of browser) , but If you want to crawl ajaxed content you need to manually do it by studying ajax calls of that site. Please check on pagination links and find some sequence you can definitely scrape that content.
I need it so badly I have been trying it from 3 days but still i cant go for it. The question is how do i refresh an iframe without refreshing entire page for every 2 seconds? I googled so many sites but none helped, All of the codes that I found ,they just flicker the browser window and I dont want it to be happened
some of the sites i googled and more
http://www.codingforums.com/showthread.php?t=168589
http://roshanbh.com.np/2008/09/free-ajax-chat-applications-php.html
but still im unable to get it can anyone kindly explain me with a sample code please?
update
I want an iframe because I want to write users message to an html file using php file concepts and also then display the html file to users by using it as an iframe, for every 2 seconds, So that it looks like chat box.
This was my idea about creating a chat box. I have choose an iframe because i wanted to use smileys in my chat box.Kindly try to help me.Thanks!
Instead of using the iframe as a chat box, you can have the iframe be invisible and have the javascript on the page check the contents of the iframe (hopefully it's the same domain, to make things simple) and update a container on the page itself. Since the page doesn't need to reload, there won't be any flicker.
I'm currently using curl to login to a site and grab the html for one of the pages. My problem is that the page has some ajax links on it (click on the link results to html changes). How would I be able to make the clicks of the link and get the html of the final state using php? Seems like from researching this I need some sort of headless browser? Is there something like that in php I can use?
I'm not aware of any headless browsers that supports Javascript/AJAX that you can drive with PHP. If you want to drive a real browser with PHP, see http://seleniumhq.org/
Had this exact problem a few minutes ago. This works like a charm. Use .live() as the top answer here explains.
Reload javascript file after an AJAX request
Tested and works.
Can someone tell me what happens when i enter a link into the Facebook Status Update Form and it loads up a mini info kinda thing of the website (I'm guessing its RSS or something?)
How do i implement this on my site using PHP?
What do i need to learn to be able to implement that?
It scrapes the page you are linking to. It doesn't have anything to do with RSS.
By looking at the HTML of the page it can get the page title for you and find all the images that can be used as a thumbnail.
Take a look at HTTP or cURL in the PHP manual for methods to get webpage content.