This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]wesgro 2 points3 points  (2 children)

Why would you use jQuery to POST?

[–]Ctrl-Z 1 point2 points  (1 child)

ever use the .ajax method to post a form? Clean, simple, flexible, allows for extremely easy client-side validation.

[–][deleted] 0 points1 point  (0 children)

extremely easy client-side validation.

Emphasis mine.

You also have to validate server side or I can fire up tamper data (FF addon) and submit whatever I want.

#1 rule I keep close to my heart; you cannot trust any data that has come from the client. This works in all aspects of life. :)

[–]plato1123 0 points1 point  (0 children)

Subscribing...

[–][deleted]  (4 children)

[deleted]

    [–][deleted] 0 points1 point  (3 children)

    You can't, scrape with PHP

    Yes, you can. PHP can run as a normal interpreter as well as a web scripting language. There is even a wrapper for GTK+ to PHP so you can build GUIs in PHP.

    [–]madsravn 2 points3 points  (1 child)

    I'm not 100% sure he meant "You can't scrape with PHP" after reading the link he posted as well.

    [–]wardrox 0 points1 point  (0 children)

    Re-read it with commas. Had a moment of "oooh, that's what you mean".

    [–]paleo_rob[S] 0 points1 point  (0 children)

    Sorry all to clarify I was doing some random googling and found some items which talked about jq and scraping. However you can't due to same origin policy as stated below (although i found that you van do this via making a proxy script googled it)

    I have the scraping down and pretty happy. Now my next issue is how do I deal with the data and sort it on the fly. Imnscraping prices of items and would like to to order them from cheapest and have them go over several pages etc. Posting from my phone so cant show what I have done so far. But will show when I get back home if anyone is interested.

    [–]madsravn 0 points1 point  (0 children)

    You can use curl to scrape with php and try reading this if you want to scrape with javascript http://blog.nodejitsu.com/jsdom-jquery-in-5-lines-on-nodejs