Jump to content

Recommended Posts

This the problem the file below..

 

i'm planning to do something like this

$stack_strings[$index] = $content;

$index++;

input string is first stored in index 0 and will be printed after submitting the form

and the next string is stored in $index[1] so on...

is this possible?

how will I compare the headers[] so I could locate the location? is preg_match() possible?

 

<html>
<head>
</head>
<body>
<?php
include('crawler.class.php');
$i=0;
$url1= array();
array_push($url1,$_POST["input_url"]);
$result= count($url1,COUNT_RECURSIVE);
for($i; $i!=$result; $i++){
$crawler = new crawler('www.mysite.com','firefox');
$conHandle = $crawler->crawlerConnect($url1[$i]);
$headers = $crawler->fetchHeader($conHandle);
$split_header = explode(" ",$headers[3]);
echo "<table border=\"0\" width=\"100%\">";
echo "<tr><td width=\"25%\">$url1[$i] redirects to:   <td><a href=\"$split_header[1]\">$split_header[1]</a><br />";
echo "</td></td></tr></table>";
}
?>
<a href="index.html">back</a>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/110193-function/#findComment-565819
Share on other sites

quote]how will I compare the headers[] so I could locate the location?[

are you trying to see what page sent you the information? if so, do a $_POST check for a unique name. You're wanting to store things in an array and keep track of this array after the page is gone. When the page goes so will your array. You need a DB or a session to do this.

 

Link to comment
https://forums.phpfreaks.com/topic/110193-function/#findComment-565876
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.