Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Assume there is a website called http://example.com/a
the website is being developed using PHP, Perl, Ruby and other languages.
I want to be able from my website to read this website pages, execute the code and then analyze the HTML result page tags and getting the content using PHP.
it's like reading news from some news websites and then displays it in my website in different format or different style.
I'm not sure you understand this aspect of web programming, but you cannot access the server-side code which generated the HTML. You can of course parse the HTML which is returned from the server by using one of many HTML parsers.
That may or may not have been what you asked, because your question is a bit vague to me. Note that if you want to collect information from other web pages on your web page, you should make sure your web site doesn't make a request to those other web pages each time a user visits your site. (Phew, that was a handful!) You need to implement some sort of caching of the other web sites' content.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
so i want to develop a mini website builder within my website. Have a control panel where users can edit the text in their websites, i want each of those html pages to have its own css file attached to it. Now, i want it so that the user sees something like a button saying "Edit Background color" they are prompted with a color picker and on hitting save, the css file is updated without them knowing that css even exists.
I would like to know what language i can use to make the previous example happen. And if possible a hint of code.
I appreciate your answers, Braulio :)
I didn't downvote you but just for informational purposes, the reason you were probably downvoted is due to the scope of your question, The language you choose depends on what platform you are running your site on. And it is likely possible to do what you want in tons of different languages assuming your platform supports them. For an easy solution check out .net languages like c# with ajax controls for live updates without refreshes. But then again you could use ruby with rails. Or you could do most of it in the client side with jquery and javascript then send the results to the server which could utilize php. It is just to broad a question to really answer without writing the whole thing for you which nobody is going to do.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Can someone give me ideas of how the admin managing the school announcements and events of a web portal? Like how they put it in there? is it manually coding? I just started programming php.
If you use pure HTML manually write the code inside the portal .
If instead use PHP is normally integrated with a database in such a way that once created the basic structure ( PHP that reads from Database ) the whole system is dynamic.
Normally if it comes to dynamic sites are used in the CMS that are web applications that interact with the database to enter data (a real data entry)
List of some free CMS:
WordPress
Joomla
concrete5
Drupal
If you are learning you should look at the official documentation for PHP Manual link
And look MySQL which is a great open source database MySQL link
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
The title says it all. Please give me some way for how to scrape AJAX loaded Division.
There is one website which has Product Grid Division. I want this division for scrap the data from it but the problem is when i get the page content data in another html page there is no product grid because it's loaded via AJAX after some time. For Scrapping i tried both Perl and CURL with PHP.
Thanks in advance.
From WWW::Mechanize::FAQ
Which modules work like Mechanize and have JavaScript support?
In no particular order: Gtk2::WebKit::Mechanize, Win32::IE::Mechanize,
WWW::Mechanize::Firefox, WWW::Scripter, WWW::Selenium
Also see: How do you scrape AJAX pages?
Using Selenium, e.g. through Selenium::Remote::Driver, you will be operating real browsers to access the site. Sites can be quite sensitive to subtle differences in browser behavior.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm learning php and website development in general. Currently I'm trying to write a script in php that would access a website as Internet Explorer (important) and look for a specified word/pattern everywhere possible. Simply parsing doesn't do the job.
The thing is, I can do that manually - I open website X and press F12 in Internet Explorer->debugging section and I search there. However I have no idea how to implement such a thing in php or any other language.
TL:DR
Need to extract data from a webpage the same way I do it manually (explained in paragraph above). However, simply parsing doesn't do the job. I need to achieve that in php or some other server side language.
In addition to limited approaches such as file_get_contents followed by a string search (or XML parser), you can look into more feature rich libraries such as the SimpleTest Scriptable Web Browser.
You'll want to modify the user agent string in order to simulate a request from Internet Explorer.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I would like to know what is the best approach, based on good programming practices to show an external webpage (say Facebook or Twitter) on my website while being able to modify the HTML and CSS before showing it.
I know that I could use an iFrame however based on some opinions the iFrame does not seem to be a good programming practice (width issues, ugly scrollbars, etc).
Is there a better approach?
Update: Question was put on "too broad", in order to limit the possible answers I would like to know if it possible to change the CSS (and only CSS) of an iFrame, the user Muhammad Umer commented that it would be possible but provided no more details. Someone knows how to achieve this?
This can be done in PHP. First I want to suggest to look for API's. Facebook has some nice API's which allow you to show them on your website, with some options to customize is.
The more difficult (and lots of work to maintain) is using file_get_contents() and using some parsers and regex to get the parts you want. Allthough facebook (and some other sites) might prove difficult, they load some parts via JS, so file_get_contents cant get everything
Again, API's are the way to go.