Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Programmatically collect Dell Warranty Info

Posted on 2008-06-15
2
Medium Priority
?
1,120 Views
Last Modified: 2012-08-13
I'm trying to develop a script that will return a Dell system's warranty information by scraping this site:

http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen

If the site would use GET and I could attach the service tag to the URL, I'd be golden. Unfortunately, Dell uses javascript form to submit the service tag before a page with the relevant details comes up that the script can scrape. I've been banging my head against this for a while.

Anyone know of any way to programmatically fill out and submit a javascript form?

 
0
Comment
Question by:mrpez1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 18

Accepted Solution

by:
Matthew Kelly earned 2000 total points
ID: 21789690
Use this code. Make your service tag a link to the file below with the code passed as ?code=
<?php
 
$code = $_GET['code'];
 
echo "<html>";
echo "<body ";
 
// validate code
if ( $code != "" )
{
	echo "onload=\"document.getElementById('submitForm').submit()\"";
}
echo ">";
echo "<form id=\"submitForm\" name=\"frmServiceTagSelect\" method=\"post\" ";
echo "action=\"http://support.dell.com/support/topics/global.aspx/support/my_systems_info/details?c=us&l=en&s=gen\">";
echo "<input type=\"hidden\" name=\"logout\" value=\"\">";
echo "Service Tag: ";
echo "<input name=\"ServiceTag\" type=\"text\" id=\"ServiceTag\" maxlength=\"7\" size=\"30\" value=\"".$code."\"/>";
echo "<input type=\"submit\">";
echo "</form>";
echo "</body>";
echo "</html>";
?>

Open in new window

0
 
LVL 5

Author Closing Comment

by:mrpez1
ID: 31467383
Perfect. Just what I needed. Thanks.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question