HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank

Reply to topic Page 1 of 1
Gathering data from a web page
Message  

Reply with quote
Post Gathering data from a web page 
Hi Folks,

I've only been introduced to PHP for a week though it being very similar to Perl I managed to pick up the basics. However, I want to know if there is a way to get data provided on a web page (i.e. text fields) using PHP and manipulate that data.

Thanks!

View user's profile Send private message

Reply with quote
Post  
you need to be more spesific...

What exactly do you need??

You can have ALL input data in a POST/GET arrays after the action, but if you need the daya while it happaning you will need to go to JS... PHP like Perl is a server side script..


_________________
Alex (Shurf) Frenkel
Senior Web App. Developer
ICQ: 79536239
http://www.linkedin.com/in/sirshurf
View user's profile Send private message Visit poster's website Yahoo Messenger ICQ Number

Reply with quote
Post  
there are the functions

file_get_contents()
get_headers()


_________________
http://www.phpgfx.com
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

Reply with quote
Post  
Use can use POST method to get the values.


_________________
Abhishek
http://adeydas.com
View user's profile Send private message Visit poster's website

Reply with quote
Post  
You can also use regular expressions to mine for certain patterns. See manual for preg_match and www.regular-expressions.info

View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger

Reply with quote
Post  
You would assign a id to each text field :

<input type="text" id="user />

then use

<?php

$user = $_POST['user']

?>


Hope that helped

View user's profile Send private message

Reply with quote
Post  
I am New Here,My name is Jesse and this is my first entry here. Since I am new to forum community and I feel I am in midst of my own learning curve. I feel sometimes, that I have to learn a lot, hope you guys have patient on me.Thank you for sharing the post.
 Laughing  Laughing


_________________
outlook 2010
Microsoft Office Pro 2010
Buy Microsoft office 2010
View user's profile Send private message

Reply with quote
Post  
It appears that this will not work with Excel's built in web query...? I couldn't get it to work. A more elegant solution would be to enumerate through the table rows and table cells using MS's DOM. However, I have found it more flexible to parse the data myself because websites are getting wiser to scraping and vary the tables order, names' ect. This will throw your DOM code off immediately. By searching for a specific string or strings instead of an object relative to position in an HTML doc, you gain more responsive flexibility in my opinion. Here is a very basic example of a single query which will place the locations and speeds in columns a and b.

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  




FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Web Hosting
Web Hosting and Dedicated Servers Advertise Here $10 a Month Designer Children
Insurance HGH Domain name registration
Affordable web-hosting Dedicated Server Management

Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com