Pulling info from an external page [closed] - php

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Okay, bear with me. Part of my job is filling out online forms for customers who call in. In these forms there are all kinds of useful information that is hidden in input tags. I would like to make my own page that would extract and display all this useful information. I would also use this page to count the number of times I submit the form throughout the day.
The way I currently have it set up it is in a frameset. The left frame has links to the different forms we fill out, and when I click on one the external form is populated in the right frame. Javascript would be perfect for the job except that my frame is not located on the same server as the forms.
I stink at PHP. Not gonna lie. So i'm not looking for any hand-outs but any pointers would be great.
For example you may check out the forms on http://www.youcangetacar.com and you may use the pin code "A101" or you can check out what I have so far at http://customertrack.host-ed.me/

Make a page that cURL’s the page that is passed to it via url(curl.php?url=http://www.google.com) and then you dont have trouble with same domain policy.
Don’t forget to string replace relative urls with absolute urls.
eg, action="/submit/form.php" must become action="http://www.domain.com/submit/form.php"

Related

Custom user registration in Wordpress [closed]

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 2 years ago.
Improve this question
I would like to set up user system in Wordpress, which is not limited to writing post or comment. Instead I would like to store custom user data (in my case users are tutors) for example the subject they teach and the price they charge. How could i do it with PHP or Sql?
You have two options here:
A) modify the registration form/process and request the users/tutors to input additional data when they register on the site; this will also require you to provide them with a user friendly interface screen where they can update/edit their information. What I usually do is create a view to display the user's info on the front end and then when loading that page check if the user is viewing their own profile and if so, load additional edit options in line with their data - I then use AJAX to allow them to update their own info.
B) if you want to manually manage this info yourself then simply have the users/tutors fill out a form and then you can update/edit a custom post-type called sevenine-tutor that you'll have to register/create in the system.
In theory you'd want these users managing their own profiles so option A) is probably the right route to pursue.
Questions like this are hard to answer because they're purely theoretical so there could be numerous ways to tackle them and whether an answer is correct or not is purely subjective. My advice would be to break your idea up into chunks and try tackling functions one by one and if you get stuck on something, then post relevant code here or to wordpress.stackexchange.com and get answers to very specific technical questions.

Scraping data which loaded after scrolling to bottom [closed]

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
I'm working with PHP and I want to scrape some data from any website. But I have a problem. I scrape data but these items number are 48. But I know that page has 11K items. Rest of datas extend when you scroll and you get new bunch of datas (48 items).
I'm scraping with simple_html_dom. How can I manipulate scroll and get data ?
Thanks! :)
Sounds like the missing data is loaded via ajax.
Check the Network tab in the Developer Console (by pressing F12). Take a look at the URL which is being called (and the response), and edit it to your needs. Then call this URL instead of the one you are taking now.
It is impossible by this way.
But if you need to scrap this data you can send requests to endpoints which return lazily loaded data. You must research js code of target site.
p.s.
If you want to use really hard approach, you can research browser emulating.

Is it possible to run a PHP file which doesn't contain any html? [closed]

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
Is it possible to run a PHP file which doesnt contain any html?
I have a form, from which I want to submit data to a database. If I were to have the submit buttons action property set to a php file which solely deals with data submission, and then have a redirect on this page to the next visible webpage, would this work?
My reason for asking is I have quite a few different forms, some of which use the same submission code. If I were to have all this on one page and then use conditional logic to determine where the data came from (thus being able to determine what data was submitted and which page to load next) it would make my webpages much more readable, and the submission code much more re-usable.
PHP can take care of all kinds of things behind the scenes. That's the basic meaning of server-side scripting. So yes -- HTML or on-screen presentation are not necessarily in the code everywhere.

How do I allow the user to make a change to my site's appearance via php? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Let's say hypothetically that I have a Div that contains the background color 'red' and I would like the user to input into a separate input box to the side of the div what color he would like this box to be changed to. How would I go about allowing this type of functionality through php so that the color chosen (and not the default 'red') remains as the color once the user has left the webpage and another has logged on?
Basically how can I allow the users choice to be final so that users can see this afterwards?
Thanks in advance!
You cannot do it on a client side. The HTML code should be generated on a server side and along with addition to DOM, AJAX call should be made to server-side script to include new elements in subsequent generations.
And you should also provide some sort of authorisation, or else your website will be full of Viagra and Forex links in no time...
You have to send the number of appended items back to the server and the server has to store that number in a database. Then, the next time the page is requested, the server can either render them or it can send the information to the client and the client can render it.

How can users post after posts of others? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to display an add comment button(like in here or FaceBook) for all of the users' posts.
As you can see in here, if you click "add comment" button, small input box opens and your comment appears right below where you add it with smaller size than normal posts.
I am confused about which language would be the best for this. I know a little about JavaScript and jquery but i think doing it with php is not possible. An idea or example to do that would be greatly helpful.
JavaScript shows the form field, than makes an Ajax call to the server when the person clicks the add content button.
The server saves the content to the database, and returns a success message.
If successful, the JavaScript shows the comment and hides the form fields.
JavaScript and jquery its a client side technologies. Php is a server side. You need a proper database design and can choose any sever technology you like.

Categories