Jump to content

Recommended Posts

Hi, im am absolutely lost with this.

 

I am trying to make a php script that will check if a site in my database is actually valid.

 

for example,

 

$domain = "http://somedomain.com/?page=somepage&something=somethingelse";

 

I want to be able to connect to $domain and make sure that the url does actually point to the exact match that $domain is.

 

The reason is that I have some sites in my database that use a php headers redirect and I cannot actually get the original domain without manually visiting each and every url in my db.. now this wouldnt be a problem with a small bd.. but I have a list of over 200k results.. so it will take me a very long time.

 

I must apologise for not writing any code here, the only reason I havent tried is because i really do not have a clue where to start.

 

I am thinking i will need to use fsocks, and $_SERVER['REMOTE_ADDR'] and one big loop, (for each etc)

 

if anyone has the time, could you possible help me out with this?

 

thank you so much, Shaun

Link to comment
https://forums.phpfreaks.com/topic/128522-solved-php-script-to-check-a-domain/
Share on other sites

google "PHP Ping script", there is plenty of free scripts out there that do what your looking for. they 'ping' the server, first to see whether it is actually online/valid, and you can easily edit it from there to do whatever you need.

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.